Exploring AWS
AWS was the first cloud service providers, 51% of the share market holder is AWS. They provide data centers almost all the countries and multiple centers are provided within a range of 1 Km. Thus providing a secured and fast server.
e.g. Netflix is running around 1,00,000 servers providing so much data(movies, shows) to the millions of users).
Working with AWS using AWS CLI :
Task description :
- Create a key pair
- Create a security group
- Launch an instance using the above
created key pair and security group. - Create an EBS volume of 1 GB.
- The final step is to attach the
above created EBS volume to the
instance you created in the previous steps.
Step 1: Creating key pair
aws ec2 create-key-pair — key-name astha — query KeyMaterial — output text > astha.pem
Step -2 Creating a security group
aws ec2 create-security-group — group-name astha_sg — description “aws_task_sg”
For creating security rules :
aws ec2 authorize-security-group-ingress — group-id sg-07661650d708a505a — protocol all — port all — cidr 0.0.0.0/0
Step -3 Launch an instance using the above
created key pair and security group
aws ec2 run-instances — image-id ami-0a9d27a9f4f5c0efc — instance-type t2.micro — security-group-ids sg-07661650d708a505a — key-name astha
Step 4 : Create an EBS volume of 1 GB
aws ec2 create-volume — availability-zone ap-south-1a — size 1
Step 5: The final step is to attach the
above created EBS volume to the
instance you created in the previous steps
aws ec2 attach-volume — device /dev/sdb — instance-id i-0ba0b0edee3a557af — volume-id vol-0ee5dbfc849e7aec0