AWS Lambda Extensions: a new way to integrate Lambda with operational tools (in preview)

Posted on: Oct 8, 2020

You can now use AWS Lambda with extensions for your favorite operational tools for monitoring, observability, security, and governance. Today, you can use extensions for the following tools: AppDynamics, Check Point, Datadog, Dynatrace, Epsagon, HashiCorp, Lumigo, New Relic, Thundra, Splunk, AWS AppConfig, and Amazon CloudWatch Lambda Insights.

Lambda makes it easy for developers and operators to focus on their business needs by reducing their operational overhead. To help customers operate their functions, Lambda provides native integrations for logs and metrics through Amazon CloudWatch, tracing through AWS X-Ray, tracking configuration changes through AWS Config, and recording API calls through AWS CloudTrail. Also, AWS Lambda Ready partners provide tools for application management, API integration, deployment, monitoring, and security. However, previously, customers who wanted to use non-AWS offerings told us it was complicated to integrate Lambda with other operational tools.

Extensions are a new way for tools to more easily integrate deeply into the Lambda execution environment to control and participate in Lambda’s lifecycle. They use the Extensions API, a new HTTP interface, to register for lifecycle events and get greater control during function initialization, invocation, and shutdown. They can also use environment variables to add options and tools to the runtime, or use wrapper scripts to customize the runtime startup behavior.

You can use extensions from AWS, AWS Lambda Ready partners, and open source projects for a wide range of use cases. For example, you can simplify your development workflow by automatically instrumenting Lambda functions without needing code changes or by deploying operational tools independently of code changes. Also, you can improve performance of your functions by pre-fetching configuration and secrets before your function handler is executed, or send telemetry to a custom destination outside of the function invocation.

Extensions share the same billing model as Lambda functions. When using Lambda functions with extensions, you pay for requests served and the combined compute time used to run your code and all extensions, in 100ms increments. To learn more about the billing for extensions, visit the Lambda FAQs page.

Extensions are now available in preview in the following regions: us-east-1, us-east-2, us-west-1, us-west-2, ca-central-1, eu-west-1, eu-west-2, eu-west-3, eu-central-1, eu-north-1, eu-south-1, sa-east-1, me-south-1, ap-northeast-1, ap-northeast-2, ap-northeast-3, ap-southeast-1, ap-southeast-2, ap-south-1, and ap-east-1. For more information, see the AWS Region table.

You can deploy extensions using Layers through the Lambda Console, CLI, or infrastructure as code tools such as CloudFormation, the AWS Serverless Application Model, and Terraform. To get started with extensions from AWS APN Partners, install their extensions by following the links provided in Introducing Lambda Extensions.

You can build your own extensions as well. To learn how to build extensions using the Extensions API, visit the AWS Lambda Developer Guide.