HEX
Server: Apache
System: Linux vps-cdc32557.vps.ovh.ca 5.15.0-156-generic #166-Ubuntu SMP Sat Aug 9 00:02:46 UTC 2025 x86_64
User: hanode (1017)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //usr/share/doc/awscli/examples/rds/modify-db-subnet-group.rst
**To modify a DB subnet group**

The following ``modify-db-subnet-group`` example adds a subnet with the ID ``subnet-08e41f9e230222222`` to the DB subnet group named ``mysubnetgroup``. To keep the existing subnets in the subnet group, include their IDs as values in the ``--subnet-ids`` option. Make sure to have subnets with at least two different Availability Zones in the DB subnet group. ::

    aws rds modify-db-subnet-group \
        --db-subnet-group-name mysubnetgroup \
        --subnet-ids '["subnet-0a1dc4e1a6f123456","subnet-070dd7ecb3aaaaaaa","subnet-00f5b198bc0abcdef","subnet-08e41f9e230222222"]'

Output::

    {
        "DBSubnetGroup": {
            "DBSubnetGroupName": "mysubnetgroup",
            "DBSubnetGroupDescription": "test DB subnet group",
            "VpcId": "vpc-0f08e7610a1b2c3d4",
            "SubnetGroupStatus": "Complete",
            "Subnets": [
                {
                    "SubnetIdentifier": "subnet-08e41f9e230222222",
                    "SubnetAvailabilityZone": {
                        "Name": "us-west-2a"
                    },
                    "SubnetStatus": "Active"
                },
                {
                    "SubnetIdentifier": "subnet-070dd7ecb3aaaaaaa",
                    "SubnetAvailabilityZone": {
                        "Name": "us-west-2b"
                    },
                    "SubnetStatus": "Active"
                },
                {
                    "SubnetIdentifier": "subnet-00f5b198bc0abcdef",
                    "SubnetAvailabilityZone": {
                        "Name": "us-west-2d"
                    },
                    "SubnetStatus": "Active"
                },
                {
                    "SubnetIdentifier": "subnet-0a1dc4e1a6f123456",
                    "SubnetAvailabilityZone": {
                        "Name": "us-west-2b"
                    },
                    "SubnetStatus": "Active"
                }
            ],
            "DBSubnetGroupArn": "arn:aws:rds:us-west-2:534026745191:subgrp:mysubnetgroup"
        }
    }

For more information, see `Step 3: Create a DB Subnet Group <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html#USER_VPC.CreateDBSubnetGroup>`__ in the *Amazon RDS User Guide*.