Allow public access to private AWS S3 bucket objects

AWS S3 buckets are by default private. You can enable public access to the whole bucket or you can allow public access to specific objects in your private bucket.

These steps are to allow public access to your specific S3 objects or files while leaving the rest of the bucket private:

  1. Go to S3 section in your AWS console.
  2. Click on the bucket of the object that you want to make public.
  3. Enable public access control lists (ACLs) for the bucket.

    This will allow public access settings for the bucket but not immediately make your bucket's contents publicly accessible

    1. Click on the Permissions tab.
    2. Click the Edit link on the Public access settings card.
    3. Uncheck both Block new public ACLs and uploading public objects and Remove public access granted through public ACLs options and click on the Save button.
    4. Type confirm and click on the Confirm button.
  4. Allow public access to your object or file.
    1. Go back to the main section of your bucket by clicking on the Overview tab.
    2. Click on the object that you want to make public.
    3. Click on the link for your object at the bottom of the page to test.

      Your should get a permission error.

    4. Go back to the file page and click on the Make public button.

      A Success flash message should appear

    5. Click on the link for your object at the bottom of the page again to test.

      Your should now be able to access your object via the public URL.

Sign up for AWS Certified Solutions Architect - Associate and many other great courses on Udemy to learn more.


Written by Mohd Shakir Zakaria. Last updated on 2019-03-22