- 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 webapp code for security and low latency.
As per my past story we can configure the ec2 instance attaching EBS of aws using cli commands can done !
after launching the e2 instance with attaching extra storage from ebs we will configure the webserver with
yum install httpd
apache httpd software stores it’s all data to show on webpage on folder location : /var/www/html , so we will mount our ebs storage with this folder so it will pereistent as per our requirement !
now we will create an s3 bucket and put our content in that bucket using aws cli commands so we can provide object with security on our web server !
now we will configure the cloudfront service via cli from aws so we can provide low latency and high availablity of our content/object with better security !
now we will provide the cloudfront link on our /var/www/html folder in one webpage so we will get output as webserver with better security low latency and high availabilty via cloudfront !
hurray! we have achived high availablity architechture with aws-cli !