Here’s a cheat sheet for Amazon RDS (Relational Database Service):
Amazon RDS Basics
- Fully managed relational database service.
- Supports multiple database engines: MySQL, PostgreSQL, MariaDB, Oracle, Microsoft SQL Server, and Amazon Aurora.
Key Amazon RDS Concepts
- DB Instance:
- A single database environment running on an RDS engine.
- Can host multiple databases.
- DB Engine:
- The underlying database software.
- Examples: MySQL, PostgreSQL, Oracle.
- DB Parameter Group:
- A set of engine configuration values.
- Applied to DB instances.
- DB Option Group:
- Bundles optional features.
- Applied to DB instances.
- DB Security Group:
- Acts as a virtual firewall.
- Controls inbound and outbound traffic.
- DB Subnet Group:
- A collection of subnets.
- Used to define where RDS instances are launched.
- DB Snapshot:
- Point-in-time copy of a DB instance.
- Can be used for backup and restoration.
- Multi-AZ Deployment:
- Provides high availability and failover support.
- Synchronous replication to a standby instance.
- Read Replicas:
- Asynchronous replication to a read-only instance.
- Improves read performance.
RDS CLI Commands
Create a DB Instance:
aws rds create-db-instance --db-instance-identifier mydbinstance --db-instance-class db.t2.micro --engine mysql --master-username masteruser --master-user-password masteruserpassword
List DB Instances:
aws rds describe-db-instances
Create a DB Snapshot:
aws rds create-db-snapshot --db-instance-identifier mydbinstance --db-snapshot-identifier mydbsnapshot
List DB Snapshots:
aws rds describe-db-snapshots
Create a Read Replica:
aws rds create-db-instance-read-replica --db-instance-identifier myreadreplica --source-db-instance-identifier mydbinstance
List Read Replicas:
aws rds describe-db-instances --db-instance-identifier myreadreplica
Modify DB Instance:
aws rds modify-db-instance --db-instance-identifier mydbinstance --allocated-storage 100
Delete DB Instance:
aws rds delete-db-instance --db-instance-identifier mydbinstance --skip-final-snapshot
Remember to replace placeholders like mydbinstance
, db.t2.micro
, mysql
, masteruser
, masteruserpassword
, and others with your specific values.
This cheat sheet covers some basic Amazon RDS concepts and commands. For more detailed information, refer to the Amazon RDS Documentation.