S3 buckets are by default private where it can only be accessed by authorised users.

You can have a publicly accessible S3 bucket objects by creating an AWS S3 bucket and then making it public by applying appropriate bucket policy.

This method will make the whole content of the bucket public. You can also just allow public access only to specific objects or files in your private bucket.
Related: How to allow public access to private AWS S3 bucket objects

Steps to create public AWS S3 bucket:

  1. Create a private S3 bucket if you don't already have one.
  2. In the AWS S3 console, click on the bucket that you want to make public.
  3. Click on the Permissions tab.
  4. Click the Edit link on the Public access settings card.
  5. Uncheck both Block new public bucket policies and Block public and cross-account access if bucket has public policies options and click on the Save button.
  6. Type confirm and click on the Confirm button.
  7. Click on the Bucket Policy button.
  8. Use the AWS Policy Generator via the link at the bottom, or just paste the following public bucket policy at the editor and click on the Save button.
          "Principal": "*",

    Make sure you replace simplified-guide with your own bucket name.

  9. Go back to your bucket's object listing by clicking on the Overview tab.
  10. Test if your public bucket policy works.
    1. Select any of your object from within your bucket.
    2. Click on the link for your object at the bottom of the page.
    3. You should be able to view your content via the public URL.

Discuss the article:

Comment anonymously. Login not required.