Call Python Flask API in Private Subnet from Lambda running under other private subnet of Same VPC

  Kiến thức lập trình

Having a Python Flask API Module deployed using ElasticBeanstalk running in 2 Private subnets connected to a Route Table with NAT Gateway and having Outbound inbound access as required.

Having One Lambda Function deployed in 2 other private subnets of Same VPC as of Python Module with The same NAT Gateway attached.

Python Security Grooup
Inbound: 80, 443 from Security group of Lambda

Lambda Security Group
Inbound: 80, 443 from Security group of Python Module (Not needed but added for trail purpose)
Inbound: SG of VPC Endpoint to access Secrets manager

QUE: Can I call the API module directly using the Autogenerated HTTP API link of Elastic Beanstalk directly using Request Module in Lambda without having Any load balancer ?

TTPConnectionPool(host=’’, port=80): Max retries exceeded with url: /APIModuleNameData (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7f6c2e09eba0>

I have outbound connection properly.

Tried: Giving Complete network access to inbound and outbound SG of Python Module.
NAT Gateway Access check by directly login to Ec2

New contributor

Jatin Garg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.