AWS CLI
- AWS can be accessed over
- Console: This requires username and password (Account Id). This is used from browser by accessing
https://console.aws.com
- Programmatic Access: This requires secret key and access key. This is used by
- CLI
- SDK (Boto3)

- Every resource created in AWS will have unique ARN (Amazon Resource Name) and Generally aws deals with id’s not names
- AWS the concept of tags where we can tag every resource and query using it.
Setup
- We need iam user and configure
- Follow instructions discussed in the class
Usage
aws <service/ap1> <action> [(<arg1> <value1>) (<arg1> <value1>)]
aws ec2 describe-instances
aws ec2 delete-vpc --vpc-id <>
- How to use command line (Follow instructions discussed in the class)

Basics
Create a dbsubnet group
aws rds create-db-subnet-group \
--db-subnet-group-name 'fromcli' \
--db-subnet-group-description 'for learning' \
--subnet-ids 'subnet-01783eee03a9d43c2' 'subnet-0ec0970e23a9ad932' \
--tags 'Key=env,Value=dev'
aws rds create-db-subnet-group `
--db-subnet-group-name 'fromcli' `
....

Delete security group
aws ec2 delete-security-group \
--group-name 'launch-wizard-1'
Get all key pairs
aws ec2 describe-key-pairs --output yaml
aws ec2 describe-key-pairs --output table
aws ec2 describe-key-pairs --output text
aws ec2 describe-key-pairs
Like this:
Like Loading...