Making the S3 Files Publicly Accessible

Lab Steps

lock
Logging in to the Amazon Web Services Console
lock
Creating an Amazon S3 Bucket
lock
Creating a CloudFront Distribution
lock
Uploading a Demo Image Gallery to the S3 Bucket
lock
Making the S3 Files Publicly Accessible
lock
Testing the CloudFront Distribution
lock
Disabling a CloudFront Distribution
lock
Deleting a CloudFront Distribution
lock
Destroying an S3 Bucket
live-help Need help? Contact our support team

Here you can find the instructions for this specific Lab Step.

If you are ready for a real environment experience please start the Lab. Keep in mind that you'll need to start from the first step.

Introduction

All uploaded files are private by default and can only be viewed by the AWS account owner, but you can make them accessible to everyone using the AWS Console.

In this lab step, you will modify the permissions of the S3 bucket you created earlier so the bucket can be accessed publicly.

 

Instructions 

1. In the S3 Console for your bucket, click the Permissions tab:

alt

 

2. At the right of the screen, click Edit:

alt

 

3. Uncheck Block all public access:

alt

Also, ensure that all other checkboxes are unchecked.

Note: You should carefully consider anytime you allow public access to S3 buckets. AWS has implemented these security features to help prevent data breaches. For this lab, there is no sensitive data and you do want to allow public access.

To learn more about access control in Amazon S3, visit the AWS documentation.

 

4. To save your changes, in the right of the page, click Save:

alt

The Amazon S3 Console will ask you to confirm that you want to make this change.

 

5. Enter confirm in the text-box and click Confirm:

alt

 

6. Navigate back to your bucket's overview by clicking the Overview tab.

 

7. Select the gallery object:

alt

 

8. Click Actions, and then click Make public:

alt

 

9. In the dialog box that opens, click Make public:

alt

You can check the operation progress in the Transfers tab, wait until it ends.

 

10. In the object list, click gallery:

alt

 

11. Select the index.html object:

alt

 

12. In the properties section that appears on the left, click the link in the Object URL field:

alt

You will see the Demo Gallery webpage load in a new browser tab: 

alt

Look at the URL in the address bar, it will be similar to:

  • https://calabs-abc123.s3-us-west-2.amazonaws.com/gallery/index.html

The URL of any S3 object follows this template:

  • https://s3-<region>.amazonaws.com/<bucket-name>/<object-prefix>/<object-name>