Create High Availability Architecture with AWS CLI

Task DescriptionπŸ“„

aws ec2 create-security-group --group-name <GROUP_NAME_HERE> --description "Allow SSH"
aws ec2 run-instances --image-id <AMI_ID_HERE> --count <NO._OF_INSTANCE_YOU_WANT_TO_LAUNCH> --instance-type t2.micro --key-name <KEY_PAIR> --security-group-ids <SECURITY_GROUP_ID_HERE>
aws ec2 attach-volume --instance-id i-0178b3e0d687cadb3 --volume-id vol-068747f4143a64254
  • mkfs.ext4 hard_disk_name
  • fdisk hard_disk_name β€” β€” -> will go inside your device.
  • p β€” β€” -> for details
  • n β€” β€” -> new partition
  • press enter (it will be first partition only)
  • press enter (it will be counting the space from initial sector)
  • w β€” β€” -> save thepartition and exit
  • mkfs.ext4 partitioned_hard_disk_name
yum install httpd -y
aws s3api create-bucket --bucket <bucket_name_here> --region <region_name_
aws cloudfront create-distribution --origin-domain-name



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