serverless invoke local with clientContext
See original GitHub issueThis is a Feature Proposal
Description
When running “invoke local” I would need the addition to include clientContext. In our Lambdas we are using clientContext to provide additional/routing information that is needed for our Lambdas to run.
It is great that we can supply the event
when testing/running locally with the --path
flag but in addition to the event we would need to supply the handlers context
as well.
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
How do I include clientContext for AWS Lambda "sls invoke ...
Running sls invoke local --function myFunc --path ./my/event.json is a great function but I now have need of providing clientContext to my ...
Read more >Lessons learned experimenting with an AWS Lambda ...
The basic premise is that the API for invoking a Lambda function provides the ability to include a ClientContext — a dictionary of...
Read more >invoke — AWS CLI 1.27.37 Command Reference
Invokes a Lambda function. You can invoke a function synchronously (and wait for the response), or asynchronously. To invoke a function asynchronously, ...
Read more >Executing and Invoking Lambda Function - Tutorialspoint
--client-context − You can pass client specific details to the Lambda function. The clientcontext has to be in json format and base64-encoded. Maximum...
Read more >Serverless Lambda invoking Lambda. Getting no errors but a ...
I am getting in local the same error I was getting remote. I think now is better. At least I can see the...
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
What about adding
--context
flag toinvoke local
?For example:
and
Looks nice, I can try implementing that. cc @horike37 @pmuens