Why am I getting an Access Denied error when I open the URL to an Amazon S3 object that I have access to?

2 minute read
0

I have permission to access an object in Amazon Simple Storage Service (Amazon S3) bucket. I opened the URL in the Amazon S3 console for that object. However, I got an Access Denied error message.

Short description

The URL to the Amazon S3 object doesn't include your user credentials, so the request to the object is anonymous. Amazon S3 returns an Access Denied error for anonymous requests to objects that aren't public.

Resolution

Note: If you receive errors when you run AWS Command Line Interface (AWS CLI) commands, then see Troubleshoot AWS CLI errors. Also, make sure that you're using the most recent AWS CLI version.

Do one of the following:

Important: It's a security best practice to keep objects private and to set up users with a presigned URL for authenticated requests to access objects. However, if your use case supports public read access to your objects that requires you to access using the URL, then modify the objects permission. To set up public read access to the object, see Examples of Amazon S3 bucket policies.

Related information

Configuring ACLs

Identity and access management for Amazon S3

AWS OFFICIAL
AWS OFFICIALUpdated 7 months ago