Skip to content

"Access denied" error code

0

I uploaded a PDF to my S3 bucket, and I keep getting error codes. I've read through some of the forums, but the jargon is too technical for me!

At the top of the page where my PDF should open it says" This XML file does not appear to have any style information associated with it. The document tree is shown below."

Then it shows the access denied error. There's a request ID, and then a host ID. No actual numbers for the code.

I'm the only user for the AWS S3 bucket, I haven't changed any settings. It seems like I have permission and there are no public access blocks as that is turned off.

In the most simple way, how do I troubleshoot this?

Thanks!

  • Can you clarify if it is failing to upload or download the pdf. How are you accessing the pdf?

asked 2 years ago2.5K views

1 Answer
0

I understand you're facing an "Access Denied" error when trying to open a PDF you uploaded to your S3 bucket. This can be frustrating, especially when you're the only user and haven't changed any settings. Let's go through some simple troubleshooting steps:

  1. Check your bucket policy: Even if you're the only user, your bucket policy might be incorrectly configured. You can try signing in as the root user and deleting the bucket policy, then creating a new one with the correct permissions.

  2. Verify object permissions: Make sure the specific PDF file has the right permissions set. You might need to update the object's Access Control List (ACL) to allow read access.

  3. Encryption settings: If your PDF is encrypted, ensure you have the necessary permissions to decrypt it.

  4. Public access settings: Although you mentioned public access blocks are turned off, double-check both the bucket and object-level public access settings.

  5. IAM permissions: Review your IAM user or role permissions to ensure you have the necessary access to this specific object.

  6. S3 Block Public Access settings: Check if any of the four S3 Block Public Access settings are preventing access to your file.

If you're still unsure, you might want to try creating a new bucket, uploading the PDF there, and see if you can access it. This can help determine if the issue is with the specific bucket or a more general permission problem.

Remember, making objects publicly accessible can have security implications, so ensure this aligns with your intended use of the bucket.
Sources
Troubleshoot 403 Access Denied error in Amazon S3 | AWS re:Post
Error opening image in s3 bucket | AWS re:Post
Troubleshoot access denied (403 Forbidden) errors in Amazon S3 - Amazon Simple Storage Service

answered 2 years ago

EXPERT

reviewed 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.