-
Notifications
You must be signed in to change notification settings - Fork 160
Closed
Labels
bugSomething isn't workingSomething isn't workingcompletedThis item is complete and has been merged/shippedThis item is complete and has been merged/shippedparserThis item relates to the Parser UtilityThis item relates to the Parser Utility
Description
Expected Behavior
The identitySource
field in APIGatewayRequestAuthorizerEventV2
can be null when the Lambda authorizer is not configured with an identity source (see screenshot from the AWS Console below).
Current Behavior
The current definition does not account for this scenario, leading to an error:
identitySource: APIGatewayStringArray, |
Even the @types/aws-lambda
package has invalid type definition:
Code snippet
APIGatewayRequestAuthorizerEventV2Schema.parse(event);
Steps to Reproduce
When creating a Lambda authorizer, do not specify an identity source.
Possible Solution
add .nullable()
Powertools for AWS Lambda (TypeScript) version
latest
AWS Lambda function runtime
20.x
Packaging format used
npm
Execution logs
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingcompletedThis item is complete and has been merged/shippedThis item is complete and has been merged/shippedparserThis item relates to the Parser UtilityThis item relates to the Parser Utility
Type
Projects
Status
Shipped