Skip to content

How to run multiples lambdas locally

0

Hi, Does anyone know how to run many lamba's locally, with a variety of triggers??

Regards

asked 8 months ago175 views

2 Answers
0

You can run multiple Lambda functions locally using a few different approaches:

  1. Using AWS SAM (Serverless Application Model):
  • The sam local invoke command allows you to invoke Lambda functions locally
  • You can create sample event payloads to test your functions with different triggers
  • For multiple functions, you can invoke each one separately with their specific event files
  1. Using AWS Application Builder in your IDE (like VS Code):
  • Navigate to your function and select "Local Invoke and Debug Configuration"
  • Configure how to invoke the function locally and set up debug configurations
  • Select or create sample event payloads that simulate different triggers
  • Invoke each function with its appropriate event
  1. For distributed applications with multiple Lambdas:
  • Consider using distributed tracing tools like OpenTelemetry during local development
  • This helps understand the interactions between multiple Lambda functions
  • It's particularly useful when you have many Lambdas (e.g., 50-60) working together

When testing locally with multiple triggers, you'll need to create separate event JSON files that simulate each trigger type (S3, DynamoDB, API Gateway, etc.). This approach allows you to test each Lambda function with its expected trigger payload.

For complex scenarios where Lambdas interact with each other, you might need to orchestrate the local invocations manually or use more advanced local testing strategies.
Sources
Locally invoke Lambda functions with AWS SAM - AWS Serverless Application Model
Introducing an enhanced local IDE experience for AWS Lambda developers | AWS Compute Blog
Community | The .NET on AWS Show, Featuring Martin Thwaites!

answered 8 months ago

EXPERT

reviewed 8 months ago

0

I was thinking about multiples lambdas running locally and communicating each other. Regards

answered 7 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.