🧱Setting Up High Availability Architecture using AWS CLI

High Availability Architecture using CLI
To configure AWS account :
Use : #aws configure
Here you need to specify the Access Key and ID along with Region
Launching AMI Linux instance :
# aws ec2 run-instances --image-id ami-0e306788ff2473ccb --count 1 --instance-type t2.micro --key-name <key_name> --security-group-ids sg-09ac2ee9a41df7156 --subnet-id subnet-21212849
#yum install httpd -y
#systemctl start httpd
#systemctl enable httpd

Lets check if its working fine😎 or not ! :

To create Volume:#aws ec2 create-volume --volume-type gp2 --size 30                   --availability-zone ap-south-1aTo attach volume to instance :# aws ec2 attach-volume --volume-id vol-0174c90d2a3035f5e --instance-id i-0104eecbd16db9620 --device /dev/sdf
#fdisk -l
Formatting the attach volume : 
#mkfs.ext4 /dev/xvdb
MOunting document root on EBS storage
#mount /dev/xvdb /var/www/html
🖋Creating S3 bucket 
#aws s3api create-bucket --bucket my-bucket --region us-east-1
🖋Copying file from local system
#aws s3 cp C:\Users\USER\Desktop\test_ha.txt s3://testha1/test1.txt
#aws cloudfront create-distribution --origin-domain-name testha1.s3.amazonaws.com



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store


Technological Enthusiast , Like to express what is need of time, Relates real world to philosophical insights