FAQs and How-tos
How to streamline/automate usage-based billing for serverless functions running across multiple cloud envioronments
4 min
to enable usage based billing for serverless functions running in production across various cloud environments (e g , aws lambda, azure functions, google cloud functions), amberflo provides a robust and flexible solution a typical use case is charging customers based on gb seconds consumed 1\ accurately capture and aggregate usage amberflo's metering system forms the backbone of this approach use the amberflo sdks or ingestion api to collect usage data configure a duration meter to send a start and stop event for each function invocation alternatively, use a sum meter to report total usage once the function completes key dimensions to include function id identifies the function instance cloud provider differentiates deployments (aws, azure, gcp, etc ) region optional, for finer granularity in pricing and analytics 2\ define a pricing plan create a product item tied to the meter you've configured select a rate plan per unit (e g , per gb second) per block (e g , per 1000 invocations) by dimension (e g , different prices based on cloud provider or region ) 3\ assign customers to a plan option a prepaid model customers pre purchase credits usage is drawn down from their prepaid balance in real time amberflo tracks remaining balance transaction history timeline of credit consumption you can set up alerts to notify when balance is low use webhooks to trigger automatic top ups via stripe or other workflows option b pay as you go model usage is continuously tracked during the billing period invoice is updated in real time and finalized at the end of the cycle payment can be automatically charged via stripe manually submitted by the customer amberflo enables seamless, automated usage based billing for serverless workloads, whether you’re operating in a prepaid or postpaid billing environment, and across multiple cloud providers 📘 faqs and how tos docid\ bq14rede1rrwst00mbikx see related from invoicing and payments how to resolve when a customer is issued an invoice but has not yet provided payment information docid\ ramjygdjkdlzdnmpfw1kj how to bill customers in different currencies docid\ w2iaparrkbxzneuvoww2x how to set up your stripe integration in amberflo docid\ p6cy2livo gyeqjrukwo2