chalice icon indicating copy to clipboard operation
chalice copied to clipboard

Add ability to set metadata fields in test events

Open jmteachw opened this issue 5 years ago • 1 comments

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.

jmteachw avatar Feb 05 '21 00:02 jmteachw

I agree, this would be helpful to have. Should be a straightforward addition.

jamesls avatar Feb 09 '21 20:02 jamesls