AWS

View the S3 Bucket Object

A newly created bucket is always private by default and all objects belonging to the bucket is private.

Learn more on AWS S3:

Let’s start on object view.

Step1: Open the test.txt file

view-object

  • Once you click on the file.
  • It will open the object overview screen
  • In the overview screen you can the find the object URL.

object-url

Step2: Open the Object URL

  • Click on the Object URL to view the object.
<Error>
    <Code>AccessDenied</Code>
    <Message>Access Denied</Message>
    <RequestId>X57AJE9SPG64QNJW</RequestId>
    <HostId>
        bewfDRrlPA7Gph29gt8Qdtp0PG9QEVgaQdCM5kCidzla7Hc7fxCKZIJ3xzZC+hOMmgjMhYzr5b0=
    </HostId>
</Error>
  • By default, all Amazon S3 buckets and objects are private so on clicking above URL you will get access denied error.

Step3: Unblock Public Access on Bucket Level

  • Go to the Bucket list.
  • Amazon S3 > Buckets > skillshats-s3-bucket
  • Now, go to the Permission tab.
  • Click on the Edit

s3-bucket-permission

Step4: Allow Public Access

unblock-public-access

  • Uncheck Block all public access checkbox

unblock-access-save

  • Click on Save Changes

Step5: Confirm the Changes

  • After clicking on the Save Changes
  • It’ll ask to confirm.
  • Just type confirm in field and click on Confirm

confirm-access

  • Now, objects can be public

public-access

Note: Here notice that it says objects can be public and not as objects are public

It means that now you can use various mechanism like bucket policy or Access Control List to allow public access on your object.

Now, You can open the Object URL.

object-file

Note: If you are still facing Access Denied. Then also allow the public access on bucket.

Step6: Allow Public Access on Bucket.

  • Let’s update the object’s ACL to allow public read using Make public action
  • Select the object you would like to make publicly accessible.

bucket-public-access

  • Click on Actions drop-down and click Make public* or Make public using ACL**
  • Again, Confirm the Dialog box.
  • Now, object is public now. You can access using the object URL.
  • Object > object > Object URL

Learn more on AWS S3: