How to connect Cloudfront with RDS instance

0

Hello friends, I have an issue by connecting AWS Cloudfront with RDS instance. I would like to know if there is something specific to do that since I've tried opening the DB connections for All traffic from 0.0.0.0/0 and nothing happens, I can reach the from my PC but not from my API published into the Cloudfront. FYI I also have two other services connected to this API and they work properly, the current problem just affects API to DB pathway. Thanks in advance for your help.

  • Can you clarify how cloudfront is implicated? Cloudfront would only front your API, the API is what needs access to RDS -- hence Cloudfront has no knowledge of or ability to connect to RDS.

1개 답변
1
수락된 답변

API is hosted in another AWS Account (SYSTEM) and Technically a different Network (VPC)

In order for the API to access resources within your VPC (RDS in this case) you need to configure API VPC Link so that it can route onto your VPC.

You havent mentioned you have this configured so I assume not. Please follow instructions here https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-vpc-links.html

FYI, Cloudfront only fronts your API/ALB it will never be able to connect to your RDS instance

Extra info here https://aws.amazon.com/blogs/compute/understanding-vpc-links-in-amazon-api-gateway-private-integrations/

profile picture
전문가
답변함 일 년 전
profile picture
전문가
검토됨 일 년 전
  • Thanks a lot friend, you were right.!!!

  • Thank you very much for making the effort and coming back to accept the answer. I appreciate I was able to help you resolve the issue you had.

    Please reach out again with any questions

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

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

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

관련 콘텐츠