Create a RDS From AWS CLI
- AWS Exposes API’s which are used by Console, SDK, CLI
- Installing aws cli
- Identity Information:
aws s3 ls
- CLI helps in automating the repetitive tasks
Approach to AWS CLI
- Ensure you are aware of manual steps
- For every manual step try to find the command
- google
aws <service> cli
in thisaws rds cli
- google
- Lets try to find the existing databases.
aws describe-db-instances
- Lets try to find database engine versions
aws rds describe-db-engine-versions
- Lets try to create a mysql rds database with db.t2.micro as its size
aws rds create-db-instance --db-name qtcommerce --db-instance-identifier qtcommercemysql --allocated-storage 20 --db-instance-class db.t2.micro --engine mysql --master-username qtdevops --master-user-password admin123 --backup-retention-period 2 --no-multi-az --publicly-accessible
aws rds describe-db-instances
Exercises (From Cli)
- Create a read-replica from cli
- Create a Postgres rds database with size db.t2.micro
- Create a read replica for postgres db
- Delete all the databases and snapshots created