Create High Availability Architecture with AWS CLI

 Things to be achieved

  • 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, Install httpd software by yum command.

Launching a EC2 instance


Creating volume for persistent storage



Attaching volume to the instance document root


Creating a S3 bucket



Copying image to S3 bucket and making it public



Creating CloudFront



Using the CloudFront URL



Configuring the httpd server

    yum install httpd

    systemctl start httpd








Comments

Post a Comment