How do I link a security group to my AWS RDS instance

When your RDS instance is not in a VPC, then your RDS instance is associated with an RDS security group. Those security groups are controlled by the "Security Groups" section in the RDS console. From there, you can add EC2-Classic security groups for access:

  1. Select your RDS security group
  2. Select "EC2 Security Group" for the "Connection Type"
  3. Select this or another AWS account and fill in the other AWS account number if necessary
  4. Select or fill in the correct security group.
  5. Click "Authorize"

When your RDS instance is inside a VPC, then your RDS instance is associated with a VPC security group. Those security groups are controlled by the "Security Groups" section in the VPC console. From there, you can add other VPC security groups for access:

  1. Select your VPC security group
  2. Select the "Inbound Rules" tab
  3. Click "Edit"
  4. Add a new rule, select your protocol and port range. For "Source", type or select your security group. Only VPC security groups within the same VPC can be used for this purpose.
  5. Click "Save"

Note, when selecting the security group, depending on the browser you're using, the list may only appear once focus is in the "Source" edit box. It may also only appear if you start typing. Also, it may not appear at all. If this is the case, type in the source VPC security group's identifier (eg. sg-12345678).