← Back to all fixes
S3 returns 403 Access Denied
The Issue
`aws s3 cp file.txt s3://mybucket/` returns: `upload failed: An error occurred (AccessDenied)`
Root Cause
IAM policy does not grant the required s3:PutObject permission, bucket policy explicitly denies, or "Block Public Access" settings are blocking the operation.
How to Fix
Check IAM policy attached to your user/role includes `s3:GetObject` / `s3:PutObject` for the bucket ARNCheck bucket policy for explicit Deny statements — they override IAM allowsIf accessing publicly: check "Block Public Access" settings in S3 consoleTest with AWS Policy Simulator: IAM console > Policy Simulator — test your actionsCheck the bucket region matches your CLI config: `aws s3 ls s3://mybucket --region eu-west-1`