0

I'm getting timeout errors when trying to create AWS Batch jobs using the AWS Javascript SDK from a Lambda.

How can I connect to AWS Batch from a Lambda instance besides creating public/private subnets with a NAT gateway?

1 Answer 1

1

The only other way is to not put your lambda in VPC. If you really need your function to be in VPC, the only way is to place it in private subnet and then use NAT in public subnet. This is because there is no VPC interface endpoint for AWS Batch.

You could also have second lambda function, not in VPC. So the main function in the VPC, invokes the second one which operates on AWS Batch. This will work, because AWS Lambda has interface endpoint which allows you to invoke functions from VPC without internet access.

Sign up to request clarification or add additional context in comments.

1 Comment

Appreciate the response. What you describe is exactly how I am coming to understand it. Thanks for the insight. I think I know what needs to be done.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.