2 Answers
- Newest
- Most votes
- Most comments
2
Hii
To allow your CodeBuild stage in us-east-1 to access an RDS instance in ap-south-1, you'll need to establish a VPC peering connection between the two VPCs: us-vpc and mumbai-vpc.
Here's a step-by-step guide on how to achieve this:
- Create a VPC Peering Connection:
- In the AWS Management Console, navigate to the VPC service.
- Choose "VPC Peering Connections" in the navigation pane.
- Click "Create VPC Peering Connection".
- For the "Requester VPC", select your us-vpc (us-east-1).
- For the "Accepter VPC", select your mumbai-vpc (ap-south-1).
- Specify a name for the VPC Peering Connection.
- Click "Create VPC Peering Connection".
- Accept the VPC Peering Connection:
- In the VPC Peering Connections list, you'll see a pending request from the us-vpc.
- Select the request and click "Accept".
- Update the CodeBuild Project:
- In the CodeBuild console, go to your project.
- In the "Environment" section, under "Vpc configuration", select "Use a VPC".
- Choose your us-vpc and the subnet(s) where your CodeBuild instance will reside.
- In the "Security groups" section, add a security group that allows inbound traffic from the mumbai-vpc to the ports used by the RDS instance.
- Configure the RDS Instance:
- In the RDS console, go to your instance.
- In the "Connectivity & security" tab, under "Security groups", ensure that the security group attached to the RDS instance allows outbound traffic to the VPC peering connection.
- Test the Connection:
- In your CodeBuild project, try to connect to the RDS instance from your build script. If the connection is successful, you'll be able to access the RDS instance from your CodeBuild stage.
- https://docs.aws.amazon.com/vpc/latest/peering/what-is-vpc-peering.
html
1
You can establish an inter-region VPC peering connection (VPC peering) to connect to your RDS instance.
Make a peering connection between us-vpc and mumbai-vpc, and configure the route table.
For more information on VPC peering, check out this AWS documentation:
https://docs.aws.amazon.com/vpc/latest/peering/what-is-vpc-peering.html
answered a month ago
Relevant content
- Accepted Answerasked 6 years ago
- asked a year ago
- asked 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated a year ago