-
Notifications
You must be signed in to change notification settings - Fork 347
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
fix: add client context and cognito identity to runtime context #382
fix: add client context and cognito identity to runtime context #382
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to make sure I understand the issue. This was previously panicking if the headers were not present correct? So the addition of these Option
s allows the deserialization to succeed if they are not present?
Also can you fix any clippy issues?
This isn't really my project to maintain anymore, but as the person who made this decision a few years ago, I think it'd be helpful if I provided a bit of context. At the time—and I believe this is still the case—the client context and Cognito Identity were only filled by the AWS Mobile SDKs that directly invoked Lambda functions. This pattern was discouraged in favor of delegating authentication/authorization to API Gateway, and the thinking was that anyone who'd be using this new runtime will probably not be using those older SDKs. However, I don't know if this guidance has changed and someone a bit closer to those decisions should weigh in. |
@davidbarsky We use the
Yes, I noticed that it works in the Node.js client and the .NET client, but not in the Rust client. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for indulging me with my very own personal opinions @diceride. I really like how clean this looks like now 🙌
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Waiting on all checks to pass and then I'll merge.
Issue #, if available:
Description of changes:
Fixes an issue where the client context
lambda-runtime-client-context
and the cognito identitylambda-runtime-cognito-identity
were not deserialized from the incoming request headers.By submitting this pull request