Serverless Cloudwatch events appearing encrypted / serialized

I’m testing out Cloudwatch logs as a trigger for serverless functions. However when my serverless function is triggered, it’s just outputting jibberish, which I figured was some form of encryption. Unfortunately I don’t know what that encryption is.

Here’s the output:


And here’s the function’s code:

const handler = async (event) => {
  console.log('*********RECEIVED EVENT FROM CLOUDWATCH**********')
  return {
    statusCode: 200,
    body: JSON.stringify(

export { handler };

It looks like the data is base64 encoded. Have you tried decoding it?

Yeah that turned out to be the issue. It wasn’t just base64 though it was also gzipped so base64 was returning some jumbled text. Oh well, now fixed!