Confirm that the request lands on the correct behavior matching the path pattern and is directed to the correct origin.įor example, in the following configuration, Behavior1 has the path pattern "test" that routes the request to the S3 origin. To resolve this error, review the behavior and path pattern for your distribution. If your distribution has multiple behaviors with different path patterns, then the image might be directed to an incorrect origin or a folder where the file doesn't exist. If you don't have the s3:ListBucket permission, Amazon S3 returns a 403: Access Denied error.īehavior path pattern directs the request to an incorrect origin or folder.If you have the s3:ListBucket permission on the bucket, Amazon S3 returns a 404: No Such Key error.The error that is returned depends on your S3 bucket permissions: If the requested image file doesn't exist in the bucket or is placed in a different folder, then a 403 or 404 error is returned. The image doesn't exist in the S3 origin or custom origin To resolve this error, check your S3 bucket policy permissions. Without the policy, when a request is made from CloudFront, a 403: Access Denied error is returned and the image doesn't load. If you have Origin Access Identity (OAI) configured in CloudFront to access images from an Amazon S3 Rest API endpoint, then confirm that the bucket has a bucket policy that grants OAI access to the content in the bucket. Resolution CloudFront doesn't have permission to access the Amazon S3 origin If the value of Server is set to either an Amazon Simple Storage Service (Amazon S3) or custom origin server name, then the origin is returning the error code. In the response header for the request, check for a 404 or 403 error code. On the Network tab, locate the network calls for the image request. To determine whether an error message is preventing the images from loading, open your browser's developer tools. Images can be blocked because of permission or configuration issues, or because of a 403 or 404 error.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |