FAQs and How-tos
How to integrate Amberflo with NodeJS Lambda functions
3 min
ingesting meter events from a nodejs based aws lambda function is a common setup, and amberflo provides several integration options below are the supported methods to authenticate and ingest meter data use the typescript sdk amberflo provides a typescript sdk that works seamlessly with nodejs you can install and import it into your lambda function as follows const { customerdetailsclient } = require('amberflo metering typescript'); 2\ use the amberflo serverless agent with cloudwatch you can configure the amberflo serverless agent to listen to cloudwatch logs in your aws environment simply log the meter events from your lambda functions and tag them so the agent can recognize and extract them the agent filters logs with the amberflo tag extracts the meter records sends them to amberflo for ingestion more information can be found at aws cloudwatch docid\ euo1 qvcdw9kd4lhpzegw 3\ write meters to s3 another option is to write meter data from your lambda functions to an aws s3 bucket you can write individual meter records or batch them together amberflo automatically processes the data from the s3 bucket more information can be found at aws s3 docid\ ybf6t2 oh5f fy0eb2qno 4\ use the rest api you can also send meter events directly via http using amberflo's rest apis this is a flexible and lightweight option for lambda functions more information can be found at getting started docid\ kdkc4ffc0 k 1anjm362f 📘 faqs and how tos docid\ bq14rede1rrwst00mbikx see related from integrations how to integrate with aws s3 for meter ingestion docid\ w1tmocufffqf0ol4tm5wy how to show billing and invoice information back to customers docid 4318mnzp5a5gugovauj2g