- Newest
- Most votes
- Most comments
When you have an extension, it runs as part of the function execution environment. If your extension completes its task before the function completes, you pay nothing else. If your extension continues running after the function completes (which is usually the case with observability extensions), you pay for the additional time it takes the extension, using the regular Lambda duration cost.
When using Lambda extensions, including those that utilize the Lambda Telemetry API, the cost is integrated into the overall Lambda function execution pricing. There isn't a separate, specified cost for extension execution time on the AWS Lambda pricing page.
Instead, the pricing works as follows:
-
You pay for the combined compute time used to run your Lambda function code and all extensions, measured in 1-millisecond increments.
-
This combined time is added to your total Lambda execution duration and billed at the standard Lambda pricing rates, which vary based on the amount of memory allocated to your function.
-
For functions using the Telemetry API to send data to external services like Elastic, you might incur additional data transfer costs, which would be charged at Amazon EC2 data transfer rates.
When using the Lambda Telemetry API to send logs to Elastic, keep in mind:
-
The extension's execution time will be added to your function's duration, potentially increasing your Lambda costs.
-
Data transfer costs may apply when sending telemetry data out of AWS to Elastic, if it's hosted outside of AWS or in a different region.
-
There may be costs associated with storing and processing the data in Elastic, but these would be separate from AWS charges.
To manage costs effectively, monitor your Lambda function's performance metrics, especially the duration and memory usage. You can use CloudWatch to track these metrics and optimize your function and extension configurations accordingly. Additionally, consider using AWS Cost Explorer to analyze and forecast your Lambda-related expenses.
Sources
Serverless Computing – AWS Lambda Pricing – Amazon Web Services
Integrating the AWS Lambda Telemetry API with Prometheus and OpenSearch | AWS Open Source Blog
Augment Lambda functions using Lambda extensions - AWS Lambda
Relevant content
- asked 7 days ago
- AWS OFFICIALUpdated 4 years ago