How to check application's health api in private ec2 with No NAT Gateway.

0

I run the application in private ec2 with No NAT Gateway. this application has health check api. In this situation, I want to call health check api with EventBridge and Lambda. and Lambda sends data to another application(On Internet) but Lambda in private subnet can't send data to the application. How can I solve this problem?

1개 답변
1
수락된 답변

I can think of a couple of ways of doing this but they all boil down to (more or less) the same thing:

Have a Lambda function running on the private subnet to do the health check (that you already have); and then use a VPC Endpoint for another AWS service to send the results out from that Lambda function. You could use SNS or SQS (both of which could trigger another Lambda function directly); or you could use CloudWatch Synthetics.

Note that the VPC endpoint does introduce additional cost (but then, so does NAT Gateway) but it restricts the access from the private subnet to the service that you've created the endpoint for. You can also use an endpoint policy to further restrict access if you like.

profile pictureAWS
전문가
답변함 일 년 전
profile pictureAWS
전문가
검토됨 일 년 전

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

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

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

관련 콘텐츠