Building Cloud Infrastructure Using AWS CLI..
- To, get those things you need to go to your AWS account from AWS Web Console. Then go to “IAM” service => click on “Users” => then click on “Add User” and create one user.
- Then click on “Programmatic access” and if you read the description of this access you can see, it’s giving us “access key” and “secret key”. For reference follow the below mentioned screenshot…
- Next click on “Tags” and give any desired tag. Then click on “review” and then click on “Create User”. Next it will provide you one option to see your Access Key and Secret Key. Don't forget to “Download” the credentials by clicking on the download button for future reference.
Step 1:Login to AWS Using security credentials of IAM User we created .
Step 2: Create a key pair
For creating Key Pair we have command as :
aws ec2 create-key-pair --key-name task4key
Step 3: Create Security group
To create Security group we have the following command :
Step 4: Launch one EC2 Instance using above Key pair and Security Group
To launch ec2 instance AWS CLI has command as :
Step 5: Create one EBS Volume and attach it to the EC2 Instance we launched
To Create EBS Volume AWS CLI has command as :