Skip to content

Instantly share code, notes, and snippets.

@alexkates
Last active July 4, 2021 11:23
Show Gist options
  • Save alexkates/d37a160af142204228c7c54831eb4ae6 to your computer and use it in GitHub Desktop.
Save alexkates/d37a160af142204228c7c54831eb4ae6 to your computer and use it in GitHub Desktop.
Log all event records passed into Lambda
/**
* Loop over each event record and log to the console.
* Since this is a Lambda Function, the log statements will
* also be logged to CloudWatch.
*/
exports.handler = async (event) => {
event.Records.forEach((record) => {
console.log('Record: %j', record);
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment