Closed as not planned
Description
Expected Behavior
Using the SQS Envelope and my custom body schema, I expected to be able to parse SQS events generated by Symfony Messenger.
Current Behavior
Parsing fails, because binaryValue is null. The SQS SqsMsgAttributeSchema defines it as optional string, but not nullish.
Code snippet
"messageAttributes": {
"X-Symfony-Messenger": {
"stringValue": "{\"X-Message-Stamp-Symfony\\\\Component\\\\Messenger\\\\Stamp\\\\BusNameStamp\":\"[{\\\"busName\\\":\\\"external.event.bus\\\"}]\"}",
"binaryValue": null,
"stringListValues": [],
"binaryListValues": [],
"dataType": "String"
},
"type": {
"stringValue": "App\\Event\\ChangeLogEvent",
"binaryValue": null,
"stringListValues": [],
"binaryListValues": [],
"dataType": "String"
},
"Content-Type": {
"stringValue": "application/json",
"binaryValue": null,
"stringListValues": [],
"binaryListValues": [],
"dataType": "String"
}
},
Steps to Reproduce
- Use the Powertools Parser with
envelope: SqsEnvelope
to parse an SQS event with the above mentioned messageAttributes.
Possible Solution
BinaryValue could be set to be nullish: binaryValue: z.string().nullish()
Powertools for AWS Lambda (TypeScript) version
2.10
AWS Lambda function runtime
20.x
Packaging format used
npm
Execution logs
Metadata
Assignees
Labels
Something isn't workingThe issue needs to be discussed, elaborated, or refinedThis item requires a response from a customer and will considered stale after 2 weeksThis item relates to the Parser UtilityThis issue will be closed soon unless the discussion moves forwardThis is something we will not be working on. At least, not in the measurable future
Type
Projects
Status
Closed