AWS App Runner timing out on outbound HTTPS requests

0

I have an AppRunner service connected to a VPC: AppRunner Network Configuration

In my VPC, I attached the Internet Gateway also the NAT Gateway in each subnet. You can see here the resource map: Network Resource map.

My AppRunner instance is under a security group that have this outbound rules: AppRunner security group rules

I ran the Reachability Analyzer, selecting each network interface from my AppRunner instance and trying to reach the 8.8.8.8 ip. Here is an exemple of the result I have:

Reachability analyzer

In my AppRunner instance, the application have to access to internet resources. However it fails in timeout requesting those resources ex:

Unhandled exception. System.Net.Http.HttpRequestException: Connection timed out (xxx-bucket.s3.eu-west-1.amazonaws.com:443)

Can anyone help me to find what I'm missing here?

Regards,

profile picture
已提問 1 年前檢視次數 611 次
1 個回答
0
已接受的答案

I finally found my problem.

Regarding the result of the reachability analyzer, we can see that the final destination is on the NAT gateway. The destination must be the Internet Gateway of the public network.

I had configured a single routing table for my environment and applied it to both the private and public networks which caused this error.

The solution should be as follows.

**Routing table of the public network **

DestinationTarget
<VPC Local CIDR>local
0.0.0.0/0internet-gateway-id

Routing table of the private network

DestinationTarget
<VPC Local CIDR>local
0.0.0.0/0nat-gateway-id

In the end, the reachability analyzer should indicate the destination as the Internet Gateway:

Final Reachability analyzer result

Regards,

profile picture
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南