Repository navigation
Conversation
|
Thanks a lot for your first contribution! Please check out our contributing guidelines and don't hesitate to ask whatever you need. |
|
leandrodamascena
left a comment
There was a problem hiding this comment.
Thanks @Goldloli, confirmed against a real AppSync API with a Lambda authorizer: the resolver receives {"resolverContext": {...}} and nothing else, exactly your fixture. On develop that lands on AppSyncIdentityIAM and every property raises, with your change it is an AppSyncIdentityLambda with the context reachable. As I said in the issue, #8705 lands first and touches the same docstring lines, so a small rebase will be needed after it merges, I'll ping you then.
I'm approving now. This goes out in 3.40.0, so it will sit here for a while before I merge it. No rebase needed in the meantime, and you'll be credited in the release notes.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #8720 +/- ##
========================================
Coverage 97.00% 97.00%
========================================
Files 321 321
Lines 16415 16421 +6
Branches 1482 1483 +1
========================================
+ Hits 15924 15930 +6
Misses 350 350
Partials 141 141 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|



Issue number:
closes #8718
Summary
Changes
AppSyncIdentityLambda, a data class for AWS_LAMBDA authorization identities, exposing the authorizer'sresolverContextthroughresolver_context.get_identity_objectnow dispatches onresolverContextbefore the IAM fallback. Thesub→AppSyncIdentityCognitodispatch and theAppSyncIdentityIAMfallback are unchanged.AppSyncEventBase.identityreturn type and the AWS_LAMBDA docstring line that was markedNEED TO TEST. The OPENID_CONNECT line is left untouched so it can land through docs(data_classes): correct AppSync identity docstring for OPENID_CONNECT and pin the dispatch #8705.substill wins), and fullAppSyncResolverEventparsing.AppSyncIdentityLambdain the AppSync Resolver section ofdocs/utilities/data_classes.md.User experience
Before: a Lambda-authorizer identity fell through to
AppSyncIdentityIAM, so accessing any property (account_id,user_arn,source_ip, ...) raisedKeyError, andresolverContextwas only reachable as a raw dict.After:
Verification
Commands run in this branch:
Red/green check against
develop(public API only, no mocks): with thedevelopversion ofget_identity_object,get_identity_object({"resolverContext": {...}})returnsAppSyncIdentityIAM; with this branch it returnsAppSyncIdentityLambdaandresolver_contextcontains the expected mapping.Event shape: the fixture follows the AWS AppSync resolver event shape for Lambda authorizers, where
identityis whatever the authorizer returned (resolverContext). No AWS resources are required, matching the note in the issue. I did not validate against a deployed AppSync API.AI assistance
Per the AI-assisted contribution policy: this change was written with the help of an AI assistant. I reviewed the diff and ran the verification above; no unrelated AI-generated changes are included.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.