Catalog / Amazon Aurora Cheatsheet
Amazon Aurora Cheatsheet
A comprehensive guide to Amazon Aurora, covering its architecture, features, SQL commands, and best practices for optimal database management and performance.
Aurora Fundamentals
Overview
Amazon Aurora is a fully managed, MySQL- and PostgreSQL-compatible, relational database engine. It combines the performance and availability of high-end commercial databases with the simplicity and cost-effectiveness of open-source databases. |
Key features include: automatic storage scaling, low-latency read replicas, point-in-time recovery, and continuous backup to Amazon S3. |
Aurora is designed to offer up to five times better performance than standard MySQL and up to three times better performance than standard PostgreSQL. |
Architecture
Storage Layer: |
Data is replicated across multiple Availability Zones (AZs) for enhanced durability and availability. |
Compute Layer: |
Consists of the database instances (primary and replicas) that perform the actual query processing. |
Networking: |
Uses the AWS network infrastructure for communication between the storage and compute layers, and for client access. |
Key Benefits
|
SQL Commands & Operations
Common SQL Commands
|
Creates a new database. |
|
Selects a database to use. |
|
Creates a new table in the selected database. |
|
Inserts data into a table. |
|
Retrieves data from a table. |
|
Updates existing data in a table. |
|
Deletes data from a table. |
Aurora-Specific SQL Extensions
Aurora introduces some extensions to standard SQL to enhance performance and manageability. These extensions are mostly related to parallel query execution and monitoring. |
Examples include:
|
Working with Read Replicas
Aurora allows you to create read replicas to offload read traffic from the primary instance. Read replicas can be created in different AZs or regions for disaster recovery. |
To promote a read replica to a standalone instance (failover), use the AWS Management Console or AWS CLI. |
Management and Monitoring
Using AWS Management Console
The AWS Management Console provides a graphical interface for managing Aurora clusters. You can use it to create, modify, and delete clusters, instances, and snapshots. |
Key tasks include:
|
AWS CLI Commands
|
Creates a new Aurora instance. |
|
Modifies an existing Aurora instance. |
|
Deletes an Aurora instance. |
|
Creates a new Aurora cluster. |
|
Describes Aurora instances. |
Monitoring with CloudWatch
Amazon CloudWatch provides metrics for monitoring the performance and health of your Aurora clusters. Key metrics include CPU utilization, memory usage, disk I/O, and database connections. |
Set up CloudWatch alarms to receive notifications when certain metrics exceed predefined thresholds. |
Best Practices
Performance Optimization
|
Security Best Practices
|
High Availability and Disaster Recovery
|