AWS RDS Instance Subnet Groups

AWS RDS Instance Subnet Groups

AWS RDS instance subnet groups

Hello Everyone

Welcome to CloudAffaire and this is Debjeet.

In the last blog post, we have discussed AWS RDS instance option groups.

https://cloudaffaire.com/aws-rds-instance-option-groups

In this blog post, we will discuss AWS RDS subnet groups.

Subnet Groups:

Subnets are segments of a VPC’s IP address range that you designate to group your resources based on security and operational needs. A DB subnet group is a collection of subnets that you can create in a VPC and then designate for your DB instances. A DB subnet group allows you to specify a particular VPC when creating DB instances using the CLI or API. If you use the console, you can just select the VPC and subnets you want to use.

Each DB subnet group should have subnets in at least two Availability Zones in a given AWS Region. When creating a DB instance in a VPC, you must select a DB subnet group. Amazon RDS uses that DB subnet group and your preferred Availability Zone to select a subnet and an IP address within that subnet to associate with your DB instance. If the primary DB instance of a Multi-AZ deployment fails, Amazon RDS can promote the corresponding standby and subsequently create a new standby using an IP address of the subnet in one of the other Availability Zones.

Next, we are going to create a subnet group for AWS RDS instance and associate it with AWS RDS instance.

Prerequisite for this demo:

  • 1st VPC hosting your RDS instance
  • 2nd VPC with at least two subnets in the same region

AWS RDS option groups:

Step 1: Login to AWS console and navigate to ‘RDS’.

AWS RDS Instance Subnet Groups

Step 2: In the navigation pane, click ‘Subnet groups’ and click ‘Create DB Subnet Group’.

AWS RDS Instance Subnet Groups

Step 3: Provide a name, description and 2nd VPC ID.

AWS RDS Instance Subnet Groups

Select at least two subnets and click ‘Create’.

AWS RDS Instance Subnet Groups

Our subnet group created successfully.

AWS RDS Instance Subnet Groups

Next, we are going to associate this subnet group with AWS RDS instance.

Step 4: In the navigation pane, click ‘Databases’. Select the RDS instance and click ‘Modify’.

AWS RDS Instance Subnet Groups

Step 5: In the ‘Network & Security’ section, select the new subnet group and security group.

AWS RDS Instance Subnet Groups

Note: Changing the subnet group will also change the network configuration and security groups.

AWS RDS Instance Subnet Groups

As a result of the above modification, the RDS instance will be migrated from 1st VPC to 2nd VPC.

AWS RDS Instance Subnet Groups

Hope you have enjoyed this article, In the next blog post, we will discuss AWS RDS read replica.

To get more details on AWS RDS, please refer below AWS documentation

https://docs.aws.amazon.com/rds/index.html

 

Leave a Reply

Close Menu