Cloud Front in AWS

Mahak jain
3 min readAug 12, 2021

What actually CloudFront is?

Amazon CloudFront is a fast content delivery network (CDN) service that securely delivers data, videos, applications, and APIs to customers globally with low latency, high transfer speeds, all within a developer-friendly environment.

CloudFront works seamlessly with any AWS origin, such as Amazon S3, Amazon EC2, Elastic Load Balancing, or with any custom HTTP origin. You can customize your content delivery through CloudFront using the secure and programmable edge computing features CloudFront Functions and AWS Lambda@Edge.

Now the task is: Create High Availability Architecture with AWS CLI

TASK DESCRIPTION:

🔅The architecture includes-
- Webserver configured on EC2 Instance
- Document Root(/var/www/html) made persistent by mounting on EBS Block Device.
- Static objects used in code such as pictures stored in S3
- Setting up Content Delivery Network using CloudFront and using the origin domain as S3 bucket.
- Finally, place the Cloud Front URL on the web app code for security and low latency.

First of all, we need to create an IAM user, key, security, instance, EBS storage, and many steps like them.

STEP 1: Create IAM user

STEP 2: Create AWS configure

STEP 3: Create Keypair

STEP 4: Create a security group

STEP 5: Add Inbound rules

STEP 6: Create an instance using the above key and security group

STEP 7: Create a volume of size 1

STEP 8: Attach the volume(Make partition by command fdisk /dev/sdf and format it by command mkfs.ext4 /dev/sdf1 and mount on the folder /var/www/html)

STEP 9: Create a bucket

STEP 10:Upload image in the bucket

STEP 11:Make image publicly visible

Step 12: Create a cloud front distribution

STEP 13: Install HTTPD Software

STEP 12: Create an index.html file

STEP 13: Start and enable httpd

STEP 14: We get our desired output by public_IP/file_name

Thanks and Regards!!

~Mhk ❤

--

--