Amplify Publish - CloudFront 307 redirection and Access Denied after deployment in non-US region
See original GitHub issueDescribe the bug
After amplify add hosting and amplify publish deployment where resources are created in a non-US region, CloudFront redirects (307) to S3 which returns AccessDenied. This is most likely because CloudFront is configured with Origin Access Identity so the S3 bucket cannot be accessed directly. I suspect it might be related to: https://aws.amazon.com/premiumsupport/knowledge-center/s3-http-307-response/ and the bucket on CloudFront doesn’t have the region in the URL.
> amplify version
0.2.1-multienv.4
Issue Analytics
- State:
- Created 5 years ago
- Comments:13 (5 by maintainers)
Top Results From Across the Web
Amplify publish causes AccessDenied error - Stack Overflow
I suspect this has something to do with the S3 bucket not being in the default us-east-1 region and amplify not setting up...
Read more >Resolve Access Denied errors from a CloudFront distribution ...
To troubleshoot Access Denied errors, first determine if your distribution's origin domain name is an S3 website endpoint or an S3 REST API ......
Read more >Troubleshoot HTTP 307 errors in Amazon S3 | AWS re:Post
To avoid the 307 Temporary Redirect response, send requests only to the Regional endpoint in the same Region as your S3 bucket: If...
Read more >Amplify AWS Access Denied | How To Fix It? - Bobcares
Solution: To resolve this, use amplify configure project to change the distribution directory and then re-run amplify publish .
Read more >test by alan alan - Issuu
Permissions—Grant or deny access to others who want to upload or download data into ... Amazon S3 returns the following: HTTP/1.1 307 Temporary...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

This error breaks all amplify projects with hosting in all regions except us-west-2. Could this ticket be reopened, please. This error is not easy to debug and this ticket saved me a lot more investigation time. Thank!
Using amplify version 4.20.0
For anyone facing similar issues deploying to us-west-2, you should modify the S3AndCloudFront/template.json section that specifies the origin bucket for CloudFront from