I have run your LAmbda and received the following output when using the cloudfront-modify-response-header.
{
"status": "200",
"statusDescription": "OK",
"headers": {
"vary": [
{
"key": "Vary",
"value": "*"
}
],
"last-modified": [
{
"key": "Last-Modified",
"value": "2016-11-25"
}
],
"x-amz-meta-last-modified": [
{
"key": "X-Amz-Meta-Last-Modified",
"value": "2016-01-01"
}
],
"x-my-header": [
{
"value": "test"
}
]
}
}
This looks like it is functioning correctly, I believe there is confusion for the difference between testing and the test event. The test event itself is the input for the Lambda function, when you test your function you would look at the output to see the response based on this event input such as in the screenshot below.
