-
Notifications
You must be signed in to change notification settings - Fork 41
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
Customizable Context is needed #502
Comments
Huh, can you explain more about what this means? Does it mean your lambda is not hosted on AWS servers at all? |
Sorry, my wording wasn't clear enough. Lambdas are hosted on my account on AWS servers as usual. I meant that lambdas aren't invoked through AWS API Gateway. It is invoked across my AWS account and provider account (by attaching policy). |
I see, thanks for clarifying 🤔 is there any documentation about this? How do the official AWS Lambda libraries support custom contexts? On JVM and JS Feral is just a wrapper around the official libraries. |
Is this the |
I wonder if
|
Yes, thanks, I think you're right! We probably need to model feral/lambda/js/src/main/scala/feral/lambda/facade/Context.scala Lines 39 to 43 in 07b0557
|
I wrote AWS Lambda handler using Feral
IOLambda.Simple
to handle IoT device (not Amazon IoT Button, but SORACOM's one) click event.Since my IoT provider directly invokes lambda, lambda receives completely different
Context
from environment (for example it containssimId
field). Thus runtime throwsCannot read properties of undefined (reading 'installationId')
when decodingContext
. When I invoke the lambda manually, the error does not occur.Unfortunately, I cannot avoid this bahavior because decoding
Context
is completely untouchable.In my use-case I don't need
Context
but input.Would you mind to make
Context
type overridable and fully customizable?Appendix
For example SORACOM's context is described here: https://users.soracom.io/ja-jp/docs/funk/format/#nodejs-%E3%83%A9%E3%83%B3%E3%82%BF%E3%82%A4%E3%83%A0%E3%81%AE%E5%A0%B4%E5%90%88
The text was updated successfully, but these errors were encountered: