chalice
chalice copied to clipboard
Add ability to set metadata fields in test events
Currently with test methods like generate_sqs_event, generate_sns_event, etc. you can only set the message/message body. It would be helpful to have the ability to set some of the metadata fields in these events (e.g. messageAttributes in SQS or MessageAttrirbutes in SNS), as some of our lambda jobs need this information to function properly. Currently I don't know that there's a way around this, other than changing the actual lambda handler code to add an exception for tests, which isn't ideal.
I agree, this would be helpful to have. Should be a straightforward addition.