AWS AmazonRDS: Add CLI example for creating Aurora Serverless v2 writer DB instance
Summary
Renames the existing example to 'Example 1' and adds a new 'Example 2' showing how to create an Aurora Serverless v2 primary (writer) DB instance in a DB cluster with the AWS CLI, including sample JSON output.
Security assessment
The change is purely a usage example for the create-db-instance CLI command; the sample output merely reflects default settings (PubliclyAccessible false, StorageEncrypted false) without any security guidance or vulnerability fix.
Evidence
+**Example 2: To create an Aurora Serverless v2 writer DB instance in a DB cluster**
Diff
diff --git a/AmazonRDS/latest/UserGuide/example_rds_CreateDBInstance_section.md b/AmazonRDS/latest/UserGuide/example_rds_CreateDBInstance_section.md index 8426ccc..cd30359 100644 --- a//AmazonRDS/latest/UserGuide/example_rds_CreateDBInstance_section.md +++ b//AmazonRDS/latest/UserGuide/example_rds_CreateDBInstance_section.md @@ -129 +129 @@ CLI -**To create a DB instance** +**Example 1: To create a DB instance** @@ -238,0 +239,119 @@ For more information, see [Creating an Amazon RDS DB Instance](https://docs.aws. +**Example 2: To create an Aurora Serverless v2 writer DB instance in a DB cluster** + +The following `create-db-instance` example creates an Aurora Serverless v2 primary (writer) DB instance in a DB cluster. When you use the console to create a DB cluster, Amazon RDS automatically creates the writer DB instance for your DB cluster. However, when you use the AWS CLI to create a DB cluster, you must explicitly create the writer DB instance for your DB cluster using the `create-db-instance` command. + + + aws rds create-db-instance \ + --db-instance-identifier my-sv2-instance \ + --db-cluster-identifier my-sv2-cluster \ + --engine aurora-postgresql \ + --db-instance-class db.serverless + + +Output: + + + { + "DBInstance": { + "DBInstanceIdentifier": "my-sv2-instance", + "DBInstanceClass": "db.serverless", + "Engine": "aurora-postgresql", + "DBInstanceStatus": "creating", + "MasterUsername": "myuser", + "AllocatedStorage": 1, + "PreferredBackupWindow": "06:05-06:35", + "BackupRetentionPeriod": 1, + "DBSecurityGroups": [], + "VpcSecurityGroups": [ + { + "VpcSecurityGroupId": "sg-########", + "Status": "active" + } + ], + "DBParameterGroups": [ + { + "DBParameterGroupName": "default.aurora-postgresql15", + "ParameterApplyStatus": "in-sync" + } + ], + "DBSubnetGroup": { + "DBSubnetGroupName": "default", + "DBSubnetGroupDescription": "default", + "VpcId": "vpc-########", + "SubnetGroupStatus": "Complete", + "Subnets": [ + { + "SubnetIdentifier": "subnet-########", + "SubnetAvailabilityZone": { + "Name": "us-west-2c" + }, + "SubnetOutpost": {}, + "SubnetStatus": "Active" + }, + { + "SubnetIdentifier": "subnet-########", + "SubnetAvailabilityZone": { + "Name": "us-west-2a" + }, + "SubnetOutpost": {}, + "SubnetStatus": "Active" + }, + { + "SubnetIdentifier": "subnet-########", + "SubnetAvailabilityZone": { + "Name": "us-west-2b" + }, + "SubnetOutpost": {}, + "SubnetStatus": "Active" + } + ] + }, + "PreferredMaintenanceWindow": "fri:09:01-fri:09:31", + "PendingModifiedValues": { + "PendingCloudwatchLogsExports": { + "LogTypesToEnable": [ + "postgresql" + ] + } + }, + "MultiAZ": false, + "EngineVersion": "15.2-limitless", + "AutoMinorVersionUpgrade": true, + "ReadReplicaDBInstanceIdentifiers": [], + "LicenseModel": "postgresql-license", + "OptionGroupMemberships": [ + { + "OptionGroupName": "default:aurora-postgresql-15", + "Status": "in-sync" + } + ], + "PubliclyAccessible": false, + "StorageType": "aurora-iopt1", + "DbInstancePort": 0, + "DBClusterIdentifier": "my-sv2-cluster", + "StorageEncrypted": false, + "DbiResourceId": "db-BIQTE3B3K3RM7M74SK5EXAMPLE", + "CACertificateIdentifier": "rds-ca-rsa2048-g1", + "DomainMemberships": [], + "CopyTagsToSnapshot": false, + "MonitoringInterval": 0, + "PromotionTier": 1, + "DBInstanceArn": "arn:aws:rds:us-west-2:123456789012:db:my-sv2-instance", + "IAMDatabaseAuthenticationEnabled": false, + "PerformanceInsightsEnabled": false, + "DeletionProtection": false, + "AssociatedRoles": [], + "TagList": [], + "CustomerOwnedIpEnabled": false, + "BackupTarget": "region", + "NetworkType": "IPV4", + "StorageThroughput": 0, + "CertificateDetails": { + "CAIdentifier": "rds-ca-rsa2048-g1" + }, + "DedicatedLogVolume": false + } + } + +For more information, see [Using Aurora Serverless v2](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless-v2.html) in the _Amazon Aurora User Guide_. +