This template creates an RDS DB security group with multiple VPC security groups. The DB instance is associated with the security group using the `DBSecurityGroups` property. The security group allows ingress from two EC2 security groups specified by their IDs and owner IDs.

CloudFormation Template