AWS Classroomnotes 23/Sep/2023

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)
        Preview
  • 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

  • Syntax
aws <service/ap1> <action> [(<arg1> <value1>) (<arg1> <value1>)]
  • Example
aws ec2 describe-instances
aws ec2 delete-vpc --vpc-id <>
  • How to use command line (Follow instructions discussed in the class)
    Preview

Basics

Create a dbsubnet group
  • command line
  • Bash
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'
  • Powershell
aws rds create-db-subnet-group `
    --db-subnet-group-name 'fromcli'  `
    ....

Preview

Delete security group
  • Commands
aws ec2 delete-security-group \
    --group-name 'launch-wizard-1'
Get all key pairs
  • Command
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

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About continuous learner

devops & cloud enthusiastic learner