Configuring Amazon Lambda functions - Amazon Lambda
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Configuring Amazon Lambda functions

Learn how to configure the core capabilities and options for your Lambda function using the Lambda API or console. These configurations apply to a function deployed as a container image and for a function deployed as a .zip file archive.

Configuring function options

You can find an overview of how to configure your Lambda function using the console and Amazon CLI.

Environment variables

You can make your function code portable and keep secrets out of your code by storing them in your function's configuration by using environment variables.

Creating layers

You create a layer manage your function's dependencies independently and keep your development package small.

Outbound networking

You can use your Lambda function with Amazon resources in an Amazon VPC. Connecting your function to a VPC lets you access resources in a private subnet such as relational databases and caches.

Inbound networking

You can use an interface VPC endpoint to invoke your Lambda functions without crossing the public internet.

File system

You can use your Lambda function to mount a Amazon EFS to a local directory. A file system allows your function code to access and modify shared resources safely and at high concurrency.

Aliases

You can configure your clients to invoke a specific Lambda function version by using an alias, instead of updating the client.

Versions

By publishing a version of your function, you can store your code and configuration as a separate resource that cannot be changed.

Response streaming

You can configure your Lambda function URLs to stream response payloads back to clients. Response streaming can benefit latency sensitive applications by improving time to first byte (TTFB) performance. This is because you can send partial responses back to the client as they become available. Additionally, you can use response streaming to build functions that return larger payloads.