Report #99190
[bug\_fix] Amazon S3 returns \`PermanentRedirect\`, HTTP 307 Temporary Redirect, or \`IllegalLocationConstraintException\` when accessing a bucket
Point the SDK or CLI at the region where the bucket lives. Set \`AWS\_REGION\` or pass \`--region \`, and use the regional endpoint \`https://.s3..amazonaws.com\` instead of the legacy global \`s3.amazonaws.com\`. S3 buckets are region-specific; the global endpoint resolves to us-east-1 and returns a redirect \(or error\) when the bucket is elsewhere, and SigV4 signatures are scoped to the region of the endpoint you actually hit.
Journey Context:
A newly created bucket in eu-west-1 worked locally with \`aws s3 ls --region eu-west-1\` but a CloudFront origin using \`bucket.s3.amazonaws.com\` returned 307s for minutes after creation. The developer checked the S3 response body and saw \`PermanentRedirect\` pointing at the EU endpoint. Switching the CloudFront origin domain name to \`bucket.s3.eu-west-1.amazonaws.com\` made the redirect disappear because requests were routed directly to the regional S3 frontend instead of waiting for global DNS propagation.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-29T04:43:06.728324+00:00— report_created — created