Creating your DB cluster
Use the following procedures to create an Aurora PostgreSQL DB cluster that uses Aurora PostgreSQL Limitless Database.
You can use either the AWS Management Console or the AWS CLI to create your DB cluster that uses Aurora PostgreSQL Limitless Database. You create the primary DB cluster and the DB shard group.
When you use the AWS Management Console to create the primary DB cluster, the DB shard group is also created in the same procedure.
To create the DB cluster using the console
Sign in to the AWS Management Console and open the Amazon RDS console at https://console.aws.amazon.com/rds/
. -
Choose Create database.
The Create database page displays.
-
For Engine type, choose Aurora (PostgreSQL Compatible).
-
For Version, choose Aurora PostgreSQL with Limitless Database (Compatible with PostgreSQL 16.4).
-
For Aurora PostgreSQL Limitless Database:
-
Enter a DB shard group identifier.
Important
After you create the DB shard group, you can't change the DB cluster identifier or the DB shard group identifier.
-
For DB shard group capacity range:
-
Enter the Minimum capacity (ACUs). Use a value of at least 16 ACUs.
For a development environment, the default value is 16 ACUs. For a production environment, the default value is 24 ACUs.
-
Enter the Maximum capacity (ACUs). Use a value of at least 16 ACUs.
For a development environment, the default value is 64 ACUs. For a production environment, the default value is 384 ACUs.
For more information, see Correlating DB shard group maximum capacity with the number of routers and shards created.
-
-
For DB shard group deployment, choose whether to create standbys for the DB shard group:
-
No compute redundancy – Creates a DB shard group without standbys for each shard. This is the default value.
-
Compute redundancy with a single failover target – Creates a DB shard group with one compute standby in a different Availability Zone (AZ).
-
Compute redundancy with two failover targets – Creates a DB shard group with two compute standbys in two different AZs.
Note
If you set the compute redundancy to a nonzero value, the total number of shards will be doubled or tripled. This will incur extra costs.
The nodes in compute standbys are scaled up and down to the same capacity as the writer. You don't set the capacity range separately for the standbys.
-
-
Choose whether to make the DB shard group publicly accessible.
Note
You can't modify this setting after you create the DB shard group.
-
-
For Connectivity:
-
(Optional) Select Connect to an EC2 compute resource, then choose an existing EC2 instance or create a new one.
Note
If you connect to an EC2 instance, you can't make the DB shard group publicly accessible.
-
For Network type, choose either IPv4 or Dual-stack mode.
-
Choose the Virtual private cloud (VPC) and DB subnet group, or use the default settings.
-
Choose the VPC security group (firewall), or use the default setting.
-
-
For Database authentication, choose either Password authentication or Password and IAM database authentication.
-
For Monitoring, make sure that the Turn on Performance Insights and Enable Enhanced Monitoring check boxes are selected.
For Performance Insights, choose a retention time of at least 1 month.
-
Expand the last Additional configuration on the page.
-
For Log exports, make sure that the PostgreSQL log check box is selected.
-
Specify other settings as needed. For more information, see Settings for Aurora DB clusters.
-
Choose Create database.
After the primary DB cluster and DB shard group are created, they're displayed on the Databases page.
When you use the AWS CLI to create a DB cluster that uses Aurora PostgreSQL Limitless Database, you perform the following tasks:
Create the primary DB cluster
The following parameters are required to create the DB cluster:
-
--db-cluster-identifier
– The name of your DB cluster. -
--engine
– The DB cluster must use theaurora-postgresql
DB engine. -
--engine-version
– The DB cluster must use the16.4-limitless
DB engine version. -
--storage-type
– The DB cluster must use theaurora-iopt1
DB cluster storage configuration. -
--cluster-scalability-type
– Specifies the scalability mode of the Aurora DB cluster. When set tolimitless
, the cluster operates as an Aurora PostgreSQL Limitless Database. When set tostandard
(the default), the cluster uses normal DB instance creation.Note
You can't modify this setting after you create the DB cluster.
-
--master-username
– The name of the master user for the DB cluster. -
--master-user-password
– The password for the master user. -
--enable-performance-insights
– You must enable Performance Insights. -
--performance-insights-retention-period
– The Performance Insights retention period must be at least 31 days. -
--monitoring-interval
– The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB cluster. This value can't be0
. -
--monitoring-role-arn
– The Amazon Resource Name (ARN) for the IAM role that permits RDS to send Enhanced Monitoring metrics to Amazon CloudWatch Logs. -
--enable-cloudwatch-logs-exports
– You must exportpostgresql
logs to CloudWatch Logs.
The following parameters are optional:
-
--db-subnet-group-name
– The DB subnet group to associate with the DB cluster. This also determines the VPC associated with the DB cluster. -
--vpc-security-group-ids
– A list of VPC security groups to associate with the DB cluster. -
--performance-insights-kms-key-id
– The AWS KMS key identifier for encryption of Performance Insights data. If you don't specify a KMS key, the default key for your AWS account is used. -
--region
– The AWS Region where you create the DB cluster. It must be one that supports Aurora PostgreSQL Limitless Database.
To use the default VPC and VPC security group, omit the --db-subnet-group-name
and --vpc-security-group-ids
options.
To create the primary DB cluster
-
aws rds create-db-cluster \ --db-cluster-identifier
my-limitless-cluster
\ --engine aurora-postgresql \ --engine-version 16.4-limitless \ --storage-type aurora-iopt1 \ --cluster-scalability-type limitless \ --master-usernamemyuser
\ --master-user-passwordmypassword
\ --db-subnet-group-namemysubnetgroup
\ --vpc-security-group-idssg-c7e5b0d2
\ --enable-performance-insights \ --performance-insights-retention-period31
\ --monitoring-interval5
\ --monitoring-role-arn arn:aws:iam::123456789012
:role/EMrole
\ --enable-cloudwatch-logs-exports postgresql
For more information, see create-db-cluster
Create the DB shard group
Next you create the DB shard group in the DB cluster that you just created. The following parameters are required:
-
--db-shard-group-identifier
– The name of your DB shard group.The DB shard group identifier has the following constraints:
-
It must be unique in the AWS account and AWS Region where you create it.
-
It must contain 1–63 letters, numbers, or hyphens.
-
The first character must be a letter.
-
It can't end with a hyphen or contain two consecutive hyphens.
-
Important
After you create the DB shard group, you can't change the DB cluster identifier or the DB shard group identifier.
-
-
--db-cluster-identifier
– The name of the DB cluster in which you're creating the DB shard group. -
--max-acu
– The maximum capacity of your DB shard group. It must be from 16–6144 ACUs. For capacity limits higher than 6144 ACUs, contact AWS.The initial number of routers and shards is determined by the maximum capacity that you set when you create the DB shard group. The higher the maximum capacity, the greater the number of routers and shards that are created in the DB shard group. For more information, see Correlating DB shard group maximum capacity with the number of routers and shards created.
The following parameters are optional:
-
--compute-redundancy
– Whether to create standbys for the DB shard group. This parameter can have the following values:-
0
– Creates a DB shard group without standbys for each shard. This is the default value. -
1
– Creates a DB shard group with one compute standby in a different Availability Zone (AZ). -
2
– Creates a DB shard group with two compute standbys in two different AZs.
Note
If you set the compute redundancy to a nonzero value, the total number of shards will be doubled or tripled. This will incur extra costs.
The nodes in compute standbys are scaled up and down to the same capacity as the writer. You don't set the capacity range separately for the standbys.
-
-
--min-acu
– The minimum capacity of your DB shard group. It must be at least 16 ACUs, which is the default value. -
--publicly-accessible|--no-publicly-accessible
– Whether to assign publicly accessible IP addresses to the DB shard group. Access to the DB shard group is controlled by the security groups used by the cluster.The default is
--no-publicly-accessible
.Note
You can't modify this setting after you create the DB shard group.
To create the DB shard group
-
aws rds create-db-shard-group \ --db-shard-group-identifier
my-db-shard-group
\ --db-cluster-identifier my-limitless-cluster \ --max-acu1000