- Newest
- Most votes
- Most comments
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:
-
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.
-
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.
-
Encryption settings: If your PDF is encrypted, ensure you have the necessary permissions to decrypt it.
-
Public access settings: Although you mentioned public access blocks are turned off, double-check both the bucket and object-level public access settings.
-
IAM permissions: Review your IAM user or role permissions to ensure you have the necessary access to this specific object.
-
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
Relevant content
asked 4 years ago

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