Skip to content

Restrict RDS Aurora Inbound Rules for AWS App Runner Access Only

0

This is to restrict access to public and allow only aws app runner service to access the PostgreSQL RDS aurora serverless instance which is public. Currently, our RDS security group allows connections from any IP address (0.0.0.0). However, this is not secure and we want to limit the inbound rules to only allow connections from our AWS App Runner service. Is it possible? if yes how to do that? Note I want my database to be publicly available.

Is there a set of IP's used by AWS app runner so that we can add that IP/IP range to our RDS security group. I saw this link Does allow listing these IP's help ?

2 Answers
2

Note I want my database to be publicly available.

Is there a reason for database to be publicly available? This is, as you mention, not secure.

Would suggest you enable App Runner VPC access, and access your RDS instance through it. More at Deep Dive on AWS App Runner VPC Networking

Edit

If you still want to access it through public IP, you can try the following:

  • Enable App Runner VPC access
  • When you connect App Runner service to a VPC, the outbound traffic does not have access to the public internet, as you can only select private subnets. Connect the private subnets to the internet through a public NAT Gateway
  • NAT gateways are associated with Elastic IPs, which are static, public IPv4 addresses. Update your RDS security group inbound rules to allow connections from NAT gateway public IP

More information at Enabling VPC access for outgoing traffic. Note that if the security group is configured, incorrectly, you may inadvertently expose your RDS to public internet.

AWS
EXPERT

answered 2 years ago

EXPERT

reviewed 2 years ago

0

Yes there is some reason.

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.