AWS CLI !!
- Create a key pair
2. Create a security group
3. Launch an instance using the above
created key pair and security group.
4. Create an EBS volume of 1 GB.
5. The final step is to attach the
above created EBS volume to the instance you created in the previous steps
lets start !!
So AWS Services has IAM service where we can create user and can give access to that user according to our wish..
Step 1:
To give user name and here in AWS Access type give programmatic access so that it enables access key & secret key for AWS CLI.Step 2 :
Here, give permissions to that user & here I gave Power Access to the userStep 2 :
Here, give permissions to that user & here I gave Power Access to the user
Step 2 :
Here, give permissions to that user & here I gave Power Access to the user
Step 3: You can add tags
Step 4 : Now AWS, will generate Access Key & Secret Key for that user. We have to use this Access Key & Secret Key to login into our AWS CLI.
Here you can see user is created
Command syntax is :
aws <command> <subcommand> <options>
aws ec2 help :
This gives all the commands available in ec2.
here to create new key pair you can see subcommand :
we can create new key pair by command :
🧩 aws ec2 create-key-pair — key-name TaskKeyPair
we can create new security group by command :
🧩 aws ec2 create-security-group — group-name TaskSG — description “Task Security Group”
we have to create an EBS volume of 1 GB
we can now create own volume of 1 GB.
we have attach the Volume to the instance that we created now…For that we have to check the available commands for attaching volumes.
we can stop the instance :
aws ec2 stop-instances — instance-id i-0f8d4aa0e0f1d51ad