Follow me Shaik Hari Sadia Anjum for more AWS content!
Amazon RDS
Amazon RDS (Relational Database Service) is a fully managed database service by AWS that
simplifies database administration tasks such as provisioning, patching, backup, recovery,
and scaling. It supports multiple database engines and offers features like automated
backups, monitoring, and security.
Amazon RDS Cheat Sheet
Industry-standard relational database
RDS manages backups, software patching, automatic failure detection, and recovery.
You can have automated backups performed when you need them, or manually create
your own backup snapshot. You can use these backups to restore a database.
Supports Aurora, MySQL, MariaDB, PostgreSQL, Oracle, Microsoft SQL Server.
You can get high availability with a primary instance and a synchronous secondary
instance that you can fail over to when problems occur. You can also use MySQL,
MariaDB, or PostgreSQL Read Replicas to increase read scaling.
Basic building block of RDS is the DB instance, which is an isolated database
environment in the cloud.
You can have up to 40 Amazon RDS DB instances.
Each DB instance runs a DB engine.
You can select the computation and memory capacity of a DB instance, determined by its
DB instance class. If your needs change over time, you can change DB instances.
Each DB instance has minimum and maximum storage requirements depending on the
storage type and the database engine it supports.
You can run your DB instance in several AZs, an option called a Multi-AZ deployment.
Amazon automatically provisions and maintains a secondary standby DB instance in a
different AZ. Your primary DB instance is synchronously replicated across AZs to the
secondary instance to provide data redundancy, failover support, eliminate I/O freezes,
and minimize latency spikes during system backups.
Key Features of Amazon RDS
A. Automated Database Management
AWS manages routine database tasks such as setup, patching, and monitoring.
B. High Availability and Failover
Multi-AZ Deployments: Provides automatic failover to a standby replica in another AZ.
Read Replicas: Improve performance by offloading read queries.
C. Scalability
Vertical Scaling: Increase instance type (CPU, memory).
Horizontal Scaling: Add Read Replicas to handle more traffic.
D. Automated Backups and Snapshots
Automated Backups: AWS automatically takes daily snapshots and stores transaction
logs.
Manual Snapshots: Users can take snapshots for long-term storage.
E. Security
Encryption: Data is encrypted at rest using AWS KMS and in transit using SSL/TLS.
IAM Authentication: Integrate with AWS Identity and Access Management (IAM).
Network Isolation: Deploy RDS in a VPC (Virtual Private Cloud) for better security.
F. Monitoring and Logging
Amazon CloudWatch: Monitors performance metrics.
RDS Performance Insights: Helps analyze database performance.
Enhanced Monitoring: Provides OS-level metrics.
Supported Database Engines
Amazon RDS supports several popular relational databases:
1. Amazon Aurora (AWS’s high-performance database)
2. MySQL
3. PostgreSQL
4. MariaDB
5. Oracle
6. Microsoft SQL Server
7. DB2
RDS Instance Types
RDS provides various instance families optimized for different workloads:
General Purpose (T3, T4g, M5, M6g) – Balanced compute and memory.
Memory Optimized (R5, R6g, X2g) – For database workloads with high memory needs.
Burstable (T3, T4g) – Cost-effective option for workloads with low CPU utilization.
Storage Options
Amazon RDS supports different types of storage:
General Purpose SSD (gp2, gp3) – Balanced price and performance.
Provisioned IOPS SSD (io1, io2) – For high-performance applications.
Magnetic (Deprecated) – Older storage type with lower performance.
Storage Auto-Scaling
RDS can automatically increase storage as needed.
Amazon RDS Backup & Recovery
A. Automated Backups
Enabled by default.
Retention period: 1 to 35 days.
Includes full daily snapshot and transaction logs.
B. Manual Snapshots
Users can create snapshots anytime.
Useful for long-term backups.
C. Point-in-Time Recovery
Restore database to a specific point in time using transaction logs.
High Availability with Amazon RDS
A. Multi-AZ Deployments
Provides disaster recovery by automatically failing over to a standby instance in another
AZ.
B. Read Replicas
Used for scaling read-heavy workloads.
Can be created in the same or different AWS regions.
Security in Amazon RDS
A. Encryption
Data at Rest: AWS KMS (Key Management Service).
Data in Transit: SSL/TLS encryption.
B. Network Security
Use VPC, Subnets, and Security Groups for access control.
Restrict access via IAM policies.
C. IAM Authentication
Users can authenticate using IAM instead of database credentials.
Amazon RDS Pricing
Pricing depends on:
1. Instance Type (General, Memory-Optimized, etc.).
2. Storage Type & Size (GP3, IO2, etc.).
3. Backup Storage.
4. Data Transfer.
AWS offers on-demand and reserved instance pricing to optimize costs.
Amazon RDS Best Practices
1. Use Multi-AZ for Production to ensure high availability.
2. Enable Automated Backups for disaster recovery.
3. Scale Storage and Compute as needed.
4. Optimize Performance using Performance Insights.
5. Use Read Replicas for scaling read-heavy applications.
6. Secure your RDS instance with VPC, IAM, and encryption.
7. Monitor with Amazon CloudWatch to track performance.
Common Use Cases
E-commerce websites using MySQL/PostgreSQL.
Enterprise applications using SQL Server/Oracle.
Data warehousing and analytics.
Mobile and web applications requiring scalable databases.
Amazon RDS vs Other AWS Database Services
Amazon RDS simplifies database management by automating setup,
maintenance, and scaling. It supports major relational databases and offers
features like Multi-AZ, Read Replicas, and automatic backups to ensure
reliability and performance. It is widely used for web applications, enterprise
systems, and data-intensive workloads.