- Newest
- Most votes
- Most comments
What permissions do you have on the user you are using to upload and download? I do uploads all the time and mine works fine using a python script.
Here's my JSON for the policy of the user I use to do this. Maybe this will help. You may not need ListBucket or ListAllMyBuckets. I need them, though, because my script uses them.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"s3:PutObject",
"s3:GetObjectAcl",
"s3:GetObject",
"s3:ListAllMyBuckets",
"s3:GetObjectAttributes",
"s3:ListBucket",
"s3:PutObjectAcl"
],
"Resource": "*"
}
]
}
What client are you using to access S3, and how is it getting AWS credentials? Are the credentials still current?
Sounds like you’re running into two different issues—both possibly tied to permissions or object paths. Here’s what I’d suggest checking:
- Access Denied When Downloading This typically means your IAM user/role doesn’t have s3:GetObject permissions for that specific key or prefix.
Double-check your bucket policy and IAM permissions
Make sure the object’s prefix (folder path) matches exactly
If you're using presigned URLs, ensure they're still valid and not expired
- NoSuchKey on Upload This error usually appears when:
You're trying to overwrite a non-existent key using copy or put in a non-standard way
Or you're using a path/key that doesn’t exist
Try:
Explicitly creating the full path in your upload
Logging the full object key you’re trying to upload to (to confirm it's not empty or malformed)
- S3 Block Public Access is Disabled That’s good, but note that disabling Block Public Access doesn’t automatically make your files accessible—you still need explicit permissions in the bucket policy or object ACL.
Let me know if you want help reviewing your bucket policy JSON—happy to walk through it!
Relevant content
- asked 5 months ago