Accesing Public Clouds
- All the public clouds on a broader note give us 3 interfaces
- browser or GUI based
- AWS => Console
- Azure => Portal
- cli access => for commandline access and automation using scripts (bash or powershell)
- AWS:
- AWS CLI
- AWS CLI for Powershell
- Azure:
- Azure CLI
- Azure Powershell
- client libraries or sdks => tool building
- AWS:
- Boto3 (sdk for python)
- AWS SDK for java, .net, javascript …
- Azure:
- Azure SDK for python, .net, java, javascript …
AWS CLI
- To login into AWS From CLI we need credentials and AWS offers programatic access via access key and secret access key
- Key creation: Watch classroom video
- AWS CLI Pattern
aws <service> <command> [<sub-command>] [args]
aws s3 ls
aws ec2 start-instance --instance-id i-831klsdjfl
aws ec2 delete-vpc --vpc-id vpc-07812347
- AWS has elaborate documentation of cli
Patterns in finding a right command or subcommand
- All the delete operations will have
delete-* or terminate-* and get operations describe-* or list-* …
Lets find the commands
aws ec2 describe-instances
- Almost all the cli commands will have
- Synopsis: Describes all arguments
- Options: describe each argument and the purpose
- Global Options: we can change region, output format or query the response
- Examples: common examples
- Output: output structure
- Get all launch templates in mumbai region
aws ec2 describe-launch-templates