Question: How can I create an Aurora PostgreSQL-Compatible global database?

I want to create an Amazon Aurora PostgreSQL-Compatible Edition global database.

Short descriptionAurora global databases are used for globally distributed applications. These databases can span multiple AWS Regions, which allows you to have a read-only secondary DB cluster located in another Region to support local reads. Aurora global databases also provide a fast recovery mechanism in the case of an AWS Region failure.Use these methods to create an Aurora PostgreSQL-Compatible global database:Create an Aurora PostgreSQL-Compatible global database using the AWS ConsoleCreate an Aurora PostgreSQL-Compatible global database using an existing Aurora ClusterMigrate an Amazon Relational Database Service (Amazon RDS) for PostgreSQL snapshot to an Aurora PostgreSQL-Compatible global databaseMigrate an Amazon RDS for PostgreSQL database to an Aurora PostgreSQL-Compatible global database

ResolutionNote: If you receive errors when running AWS Command Line Interface (AWS CLI) commands, make sure that you’re using the most recent AWS CLI version.Before creating an Aurora PostgreSQL-Compatible global database:Review the supported engines and Region availability.Review the limitations of Aurora global databases.Review the configuration requirements for Aurora global databases.Create an Aurora PostgreSQL-Compatible global database using the AWS ConsoleOpen the Amazon RDS console in your primary Region.Choose Create database.For Database creation method, choose Standard create.For Engine type, choose Amazon Aurora.For Edition, choose Amazon Aurora PostgreSQL-Compatible Edition.Under filters, turn on Show versions that support the global database feature.In the Available versions dropdown list, choose the version of PostgreSQL that you want to use.Depending on your use case, for Templates, choose Production or Dev/Test.In the Settings section, for DB cluster identifier, enter the name of your primary DB cluster. For Master user name, enter the default master user for PostgreSQL or enter your own user name.In the Instance configuration section, choose a DB instance class.In the Availability durability section, it's a best practice that you choose to create an Aurora replica in a different AZ. If you don't choose that option, you can create the read replica at a later stage.In the Connectivity section, choose the options that you want to use. Also select the VPC, DB Subnet group, and VPC Security group that you want to use.Under Additional configuration you can specify the database port. The default port is 5432.Under Database authentication, by default password authentication is used. You can optionally turn on IAM database authentication, Kerberos authentication, or both for your database.In the Database options section, enter the Initial Database name. Choose the DB cluster parameter group, DB parameter group, and Failover priority. Review the Backup, Encryption, Maintenance, and Deletion Protection options.Choose Create database. When the cluster is ready to use, the status of the cluster, writer, and replica nodes change to Available.An Aurora PostgreSQL global database needs at least one secondary Aurora DB cluster in a different AWS Region than the primary Aurora DB cluster. You can attach up to five secondary DB clusters to your Aurora PostgreSQL global database. Choose the Aurora PostgreSQL database that you created. From the Actions dropdown list, choose Add AWS Region.On the Add a Region page, enter the name for your global database, and choose the secondary Region. Review and complete the rest of the information for the Aurora cluster in the new Region.Note: The names you choose for each of your Aurora DB clusters must be unique, across all AWS Regions. You can't use the same name for different Aurora DB clusters even though they're in different Regions.Click on the Add Region button.Create an Aurora PostgreSQL-Compatible global database using an existing Aurora ClusterOpen the Amazon RDS console in your primary Region.In the Resources section, choose DB Instances.Choose the existing Aurora PostgreSQL cluster that you want to use.From the Actions dropdown list, choose Add AWS Region.On the Add a Region page, enter the name for your global database, and then choose the secondary Region.Choose Add Region.Migrate an RDS for PostgreSQL snapshot to an Aurora PostgreSQL-Compatible global databaseOpen the Amazon RDS console in your primary Region.From the navigation pane, choose Snapshots.Choose the RDS for PostgreSQL snapshot that you want to migrate.Choose Actions, and from the dropdown list choose Migrate Snapshot.On the Migrate database page, for Migrate to DB engine choose aurora-postgresql.Choose the Migrate button. This creates an Aurora PostgreSQL-Compatible cluster from the RDS for PostgreSQL snapshot.After the Aurora PostgreSQL-Compatible cluster is created, from the navigation pane, choose Databases.Choose the migrated Aurora PostgreSQL-Compatible cluster.From the Actions dropdown list, choose Add AWS Region.On the Add a Region page, enter the name for your global database, and then choose the secondary Region.Choose Add Region.Migrate an RDS for PostgreSQL database to an Aurora PostgreSQL-Compatible global databaseOpen the Amazon RDS console in your primary Region.From the navigation pane, choose Databases.Choose the RDS for PostgreSQL database that you want to convert.From the Actions dropdown list, choose Create Aurora read replica.On the Create Aurora read replica page review and complete all fields, and then choose Create read replica.After creating the Aurora read replica, you can now promote the Aurora read replica.Note: Before promoting the replica, make sure that the RDS for PostgreSQL database doesn't have any activity. Confirm also that the replica lag is zero.Choose the Aurora read replica that you created.From the Actions dropdown list, choose promote.After the promotion process, the Aurora replica cluster becomes a Regional Aurora DB cluster with a writer instance. Choose the newly promoted Regional Aurora DB cluster.From the Actions dropdown list, choose Add AWS Region.On the Add a Region page, enter the name for your global database, and then choose the secondary Region.Choose Add Region.Create a headless Aurora DB Cluster in a secondary RegionAurora global databases require at least one secondary Aurora DB Cluster in a different AWS Region. To reduce compute costs, you can create a headless secondary Aurora DB Cluster. By doing this, you are charged only for the storage. While this setup method can incur a higher recovery time objective (RTO), it can reduce the cost of your disaster recover (DR) setup.For PostgreSQL, use the AWS CLI to create the headless Aurora DB Cluster. See this example of a Linux/MacOS AWS CLI command that is used to create a headless Aurora DB Cluster.Note: Replace the <> place holders in this command with actual values before running the command.For a list of options that you can use with this command, see the create-db-cluster reference documentation.aws rds --region <target_region> \  create-db-cluster \     --db-cluster-identifier <value> \     --global-cluster-identifier <value>  \     --engine aurora-postgresql \     --kms-key-id <value> \     --engine-version <value> \     --db-cluster-parameter-group-name <value>\     --db-subnet-group-name <value> \     --vpc-security-group-ids <value> \     --backup-retention-period <value>Related informationAmazon Aurora Global databases