App Runner and RDS

2

Hi,

It seems we can't configure for the moment an App Runner service to communicate with an RDS database. Is it a current limitation, or did I miss something?

jcmag
질문됨 3년 전4964회 조회
4개 답변
2

Yes, it is not currently supported. This is one of the feature requests tracked here - https://github.com/aws/apprunner-roadmap/issues/1
Please vote on the issue to get it prioritized.

AWS
답변함 3년 전
2

I was able access my RDS database from AppRunner successfully. You have to configure these 2 settings on RDS:

  1. Choose the option to make the RDS instance Publicly accessible.
  2. To the VPC Security Group associated with your RDS instance, add an inbound rule to allow public access via the Internet. Add IP address 0.0.0.0/0 and the port number your DB listens on (i.e. 5432 for PostgreSQL).

With these two options AppRunner was able to communicate with the RDS DB. If you cannot make your DB publicly accessible then you probably cannot make this work.

One AppRunner enhancement could be to potentially limit the IP address range any one application can be deployed to. I noticed with every deployment the AppRunner IP address for the application would be completely different, not even having the same couple of octets in the IP address. This would allow users to avoid total public access with IP address 0.0.0.0/0. We would then be able to limit the rule perhaps to a particular CIDR such as 54.246.8.0/32.

I also added this line to test if my application could access the RDS DB port in a startup shell script:

# Test if port 5432 is accessible via this machine.
echo " Zero is success: sleep 10 | echo 0 > /dev/tcp/<rds instance id>.eu-west-1.rds.amazonaws.com/5432 && echo $? : "
sleep 10 | echo 0 > /dev/tcp/<rds instance id>.eu-west-1.rds.amazonaws.com/5432 && echo $?

Edited by: SamSan on Jul 25, 2021 11:05 AM

SamSan
답변함 3년 전
2

This feature is now supported: "You can now connect you App Runner services to databases in Amazon Relational Database Service (Amazon RDS)..." https://aws.amazon.com/about-aws/whats-new/2022/02/aws-app-runner-amazon-vpc/

AWS
답변함 2년 전
1

voted ;)
any deadline for this feature?

jcmag
답변함 3년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠