Amazon CloudFront 🌩️ - An Global Edge Network
Tags: devops, tutorial, security, aws
Published: 2022-02-10 11:04:44

## DAY 5 - Deliver  your content like Lightning Mcqueen - Amazon CloudFront 
☁️[100 days of Cloud- **Day Five**](https://github.com/anuvindhs/100daysofcloud)
 ✅[Follow Me on Twitter](https://twitter.com/anuvindhs)


![Image COVER2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s3155y68h3svilklqr7n.gif)


[Tweet This Blog](https://link.anuvindh.com/twitter/DAY-5-AMAZON-CDN-tweet.html)  - [Read on GitHub](https://github.com/anuvindhs/100daysofcloud) - [Read On iCTPro.co.nz](https://ictpro.co.nz)


----
## What is 🌩️ Amazon CloudFront?

Amazon CloudFront is a web service that speeds up distribution of your static and dynamic web content, such as .html, .css, .js, and image files, to your users.
When users request content that is been delivered via CloudFront, the demand is fullfilled through a nearest edge location to archive lowest latency.

## Global Edge Network

Reliable, low latency and high throughput network connectivity.
![CDN](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n48jsnnl3h0cl5mfs5xf.png)
 CloudFront Edge locations are  fully **redundant**, multiple **100GbE** parallel fiber that circles the globe and links with tens of thousands of networks for improved origin fetches and dynamic content acceleration.

### Features
- protection against  layer 3 and layer 7 ( **Application & Network** ) attacks
- **SSL/TLS** certificates , you can create free certificates from Amazon certificate manager and embed to CloudFront.
- Control on accessing the data ex:-restrict **access** to only **authenticated viewers** (signed URLs and Signed Cookies, Token Authentication)
- Compliance , ** PCI-DSS Level 1, HIPAA, and ISO 9001, ISO/IEC 27001:2013, 27017:2015, 27018:2019, SOC (1, 2 and 3)**
- DevOps , Fast **Change Propagation and Invalidations**
- **Cost** effective 


## 📗 Tutorial

### Prerequisites
AWS account , and Privilage to manage CloudFront and S3
Host a Static web content in S3 , if you don't know how to,here is the tutorial [link](https://ictpro.co.nz/hosting-static-website-in-s3-how-to/)

### Lets create our CDN.
Once you sign in go to ClodFront

|Steps   | Screenshots  |
| ------------ | ------------ |
|Click on to **Create distribution**| ![Image name](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0vwh8nlg3fj5uo26p328.png)  |
|**Name** and Update details, if you want the orgin to access the content in s3 via CDN only use OAI|![CDN Name](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/96jj1t2sr2gzzvqmo4f9.png)|
|**HTPPS/TLS**| ![Image SSL](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oa7t8se9jv6017wjnn66.png)|
|**ACM** Certificate, The certificate must be in the US East (N. Virginia) Region (us-east-1)|![Image ACM](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b9ra9prcguvu14txyjwa.png)|
|Enter **CNAME**, if you wanna serve via custom domain names that you use in URLs for the files served by this distribution. |![Image Cname](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4l22reymgtirknwgvudq.png)|
|Keep everything else | **Default**|


Now Click **Create distribution**.

Wait till the deployment get ✔️success

Now Under Domain Name you will get **xxxxxxxxxxxxxx.cloudfront.net** , Copy and visit the link. you will be able to see the content via CDN.
If you have added CNAME for your domain , update this with your domain provider.


tadaa 🎉congratulations , you have successfully configured your first CDN with AWS





{% user anuvindhs %}