AWS Classroom Series – 20/Jan/2021

AWS CLI To Create and manage rds instances

  • Lets create a free tier rds mysql instance
aws rds create-db-instance --db-instance-identifier 'qtrdsfromcli' --allocated-storage 20 --db-instance-class 'db.t2.micro' --engine 'mysql' --master-username 'admin' --master-user-password 'admin1234' --vpc-security-group-ids "sg-075892da85bd09fc0" --backup-retention-period 7 --port 3306 --no-multi-az --no-auto-minor-version-upgrade
  • Lets learn to filter results
aws rds describe-db-instances
aws rds describe-db-instances --output table
aws rds describe-db-instances --output yaml
aws rds describe-db-instances --output json
aws rds describe-db-instances --output text
  • When we execute queries we get lot of information. Lets navigate to the output section Preview
  • AWS CLI has query options. Ensure you have understood json Refer Here and JMES Path Refer Here
  • Lets create a snapshot for the database. Refer Here for the changes
  • Lets create a read replica for this database Refer Here for the changes
  • Lets promote read replicate to primary database to support write operations Refer Here
  • Exercise: Write Delete commands to delete snapshot, dbs and read replicas

Leave a Reply

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

About learningthoughtsadmin