RomaValcer
RomaValcer

Reputation: 2956

Specify VPC when creating RDS instance using boto3

I can't seem to find the right argument to specify the VPC I need for creating the RDS, as the most relevant parameter I see is "VpcSecurityGroupIds", but it is definitely not the VPC, as trying to put my VPC id there outputs an error: Invalid security group , groupId= <vpc_id>, groupName=. What am I missing here?

Upvotes: 3

Views: 644

Answers (1)

matoneski
matoneski

Reputation: 938

With RDS you need to provide a security group for the VPC and a subnet group for RDS, here is an example.

VpcSecurityGroupIds=['sg-7xxxx14'] - created in AWS VPC, DBSubnetGroupName='sample-subnet-group' - created in RDS

Once that is done you can use the commands above to connect to the VPC in question.

The information is hidden deep in the docs, here is a link. http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.html

Upvotes: 4

Related Questions