AWS Lab - AWS CloudFront
CloudFront
create an Amazon CloudFront distribution
create an Amazon CloudFront distribution that will use a CloudFront domain name in the url to distribute a publicly accessible image file stored in an Amazon S3 bucket.
- Create a new Amazon CloudFront distribution
- Use Amazon CloudFront distribution to serve an image file
- Delete Amazon CloudFront distribution when it is no longer required
Task 1: Store a Publicly Accessible Image File in an Amazon S3 Bucket
- AWS Management Console > Services > S3 > Create bucket
- Permissions tab > Block public access > Uncheck the Block all public access. All five boxes should now be unchecked
- Upload file > Manage public permissions > Grant public read access to this object(s)
- file > Object URL
Task 2: Create an Amazon CloudFront Web Distribution
- AWS Management Console > Services > CloudFront.
- Create Distribution
- delivery method: Web section
- Origin Domain Name:
the S3 bucket create
- Scroll to the bottom of the page, then click Create Distribution
Task 3: Create a Link to Your Object
myimage.html
- DOMAIN: Amazon CloudFront Domain Name
- OBJECT: name of the file uploaded to Amazon S3 bucket
1
2
3
4
5
6
7
<html>
<head>My CloudFront Test</head>
<body>
<p>My text content goes here.</p>
<p><img src="https://DOMAIN/OBJECT" alt="my test image" /></p>
</body>
</html>
Task 4: Delete Your Amazon CloudFront Distribution
- Disable > delete
.
This post is licensed under CC BY 4.0 by the author.
Comments powered by Disqus.