Intro #
In short, RDS or Relational Database Service is a datbase server managed by AWS in the cloud. RDS offers both open source (MySQL, MariaDB, PostgreSQL) and commercial database server (Oracle Datbase, SQL Server) as a service.
By default, RDS will set up automatic backup and database snapshot.
You can also deploy RDS in multiple AZ, which provides high-availability for your database. In multiple AZ deployment, RDS will automatically sync replicates to a standby RDS instance in different AZ.
You can also create read-only replica of RDS for ready-heavy database workloads.
Provision Amazon RDS #
- In the AWS console, type
database
and selectAurora and RDS
- Select the
Databases
menu and clickCreate database
- Select the
Standard create
method, especially for customizing your database configurations - Select your database engine, for example
MariaDB
- Select the
Engine version
for your database - Select the template that yiu want to use:
- Production
- Dev/Test
- Free Tier
- enter your RDS name in the
DB instance identifier
- For the credentials settings:
- Master username: enter or leave it as edefault
admin
- Credentials Management: use
Self managed
for testing only - Master password: Enter your password and repeat
- Master username: enter or leave it as edefault
- Move to the
Instance configurations
- Select Burstable classes
- Select the instance type for your RDS
- For storage type
gp3
and allocate the storage to20 GB
- For the
VPC
andDB Subnet
, you can use default or custom isolated VPC - Public access to no and VPC Security Group to Choose existing
- On the
Additional storage configuration
- Check the Enable storage autoscaling
- On the
Availability and durability
, select theCreate standby instance
option - Disable the
Performance Insight
andEnhanced Monitoring
- In the
Additional configuration
, configure the following
- Initial database name: You must enter the database name for your application. RDS does not create database by default
- DB parameter group and option group: You can leave it as default
- Check the
Enable automatic backup
and select theBackup interval
- Check the
Enable enryption
to enable encryption of your database at rest - In the
Maintenance
section
- Uncheck the
Enable auto minor update
- Select No preference on the
Maintenance window
- Review the cost for your database monthly and click
Create database
The database instance will be created within 5-10 minutes. Make sure to click the reload
button to check the status until Available
.
Create Read-Replicate in Amazon RDS #
- From your console, go to the
Aurora and RDS
section, then clickDatabases
- Click your database instance to get details
- Within your database instance details, click
Action
and selectCreate read replica
- Select your main RDS that you want to create as replica and configure details as on top
The read-replica will be created within 5-10 minutes.
Migrate with DMS (Database Migration Service) #
You can also migrate your database to AWS RDS via DMS or Database Migration Service.