Study guide
Technical reference and lesson notes
AWS RDS MySQL: Create, Monitor, Back Up, and Delete a Database
Purpose of This Lesson
This hands-on lesson demonstrates the basic lifecycle of an Amazon RDS MySQL database: creating a DB instance, identifying the information an application needs to connect, reviewing monitoring and operational data, examining backups and snapshots, considering read replicas, and deleting the instance safely.
The workflow uses a small test database and the AWS Management Console. The configuration choices are suitable for a quick lab, not for production.
Key Concepts
- Amazon RDS DB instance: A managed relational database deployment. The lab creates a MySQL instance using the Standard create workflow.
- Free tier configuration: The lab selects the Free tier option and reduces allocated storage to 20 GB to minimize the test configuration.
- DB identifier: The name assigned to the database instance. The example identifier is
sample-db. - Endpoint and port: Applications need the RDS endpoint and database port to connect. MySQL uses port
3306. - Network placement: The instance is launched in a VPC, Availability Zone, subnet group, and selected subnets. Its VPC security groups control network access.
- Monitoring: RDS exposes metrics such as CPU utilization, database connections, storage and memory information, read and write IOPS, and read and write latency.
- Enhanced monitoring: An optional monitoring capability that can collect additional metrics when supported by the DB instance type.
- Logs and events: The console provides recent database events and logs, including MySQL error and upgrade logs in the lab.
- Automated backups: Automated backups are enabled in the example with a seven-day retention period.
- Manual snapshots: A manual snapshot can be created on demand and appears separately from system snapshots taken by AWS.
- Read replicas: A read replica can be configured in the same Region or a separate Region, with options to adjust instance class, storage, connectivity, and authentication.
- Final snapshot on deletion: Deleting an RDS instance can prompt for a final snapshot. The lab deliberately chooses not to create one.
RDS MySQL Lifecycle and Operational Context
1. Create the DB instance
The lab uses the following general sequence:
- Open RDS and choose Databases.
- Choose Create database and use the Standard create option.
- Select MySQL as the engine.
- Select the Free tier template.
- Set a DB identifier such as
sample-db. - Set the master username, using
adminin the example. - Configure a password.
- Leave the DB instance class at its available default and reduce storage to 20 GB for the test.
- Leave the remaining settings at their defaults and create the database.
Creation takes several minutes. The instance must reach an Available state before its endpoint and other operational details can be used.
> Security note: The lesson uses a deliberately simple password for a temporary test. Do not use a weak, exposed, or hard-coded password for a real workload. The lesson indicates that a secret can be created in AWS Secrets Manager after the database is available.
2. Gather application connectivity information
After selecting the DB identifier, review the database details. The most important connection values include:
- Endpoint: The DNS address applications use to reach the database.
- Port:
3306for MySQL. - VPC and Availability Zone: The network location of the DB instance.
- DB subnet group and subnets: The subnets associated with the database placement.
- VPC security groups: The network controls that must permit the required database traffic.
A client or application connecting from an EC2 environment must be able to reach the RDS instance through the relevant VPC networking and security group rules. The security group associated with the database must allow the appropriate source to access TCP port 3306.
3. Monitor health and performance
The RDS monitoring view provides metrics useful for baseline checks and troubleshooting, including:
- CPU utilization
- Database connections
- Storage and memory-related information
- Read IOPS and write IOPS
- Read latency and write latency
RDS also exposes logs and events. Events show lifecycle activity such as instance creation and startup. Logs can be viewed in the console or watched and downloaded; the lab shows MySQL error and MySQL upgrade logs. CloudWatch alarms can be created from the monitoring and events area.
4. Review configuration, maintenance, and backups
The Configuration area displays the current settings. Changes are initiated through the Modify action rather than by editing individual fields directly in the view.
The Maintenance and backups areas show operational settings such as:
- Whether automatic minor version upgrades are enabled
- The configured maintenance window
- Pending maintenance and pending modifications
- Automated backup status
- Backup retention, which is seven days in the lab
- The backup target Region, shown as US East (N. Virginia) in the example
Manual snapshots are available from the instance actions or the Snapshots section. The Snapshots section distinguishes manual snapshots from system snapshots taken by AWS. It also provides views for snapshots shared with the account and public snapshots.
5. Evaluate optional actions
The instance Actions menu includes several lifecycle and architecture operations, including stopping, rebooting, deleting, setting up EC2 connections, converting to Multi-AZ, creating a read replica, taking a snapshot, restoring to a point in time, migrating a snapshot, and creating a blue/green deployment where applicable.
The available action does not necessarily mean every option is valid for every configuration. For example, the lesson notes that Multi-AZ requires an appropriate DB instance type, and an Aurora replica is not applicable to this non-Aurora MySQL instance.
6. Delete the test database
For a disposable lab resource:
- Choose Delete for the DB instance.
- Decide whether to create a final snapshot.
- Decide whether automated backups should be retained.
- Acknowledge the deletion warning.
- Type
delete mewhen prompted.
The lab chooses neither a final snapshot nor retention of automated backups, so the instance and associated retained data are removed. This is appropriate only when the database is disposable and no recovery is required.
Exam- or Assessment-Relevant Takeaways
- When an application needs to connect to RDS, identify the endpoint, the engine-specific port, and the network controls governing access.
- For MySQL, the port shown in the lesson is 3306.
- An RDS instance is associated with a VPC, Availability Zone, DB subnet group, subnets, and VPC security groups.
- Use RDS metrics such as CPU, connections, IOPS, and latency to investigate resource use and performance.
- Distinguish automated backups, manual snapshots, and system snapshots when considering recovery and lifecycle operations.
- A read replica can be configured in the same Region or a different Region, with destination configuration choices available during creation.
- Multi-AZ, read replicas, Aurora-specific options, and blue/green deployments are distinct capabilities; do not assume that an action applies to every engine or instance configuration.
- Deletion requires an explicit confirmation workflow. The final-snapshot and automated-backup-retention choices determine whether recovery artifacts remain.
- A lab password is not a production credential-management pattern. The lesson’s workflow places Secrets Manager after the database becomes available, but it does not detail the secret configuration steps.
Tool / Feature Decision Guide
| Need or situation | Appropriate RDS feature or action | Decisive consideration |
|---|---|---|
| Connect an application to the database | Endpoint, port, VPC networking, and security group rules | The application must be able to reach the endpoint on the MySQL port, 3306 in this lesson. |
| Inspect database behavior | Standard RDS monitoring metrics | Review CPU, connections, storage or memory information, IOPS, and latency. |
| Collect additional monitoring data | Enhanced monitoring | Confirm that the DB instance type supports the capability. |
| Investigate lifecycle or database activity | Logs and events | Events show state changes; logs can be viewed, watched, or downloaded. |
| Recover from a point in time | Restore to a point in time using available automated-backup data | Automated backup retention and the required recovery window matter. |
| Preserve a chosen database state | Manual snapshot | Create it on demand and name it for later identification. |
| Offload read traffic or create a replica in another location | Read replica | Choose same-Region or cross-Region placement and review instance, storage, connectivity, and authentication settings. |
| Delete a disposable lab instance | Delete without a final snapshot or retained automated backups | Use only when the data is no longer needed. |
| Delete a valuable or recoverable workload | Review final snapshot and automated-backup retention before confirming | Recovery requirements should determine what is retained. |
| Change database configuration | The Modify action | Configuration changes are initiated from the modification workflow. |
Common Traps / Misconceptions
- Confusing the endpoint with the port: The endpoint is the database address;
3306is the MySQL port. - Assuming the endpoint alone guarantees connectivity: VPC placement, subnet configuration, and VPC security group rules also matter.
- Treating monitoring as a single metric: CPU can look normal while connections, IOPS, or latency indicate a problem.
- Equating automated backups with manual snapshots: They are separate recovery mechanisms with different lifecycle views and controls.
- Assuming every action applies to every engine: Aurora-specific options do not apply to a standard MySQL instance, and some capabilities require suitable instance types.
- Deleting before checking recovery choices: Choosing not to create a final snapshot and not to retain automated backups removes recovery options for the lab database.
- Using a lab password in production: The example password is intentionally insecure and should not be copied into a real environment.
- Assuming creation is immediate: The instance must finish provisioning and become available before normal connection and management activities can proceed.
Real-World Engineer / Analyst Notes
- Capture the endpoint, port, VPC, subnet group, and security group details when handing connectivity information to an application team.
- Validate the source of database traffic before opening port
3306; the lesson establishes the need for an appropriate security group rule but does not define a universal rule for every architecture. - Use the metrics view to establish a baseline before diagnosing performance changes. Connections, IOPS, and latency can provide context that CPU alone cannot.
- Treat maintenance windows, minor version upgrades, automated-backup retention, and pending modifications as part of operational planning rather than incidental console settings.
- Use descriptive names for manual snapshots so their purpose and timing are clear.
- Before deleting a database, explicitly document whether a final snapshot or retained automated backups are required. A convenient lab cleanup decision can be destructive in a production account.
- Keep credentials out of scripts and notes. The lesson points toward AWS Secrets Manager, but the exact secret design and rotation process must be planned separately.
Quick Reference Summary
- Engine: MySQL
- Example DB identifier:
sample-db - MySQL port:
3306 - Creation template: Standard create with the Free tier option
- Example storage: 20 GB
- Connection prerequisites: Endpoint, port, network reachability, and suitable VPC security group access
- Useful metrics: CPU, database connections, storage or memory information, read/write IOPS, and read/write latency
- Operational views: Configuration, maintenance, backups, logs, events, and snapshots
- Backup example: Automated backups enabled with seven-day retention
- Replica scope: Same Region or separate Region can be selected during read-replica creation
- Deletion confirmation: Type
delete me - Lab cleanup choice: No final snapshot and no retained automated backups
Flashcards
Q: An application team asks for the minimum RDS information needed to begin a MySQL connection. What should you provide first?
A: Provide the RDS endpoint and MySQL port, 3306, then verify that VPC networking and the database VPC security group permit the application’s traffic.
Q: Which RDS view would you inspect first if database latency increased and CPU did not change significantly?
A: Inspect read and write latency together with read and write IOPS, database connections, and other available resource metrics. CPU alone may not explain the performance change.
Q: When would you choose a manual snapshot instead of relying only on automated backups?
A: Create a manual snapshot when you want an on-demand, explicitly named preservation point, such as before a planned change or for a disposable instance that may be deleted.
Q: What is the key difference between an automated backup and a manual snapshot in this lesson?
A: Automated backups follow the configured retention period, while manual snapshots are created on demand and appear in the manual snapshot view. The console also distinguishes system snapshots taken by AWS.
Q: A read replica must be deployed outside the source database’s Region. Which choice is relevant during replica creation?
A: Select a destination Region different from the source Region. The replica workflow also allows review of instance class, storage, connectivity, and authentication settings.
Q: What is the trap when the Actions menu displays an Aurora replica option for a standard MySQL instance?
A: The presence of an action in the menu does not mean it applies to the selected database. Aurora-specific replica behavior is not applicable to the non-Aurora MySQL instance used in the lesson.
Q: Where do you initiate a change to the RDS instance configuration?
A: Use the Modify action. The configuration page displays settings, while the modification workflow is used to change them.
Q: What network components should be reviewed when an EC2-based application cannot reach RDS?
A: Review the RDS VPC placement, subnet group and subnets, endpoint and port, and the VPC security group rules governing access to MySQL port 3306.
Q: What does enhanced monitoring add to the basic monitoring workflow?
A: It provides additional metrics when the DB instance type supports it. It is an optional capability rather than a requirement for viewing the standard RDS metrics.
Q: Before deleting an important RDS instance, which two retention decisions must be made?
A: Decide whether to create a final snapshot and whether to retain automated backups. These choices determine whether recovery artifacts remain after deletion.
Q: What confirmation string is required in the deletion workflow shown in the lesson?
A: The deletion confirmation requires typing delete me after acknowledging the deletion choices.
Practice Questions
Question 1
A team has created an RDS MySQL instance and an EC2 application in the same general environment. The application cannot connect. Which investigation is most directly aligned with the lesson?
A. Change the RDS engine from MySQL to Aurora immediately
B. Check the RDS endpoint, use port 3306, and verify the database security group permits the application’s traffic
C. Create a manual snapshot and retry the connection
D. Enable automatic minor version upgrades
Correct answer: B
The decisive clues are that the application needs the endpoint and MySQL port, and the VPC security group must allow the required access.
Question 2
An engineer wants to preserve the current state of a test database before experimenting with configuration changes. Which action best matches the available RDS workflow?
A. Create a manual snapshot and give it a descriptive name
B. Delete the instance without retaining backups
C. Review only the recent events list
D. Change the maintenance window
Correct answer: A
A manual snapshot is an on-demand preservation point and can be named for later identification.
Question 3
A database administrator wants a read replica in another AWS Region and wants to review the replica’s storage and instance class during setup. Which action should be selected?
A. Create a system snapshot
B. Open the read-replica creation workflow and select a destination Region
C. Use the enhanced monitoring settings
D. Delete the source database and restore it in the destination Region
Correct answer: B
The read-replica workflow supports choosing a separate Region and reviewing instance class, storage, connectivity, and authentication options.
Question 4
A lab database is confirmed to be disposable, and the learner wants all associated recovery data removed. Which deletion choices match the demonstrated cleanup procedure?
A. Create a final snapshot and retain automated backups
B. Create a final snapshot but disable deletion confirmation
C. Do not create a final snapshot, do not retain automated backups, acknowledge deletion, and type delete me
D. Stop the instance and leave it indefinitely
Correct answer: C
The lab intentionally removes the instance without a final snapshot or retained automated backups, then confirms deletion using delete me. This choice is appropriate only when recovery is not required.
WordPress Metadata
Suggested Slug:
aws-rds-mysql-create-monitor-backup-delete
Meta Description:
Study how to create and manage an Amazon RDS MySQL database, inspect connectivity and monitoring data, use backups and snapshots, evaluate replicas, and safely delete the instance.
Tags:
AWS RDS, Amazon MySQL, AWS CloudOps, RDS monitoring, RDS backups, RDS snapshots, RDS read replicas, AWS security groups, AWS Secrets Manager, AWS Certified CloudOps Engineer