15. Lab - S3 & Cloud Front
# S3 & CloudFront
In this hands-on exercise, you will create a S3 bucket with a Cloud Front distribution to speed up our the delivery of content to our website.
Prerequisites:
- AWS Account
Topics Covered:
By the end of this lab, you will be able to:
- Create and configure a bucket
- Upload an object to a bucket
- Create distribution
Steps:
- Create S3 Bucket
- On the AWS Management Console page, type
S3in theFind Servicesbox and then selectS3. - Click
Create bucket - Enter a
Bucket name.- Note: Bucket names must be globally unique.
- Click the
Createbutton. - Once the bucket is created, click on the name of the bucket to open the bucket to the contents.
- On the AWS Management Console page, type
- Upload Object to Bucket
- Once the bucket is open to its contents, click the
Uploadbutton. - Click the
Add Filesbutton. - Select a file from your local computer to upload.
- Click
Open. - Click
Upload.
- Once the bucket is open to its contents, click the
- Create CloudFront Distribution
- Select
Servicesfrom the top left corner. - Enter
cloud frontin theFind a service by name or featuretext box and selectCloud Front. - Click
Create Distribution. - Under the
Webdelivery method, selectGet Started. - Under
Origin Settings: - Under
Origin Domain Name, select the S3 bucket that you just created. - Under
Origin Path, enter/to indicate the root level. - Leave the defaults for the rest of the options.
- Click
Create Distribution.- Note: It may take up to 10 minutes for the CloudFront Distribution to be created.
- Select
- Delete Bucket and Distribution
- To delete the Cloud Front distribution, click on the radio button next to the
Delivery Methodfor the distribution. ClickDisableand thenYes, Disable. ClickClose. - Once the distribution is disabled, you can delete it by selecting the radio button next to the
Delivery Methodand clicking theDeletebutton. - To delete the S3 bucket, navigate to S3, but clicking on
Servicesand typingS3in theFind Servicesbox and then selectS3. - Select the radio button next to the name of the bucket you want to delete.
- Click
Delete. - Type the name of the bucket to confirm deletion.
- Click the
Confirmbutton.
- To delete the Cloud Front distribution, click on the radio button next to the
Create a S3 bucket with a Cloud Front distribution
Task Feedback:
Amazing Work!