AWS RDS Commands

RDS database management

List Instances

aws rds describe-db-instances # list all RDS instances
aws rds describe-db-instances --db-instance-identifier mydb # describe specific instance

Create Instance

aws rds create-db-instance --db-instance-identifier mydb --db-instance-class db.t3.micro --engine mysql --master-username admin --master-user-password pass --allocated-storage 20 # create instance

Modify Instance

aws rds modify-db-instance --db-instance-identifier mydb --allocated-storage 30 # modify storage
aws rds modify-db-instance --db-instance-identifier mydb --db-instance-class db.t3.small # change instance type

Start and Stop

aws rds start-db-instance --db-instance-identifier mydb # start instance
aws rds stop-db-instance --db-instance-identifier mydb # stop instance

Delete Instance

aws rds delete-db-instance --db-instance-identifier mydb --skip-final-snapshot # delete instance

Snapshots

aws rds describe-db-snapshots # list snapshots
aws rds create-db-snapshot --db-instance-identifier mydb --db-snapshot-identifier mydb-snapshot # create snapshot