Skip to content

Instantly share code, notes, and snippets.

@daleobrien
Last active April 23, 2022 01:04
Show Gist options
  • Save daleobrien/56a56229d49f3e4fccc3caf7d26ca3d1 to your computer and use it in GitHub Desktop.
Save daleobrien/56a56229d49f3e4fccc3caf7d26ca3d1 to your computer and use it in GitHub Desktop.
# Create a RDS database using the new V2 Serverless engine
aws rds create-db-cluster \
--db-cluster-identifier serverless-v2-cluster \
--region ap-southeast-2 \
--availability-zones ap-southeast-2a ap-southeast-2b ap-southeast-2c \
--engine aurora-postgresql \
--engine-version 13.6 \
--storage-encrypted \
--master-username postgresql \
--master-user-password aPasswordHereOfSomeKind \
--serverless-v2-scaling-configuration MinCapacity=0.5,MaxCapacity=2 \
--vpc-security-group-ids sg-XXXXXXXXXXX
aws rds create-db-instance \
--db-cluster-identifier serverless-v2-cluster \
--db-instance-identifier serverless-v2-instance-1 \
--region ap-southeast-2 \
--db-instance-class db.serverless \
--engine aurora-postgresql
aws rds create-db-instance \
--db-cluster-identifier serverless-v2-cluster \
--db-instance-identifier serverless-v2-instance-2 \
--region ap-southeast-2 \
--db-instance-class db.serverless \
--engine aurora-postgresql
# For jump box
amazon-linux-extras enable postgresql13
yum clean metadata && yum install postgresql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment