Skip to content

Is my bucket publicly accessible?

0

Hi Everyone I was following this tutorial and have to correct bucket settings and policies exactly outlined in the video. https://youtu.be/JQVQcNN0cXE?si=wTU94VBwj9Nf4aT0&t=341

I was wondering what else could be wrong? I've tripled checked everything and it seems fine.

3 Answers
1
Accepted Answer

I miss typed the name of the aws secret key its

AWS_SECRET_ACCESS_KEY

not

AWS_SECRET_ACCESS_KEY_ID

answered 2 years ago

1

To determine if your S3 bucket is publicly accessible, you can check a few key areas:

  1. S3 Console: In the Amazon S3 console, look at the "Buckets" list. The "Access" column will indicate the bucket's public accessibility status. It may show as "Public," "Objects can be public," "Buckets and objects not public," or "Only authorized users of this account."

  2. Block Public Access settings: Check both the account-level and bucket-level Block Public Access settings. These settings, when enabled, prevent public access regardless of other permissions.

  3. Bucket Policy: Review your bucket policy to see if it grants the "s3:GetObject" permission to the public (Principal: "*").

  4. Access Control List (ACL): If you're using ACLs, check if they grant public read access.

  5. Object-level permissions: Remember that individual objects can have their own permissions that may differ from the bucket-level settings.

  6. Amazon Macie: If you're using Amazon Macie, it can provide insights into bucket accessibility. The "Effective permission" field in Macie will show "Not public," "Public," or "Unknown."

If you've followed a tutorial exactly and are still having issues, consider the following:

  1. Ensure all changes have propagated (this can take some time).
  2. Double-check that you didn't miss any steps in the tutorial.
  3. Verify that your AWS account doesn't have any additional security measures preventing public access.
  4. If you're trying to host a static website, make sure you've configured the bucket for static website hosting.

If you're still unsure, it may be helpful to review your settings with an AWS support representative or a colleague who can provide a fresh perspective on your configuration.

Sources
Reviewing your S3 bucket inventory in Macie - Amazon Macie
Configuring block public access settings for your S3 buckets - Amazon Simple Storage Service
Setting permissions for website access - Amazon Simple Storage Service

answered 2 years ago

EXPERT

reviewed 2 years ago

  • We've disabled the acl and this is our policy

    { "Version": "2012-10-17", "Id": "Policy1738000943911", "Statement": [ { "Sid": "Stmt1738000929564", "Effect": "Allow", "Principal": "", "Action": "s3:GetObject", "Resource": "arn:aws:s3:::infra-demo/" } ] }

0

Could you share what exactly happens when you try to access your bucket? Are you getting any specific error message?I see you're following a tutorial - are you trying to host a static website? That would help me better understand what you're trying to achieve. Also, just to make sure we're on the same page: Have you turned off all the Block Public Access settings? (There are 4 of them)

AWS

answered 2 years ago

  • I'm getting forbidden 403s. However we have the access key and secret access key as well setup properly with no extra spaces or quotes.

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.