The code does not handle multi-record events. Instead it only processes the first record.
There is potential here for missed events.
const region = event.Records[0].awsRegion;
const bucket = event.Records[0].s3.bucket.name;
const key = event.Records[0].s3.object.key;
The code does not handle multi-record events. Instead it only processes the first record.
There is potential here for missed events.