cloudwatch-to-papertrail
cloudwatch-to-papertrail copied to clipboard
TypeError: Cannot read property 'data' of undefined
@pksunkara I have created new lambda function and trying to Test it, I am getting below error. Can you please help me to fix?

I think this will happen if the function is invoked without the expected CloudWatch payload as the event.
If you're manually testing, an event should look something like the following:
{
"awslogs": {
"data": "H4sIAAAAAAAAAHWPwQqCQBCGX0Xm7EFtK+smZBEUgXoLCdMhFtKV3akI8d0bLYmibvPPN3wz00CJxmQnTO41whwWQRIctmEcB6sQbFC3CjW3XW8kxpOpP+OC22d1Wml1qZkQGtoMsScxaczKN3plG8zlaHIta5KqWsozoTYw3/djzwhpLwivWFGHGpAFe7DL68JlBUk+l7KSN7tCOEJ4M3/qOI49vMHj+zCKdlFqLaU2ZHV2a4Ct/an0/ivdX8oYc1UVX860fQDQiMdxRQEAAA=="
}
}
The exception was raised as awslogs.data does not exist in the event. Data should be base64 encoded logs.