Input not passed to Lambda functions
See original GitHub issueLove the idea behind this project and have been trying to incorporate it into one of my apps that uses step functions so I can test 100% locally. I’ve been able to:
- Create step function state machines locally.
- Execute the state machine, passing some JSON as input.
- When the state machine hits a Task with a Lambda function, I’ve been able to use
--lambda-endpoint
option to have it call a mock lambda server I’m running locally.
The gotcha is that my mock lambda server gets the POST
… But the body contains an empty JSON input: {}
. For some reason, the original JSON input I passed in is dropped. Any ideas what I’m doing wrong?
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Unable to pass custom values to AWS Lambda function
I am trying to pass custom input to my lambda function (Python 3.7 runtime) in JSON format from the rule set in CloudWatch....
Read more >Lambda Function Input Event and Response Format
The following shows the general format of an Amazon Lex event that is passed to a Lambda function. Use this information when you...
Read more >Passing input through API Gateway to your Lambda Functions
GitHub: https://github.com/ravdyDevOps Online Training Registration form: https://bit.ly/valaxy-formFor Online training, connect us on ...
Read more >Validating Input Parameters in A Lambda Function - Medium
I will only execute the code if the value passed in matches one of our defined batch job names. I'll return a message...
Read more >How do you pass input to a lambda function? - Quora
If you mean AWS Lambda, then the input is part of the event that triggers the lambda function to execute. If it's triggered...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Scratch that, I was wrong.
stepfunctions-local
sends the input along just fine. The problem is AWS itself plus the web framework I was using with Node. In particular:Content-Type
header when it invokes a Lambda function.Content-Type
is not set, and, confusingly, just gives you an empty{}
body instead.Exactly my issue - thanks for sharing the root cause here, @brikis98. It would have taken me much longer to figure this out if not for your comment!