Creating a High Availability Architecture with AWS CLI
So first step is to create the AWS Instance.
Then we create an EBS Volume.
We then attach the same volume to our EC2 Instance.
We then create a S3 Bucket where we will store our static objects.
Now we copy an image from the local system to our bucket.
Now we create a CDN using Cloudfront and we give the origin domain as the domain of our S3 Bucket.
Here we can see that we can access the file using the cloudfront URL.
Now we will start our Apache HTTP Server on our EC2 Instance.
Now we can type down our HTML Document inside /var/www/html/ with the image source as the cloudfront’s URL
And Finally we can access our site which has it’s web server running on EC2 and Image stored in S3 whose URL comes from the Cloudfront.
Thanks for reading 😊