https://www.npmjs.com/package/@nrfcloud/lambda-helpers
Helper functions for AWS Lambda functions used in nRF Cloud.
npm i (--save-prod|--save-dev) @nrfcloud/lambda-helpersimport{MetricUnit}from"@aws-lambda-powertools/metrics";import{logMetrics}from"@aws-lambda-powertools/metrics/middleware";importmiddyfrom"@middy/core";import{metricsForComponent}from"@nrfcloud/lambda-helpers";const{ track, metrics }=metricsForComponent("my-function","my-service");exportconsthandler=middy().use(logMetrics(metrics)).handler(async()=>{track("some:metric",MetricUnit.Count,1);});This repo runs TypeScript 6 and 7 side by side, so that eslint works.