aws-aurora

Manage Amazon Aurora relational database clusters via AWS CLI

TLDR

Create an Aurora MySQL cluster
$ aws rds create-db-cluster --db-cluster-identifier [my-cluster] --engine aurora-mysql --master-username [admin] --master-user-password [password]
Create an Aurora PostgreSQL cluster
$ aws rds create-db-cluster --db-cluster-identifier [my-cluster] --engine aurora-postgresql --master-username [admin] --master-user-password [password]
Create a database instance in the cluster
$ aws rds create-db-instance --db-instance-identifier [my-instance] --db-cluster-identifier [my-cluster] --engine aurora-mysql --db-instance-class [db.r5.large]
List Aurora clusters
$ aws rds describe-db-clusters --query "DBClusters[?Engine=='aurora-mysql' || Engine=='aurora-postgresql']"
Create a cluster snapshot
$ aws rds create-db-cluster-snapshot --db-cluster-identifier [my-cluster] --db-cluster-snapshot-identifier [my-snapshot]
Delete an Aurora cluster
$ aws rds delete-db-cluster --db-cluster-identifier [my-cluster] --skip-final-snapshot

SYNOPSIS

aws rds command [options]

DESCRIPTION

aws rds commands manage Amazon Aurora, a MySQL and PostgreSQL-compatible relational database built for the cloud. Aurora commands operate under the RDS service namespace rather than a separate Aurora namespace.Aurora clusters consist of a primary writer instance and up to 15 read replicas. Create the cluster first with create-db-cluster, then add instances with create-db-instance. Aurora handles replication automatically across Availability Zones.Aurora Serverless (engine-mode serverless) automatically scales capacity based on demand. Aurora I/O-Optimized (storage-type aurora-iopt1) provides predictable pricing for I/O-intensive workloads.Use --manage-master-user-password to have AWS Secrets Manager automatically manage the master password instead of specifying it directly.

PARAMETERS

create-db-cluster

Create a new Aurora DB cluster
create-db-instance
Create a database instance in a cluster
describe-db-clusters
List DB clusters and their details
modify-db-cluster
Modify cluster configuration
delete-db-cluster
Delete an Aurora cluster
create-db-cluster-snapshot
Create a manual snapshot of a cluster
restore-db-cluster-from-snapshot
Restore a cluster from a snapshot
create-db-cluster-endpoint
Create a custom endpoint for read replicas
failover-db-cluster
Force a failover to a replica
--db-cluster-identifier name
Unique identifier for the cluster
--engine type
Database engine: aurora-mysql, aurora-postgresql
--engine-version version
Specific engine version
--master-username name
Master user account name
--master-user-password password
Master user password (or use --manage-master-user-password)
--db-instance-class class
Instance type (db.r5.large, db.r6g.xlarge, etc.)
--db-subnet-group-name name
Subnet group for the cluster
--vpc-security-group-ids ids
Security groups for network access
--engine-mode mode
provisioned or serverless.
--serverless-v2-scaling-configuration config
Min/max ACU capacity for Aurora Serverless v2.
--storage-type type
Storage type: aurora (standard) or aurora-iopt1 (I/O-Optimized).
--manage-master-user-password
Let AWS Secrets Manager manage the master password.
--skip-final-snapshot
Skip creating a final snapshot when deleting a cluster.

INSTALL

sudo dnf install aws
sudo pacman -S aws-cli
sudo apk add aws-cli
sudo zypper install aws-cli

CAVEATS

Creating a cluster does not automatically create instances; you must add them separately. Deleting a cluster without --skip-final-snapshot requires specifying a final snapshot identifier. VPC, subnet groups, and security groups must be configured before cluster creation.

HISTORY

Amazon Aurora was announced at AWS re:Invent 2014 and became generally available in July 2015. It was designed to provide MySQL compatibility with significantly improved performance and availability. Aurora PostgreSQL followed in 2017, and Aurora Serverless launched in 2018 for variable workloads.

SEE ALSO

aws(1), aws-rds(1), mysql(1), psql(1)