-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No way to specify client context for local invoke #1177
Comments
+1 This is definitely an important missing capability in sam. |
I am dealing with the exact same problem and ive spent hours on it already. Using
In my handler function I have
Which prints Ive tried to pass this custom ctx in so many different ways and simplt cant get it to work. I am starting to wonder if its even possible with |
I think that the same issue is for the
but there is no way to pass the corresponding |
+1 |
+1 |
This is still open and needed, any way to run the lambda with a specific context? The Consider the template:
In a lambda,
Any solution? |
+1 |
In order for SAM CLI to support this we need RIE to support this first. Right now there isn't a way for SAM CLI to pass the clientContext down into the local Lambda Function. Linking to the RIE issue: aws/aws-lambda-runtime-interface-emulator#74 I hacked something together locally for python that at least proves we could do this. Mainly we need to:
|
I've opened aws/aws-lambda-runtime-interface-emulator#110 |
Description
I am running a local service with
start-lambda
and interacting with it from the Node SDK. It appears that the functionClientContext
isundefined
despite sending it correctly with the SDK.There is also no way to specify
ClientContext
with thelocal invoke
command.Steps to reproduce
Observed result
See that
context.clientContext
isundefined
Expected result
Expect the ClientContext value sent with the Invoke API call would be available in my function.
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
sam --version
: SAM CLI, version 0.16.0The text was updated successfully, but these errors were encountered: