RDS

Updated: 2023-09-01
3 min read
Aws , Rds
[aws rds]

About

  • Relational Database Service
  • Managed DB service that uses SQL as query language

Amazon Relational Database Service (Amazon RDS) is a collection of managed services that makes it simple to set up, operate, and scale databases in the cloud.

Supports engines:

  • Amazon Aurora with MySQL compatibility: 5432
  • Amazon Aurora with PostgreSQL compatibility: 5432
  • MySQL: 3306
  • MariaDB: 3306
  • PostgreSQL: 5432
  • Oracle: 1521
  • SQL Server: 1433

Engine modes:

Used in CreateDBCluster

  • global
  • parallelquery
  • serverless
  • multimaster

Backups

  • Backups are enabled by default in RDS

Automated backups

  • Daily full backup (during maintenance window)
  • Backups of transaction logs (every 5 minutes)
  • 7 days retention (can increase upto 35)

DB Snapshots

  • Manually triggered by the user
  • Can retain backup as long as you want

Auto scaling

  • When RDS detects you’re running out of space, it scales automatically

Digest

  • To verify slowly running queries enable slow query log.
  • TDE (Transparent data encryption) supports encryption on Microsoft SQL server
  • AWS Systems Manager Parameter Store provides secure, hierarchical storage for confiquration data management and secrets management. You can store data such as passwords, database strings, Amazon Machine Image (AMI) IDs, and license codes as parameter values
  • AWS Secrets Manager is an AWS service that can be used to securely store, retrieve, and automatically rotate database credentials. AWS Secrets Manager has built-in integration for RDS databases.

Price

Current price

Use Cases

Type: Relational

This type services: Aurora, Redshift, RDS

Ecommerce websites, Traditional sites etc.

Amazon Relational Database Service (Amazon RDS) on [AWS Outposts](AWS Outposts) allows you to deploy fully managed database instances in your on-premises environment

Questions

Q1

Explain RDS Multi Availability Zone

Explanation
  • RDS multi AZ used mainly for disaster recovery purposes
  • There is an RDS master instance and in another AZ an RDS standby instance
  • The data is synced synchronously between them
  • The user, application is accessing one DNS name and where there is a failure with the master instance, the DNS name moves to the standby instance, so the failover done automatically

Q2

A company is migrating a legacy application to Amazon EC2. The application uses a username and password stored in the source code to connect to a MySQL database. The database will be migrated to an Amazon RDS for MySQL DB instance. As part of the migration, the company wants to implement a secure way to store and automatically rotate the database credentials.

Which approach meets these requirements?

  1. Store the database credentials in environment variables in an Amazon Machine Image (AMI). Rotate the credentials by replacing the AMI.
  2. Store the database credentials in AWS Systems Manager Parameter Store. Configure Parameter Store to automatically rotate the credentials.
  3. Store the database credentials in environment variables on the EC2 instances. Rotate the credentials by relaunching the EC2 instances.
  4. Store the database credentials in AWS Secrets Manager. Configure Secrets Manager to automatically rotate the credentials
Explanation

AWS Secrets Manager

Secrets Manager offers secret rotation

4

Q3

Explain RDS Multi Availability Zone

Explanation
  • RDS multi AZ used mainly for disaster recovery purposes
  • There is an RDS master instance and in another AZ an RDS standby instance
  • The data is synced synchronously between them
  • The user, application is accessing one DNS name and where there is a failure with the master instance, the DNS name moves to the standby instance, so the failover done automatically