无法通过Amazon CloudFront发送请求:403错误

时间:2019-12-03 07:00:29

标签: php laravel amazon-web-services amazon-cloudfront

我使用laravel框架上的crud(创建,查看,更新,删除)操作创建了一个AWS Lambda函数。

我要更新记录:

User::where('email', 'balbla@gmail.com')->update(['name' => $request->get('name')]);

但是我有这个错误:

403 ERROR
The request could not be satisfied.
Bad request. We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner. 
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation. 
Generated by cloudfront (CloudFront)

当我执行http get方法时,所有方法都能正常工作。我已经阅读了有关CloudFront的文档,但不知道如何解决它。我用邮递员。如果我了解问题出在$request上,那么我需要在Amazon CloudFront中创建分发。

1 个答案:

答案 0 :(得分:0)

那是我的错误。我打开邮递员,并使用GET方法创建了新查询,并在原始数据中添加了json:

{
    "name" : "bla bla some name"
}

当我删除此json时,一切正常