AWS - Different Region Lambda VPC to Fargate

137 views Asked by At

I have a Fargate Task, which is in a private Subnet1 in Region 1(Mumbai).

I am trying to make a request to the private IP, from Region 2(Singapore) from a Lambda Function. Lambda function is created in a non overlapping private Subnet2, which is peered to Subnet2.

But the call just times out. The security group and route tables are allowing the traffic. If I create a EC2 Instance in subnet2, the same call goes through, but not via Lambda.

Can anyone please advise. The VPC i setup as follows: a) ap-south-1 10.0.0.0/27 b) ap-south-east-1 10.1.0.0/27

In ap-south-1, I have created private subnet (10.0.0.0/28) and public subnet (10.0.0.16/28) Fargate I have configured it to run on 10.0.0.0/28 (private)

In ap-south-east-1, I have created private subnet (10.1.0.16/28) and public subnet (10.1.0.0/28)

I have peered both ends.

If i try to invoke the ap-south-1 private subnet fargate IP, from an EC2 instance in the public subnet ap-south-east-1 (10.1.0.0/28) it works fine, but invoking from a Lambda in the public subnet ap-south-east-1 times out.

The security group, allow for Outgoing All traffic - All - All - 0.0.0.0/0 Incoming All TCP - TCP - 0 - 65535 - 0.0.0.0/0

The Lambda function is set to 45 seconds timeout, this should complete ideally in 1-3 seconds itself, but just to rule it out.

0

There are 0 answers