AWS Certified Developer - Associate
Databases
Aurora Demo
In this lesson, we demonstrate how to create an Aurora cluster using the AWS RDS console. Follow this step-by-step guide to learn how to deploy an Aurora database, configure its settings, and manage cluster operations.
Step 1: Launching the Database Creation Process
Begin by navigating to the RDS page and clicking on Databases. Next, click Create Database. Under engine options, choose Aurora by selecting one of the compatible database engines.
Step 2: Choosing Your Database Engine
Aurora supports both MySQL and PostgreSQL compatibility. Select your preferred engine and choose the specific version you require. For instance, you can choose from PostgreSQL versions such as 15.4, 15.3, 15.2, etc.
For this demonstration, the default version is selected. Then, choose a template for database deployment. Options include a production template or a dev/test environment. In this example, we select the production deployment template.
Step 3: Setting Up Database Credentials
Enter a name for your database (for example, "Database Aurora Example") and set your credentials. You can use the provided master username and decide between letting Secrets Manager generate a password or manually inputting one. In the demonstration, we manually input the password.
Step 4: Configuring Cluster Storage Options
Choose from the following storage options based on your application needs:
- Aurora Standard: An economical choice.
- Aurora Optimized: Best for I/O-intensive applications.
For this demo, select Aurora Standard.
Step 5: Instance Configuration
Determine the type of EC2 instance that will back your database. Your options include:
- Serverless: For Aurora Serverless v2 (set minimum and maximum Aurora Capacity Units).
- Non-serverless options: Memory-optimized, burstable, or read-optimized classes.
In this example, select burstable classes and choose "db.t3.medium" as a cost-effective option. Previous generation classes may also be visible.
Step 6: Availability and High Availability Setup
Select whether to establish an Aurora replica or a separate reader node in a different Availability Zone. For high availability, enable the multi-AZ deployment option.
Step 7: Network and Security Settings
Configure your network settings as follows:
- Network Type: Choose IPv4 or dual stack (IPv4 and IPv6).
- VPC: Use the default VPC for this example.
- Subnet Group: Select the appropriate subnet group across Availability Zones.
- Public Accessibility: Enable only if necessary for demonstration (avoid in production environments).
Select or create a security group as needed, and consider adding an RDS proxy if required. In the Additional Configurations section, specify the listening port (default for PostgreSQL is typically used) and choose the authentication method (e.g., IAM or Kerberos).
Step 8: Enabling Monitoring and Performance Options
Within the Monitoring section, you can enable Performance Insights. Note that enabling additional features such as DevOps Guru may incur extra costs.
Step 9: Additional Configuration Settings
In this section, you can further configure:
- Extra Database Name: Defaults to the engine name (e.g., PostgreSQL).
- Parameter Group: Select the appropriate group.
- Backup Retention Period: Defaults to seven days.
- Encryption and Maintenance Options: Set based on your requirements.
- Deletion Protection: Enable to prevent accidental deletion.
The console provides an estimated monthly cost, which in this example is approximately $59.96.
Once all configurations are complete, click Create Database to start the Aurora cluster creation process.
Step 10: Accessing and Navigating the Cluster
After creation, your database "Database Aurora Example" appears with two instances:
- Writer Instance: For forwarding write requests.
- Reader Instance: For forwarding read requests.
Selecting the "Database Aurora Example" cluster reveals two endpoints: the writer endpoint for write operations and the reader endpoint for read operations. Additionally, clicking on an individual instance shows a direct endpoint along with detailed EC2 and networking information.
Step 11: Managing Cluster Operations
From the main cluster view, you can perform a range of actions, including:
- Adding another reader.
- Creating a blue-green deployment.
- Taking and restoring snapshots.
- Exporting data to S3.
- Adding a replica for autoscaling.
Step 12: Deleting the Aurora Cluster
For demonstration purposes, follow these steps to delete the Aurora cluster:
Navigate to Actions. You might notice that deletion is disabled because instances must be deleted individually first.
Delete each instance. If prompted, disable deletion protection for the final instance by following these steps:
Note
- Go to the main cluster and select Configuration.
- Under Protection settings, disable deletion protection.
- Click Continue and then Modify Cluster to apply the changes immediately.
- After modification, delete the instance and then proceed to delete the entire database cluster.
- When prompted, choose not to create a final snapshot if not needed, and confirm by selecting Delete Database Cluster.
Once the deletion process is complete, notifications will appear on the Amazon RDS dashboard confirming the changes.
Conclusion
This lesson provided a comprehensive guide to setting up and managing an Aurora cluster on AWS RDS. By following these steps, you can deploy, configure, and manage your Aurora database with ease.
For more detailed information on AWS RDS and Aurora, explore the official AWS Documentation.
Watch Video
Watch video content