3 Answers
- Newest
- Most votes
- Most comments
0
0
Hello,
Please try this solution.
To connect your AWS App Runner service to a privately accessible Amazon RDS instance, please follow the step by step.
Step 1Create a VPC Connector in App Runner
Go to the App Runner Console:
- Open the AWS Management Console.
- Navigate to App Runner.
Create a VPC Connector:
- In the App Runner console, select VPC Connectors from the left-hand menu.
- Click Create VPC Connector.
- Name your VPC connector (Ex. your vpc connector).
- Select the VPC where your RDS instance is located (VPC in your case).
- Select the subnets that are associated with your RDS instance.
- Choose the security group that allows traffic to the RDS instance.
Step 2Configure RDS Security Group
Go to the EC2 Console:
- Open the AWS Management Console.
- Navigate to EC2 and then Security Groups.
Update the RDS Security Group:
- Find and select the security group associated with your RDS instance.
- Click on Edit inbound rules.
- Add an inbound rule to allow traffic from the security group associated with the App Runner VPC connector: Type: Custom TCP Port Range: 3306 (or the port your RDS instance uses) Source: Select the security group of the VPC connector.
Step 3Deploy App Runner Service
Go to the App Runner Console:
- Open the AWS Management Console.
- Navigate to App Runner.
Create or Update App Runner Service:
- Create a new App Runner service or select an existing service to update.
- Configure your service settings as required.
Network Settings:
- In the Network section of the service configuration, set Outgoing traffic to use the VPC connector you created (Your vpc connector).
Deploy the Service:
Complete the setup and deploy the service.
https://docs.aws.amazon.com/apprunner/latest/dg/network-pl-manage.html
https://docs.aws.amazon.com/apprunner/latest/dg/network-vpc.html
Relevant content
- Accepted Answerasked a year ago
- asked 3 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
Yes,but not getting satisfied response.