How to use lambda-monitor-logger - 2 common examples

To help you get started, we’ve selected a few lambda-monitor-logger examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github blackflux / lambda-monitor / src / logic / subscribe.js View on Github external
}).catch((e) => {
    if (e.name === 'ThrottlingException') {
      logger.error('CloudWatch subscription logic temporarily throttled by AWS.');
    } else {
      throw e;
    }
  });
github blackflux / lambda-monitor / src / logic / empty-bucket.js View on Github external
const emptyBucket = async (event) => {
  const requestType = get(event, 'RequestType');
  if (requestType === 'Delete') {
    const Bucket = get(event, 'ResourceProperties.BucketName');
    if (Bucket === undefined) {
      throw new Error('No Bucket Provided.');
    }
    await s3.emptyBucket({ Bucket });
    logger.info(`${Bucket} emptied!`);
  }
};

lambda-monitor-logger

Logging designed to be used with lambda-monitor

MIT
Latest version published 1 year ago

Package Health Score

46 / 100
Full package analysis