Presigned URLs return `SignatureDoesNotMatch` for some users and `Request has expired` for others.
IntermediateTroubleshootingS3, EBS and EFS
Answer
Likely causes → SignatureDoesNotMatch means the request is different from what was signed: another HTTP method, a missing Content-Type, the wrong Region endpoint, or the URL was re-encoded. Request has expired means the expiry passed, or the URL was signed with temporary role credentials that expired earlier (a URL is valid only as long as the signing credentials).
Diagnose →
aws s3 presign s3://bucket/file.zip --expires-in 3600 --region us-east-1
# inspect X-Amz-Expires, X-Amz-Date, X-Amz-Credential in the URL
aws sts get-caller-identity # signed with a role session? check its expiry
Fix →
- Sign with the exact method and headers the client will send, using a Regional endpoint
- For long-lived links, sign with credentials that last at least as long. SigV4 allows a maximum of 7 days
- Fix client clock skew
Prevent → Generate URLs on demand with a short expiry, and serve large public downloads through CloudFront signed URLs.
More on S3, EBS and EFS
`BucketAlreadyExists: The requested bucket name is not available. The bucket namespace is shared by all users of the system.`Beginner`PermanentRedirect: The bucket you are attempting to access must be addressed using the specified endpoint.`BeginnerA partner account uploads objects into your bucket, but your own admins get `403 Forbidden` reading them.Intermediate`aws s3 cp` gets `An error occurred (AccessDenied) when calling the GetObject operation` but the IAM policy allows `s3:GetObject` and the bucket policy is fine.IntermediateAn S3 static website endpoint returns `403 Forbidden` with `Code: AccessDenied`.IntermediateHigh-throughput writes get `503 SlowDown: Please reduce your request rate.`Intermediate