Data protection in Amazon Lambda - 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).

Data protection in Amazon Lambda

The Amazon shared responsibility model applies to data protection in Amazon Lambda. As described in this model, Amazon is responsible for protecting the global infrastructure that runs all of the Amazon Web Services Cloud. You are responsible for maintaining control over your content that is hosted on this infrastructure. You are also responsible for the security configuration and management tasks for the Amazon Web Services that you use. For more information about data privacy, see the Data Privacy FAQ.

For data protection purposes, we recommend that you protect Amazon Web Services account credentials and set up individual users with Amazon IAM Identity Center or Amazon Identity and Access Management (IAM). That way, each user is given only the permissions necessary to fulfill their job duties. We also recommend that you secure your data in the following ways:

  • Use multi-factor authentication (MFA) with each account.

  • Use SSL/TLS to communicate with Amazon resources. We require TLS 1.2 and recommend TLS 1.3.

  • Set up API and user activity logging with Amazon CloudTrail.

  • Use Amazon encryption solutions, along with all default security controls within Amazon Web Services.

  • Use advanced managed security services such as Amazon Macie, which assists in discovering and securing sensitive data that is stored in Amazon S3.

  • If you require FIPS 140-2 validated cryptographic modules when accessing Amazon through a command line interface or an API, use a FIPS endpoint. For more information about the available FIPS endpoints, see Federal Information Processing Standard (FIPS) 140-2.

We strongly recommend that you never put confidential or sensitive information, such as your customers' email addresses, into tags or free-form text fields such as a Name field. This includes when you work with Lambda or other Amazon Web Services using the console, API, Amazon CLI, or Amazon SDKs. Any data that you enter into tags or free-form text fields used for names may be used for billing or diagnostic logs. If you provide a URL to an external server, we strongly recommend that you do not include credentials information in the URL to validate your request to that server.

Encryption in transit

Lambda API endpoints only support secure connections over HTTPS. When you manage Lambda resources with the Amazon Web Services Management Console,Amazon SDK, or the Lambda API, all communication is encrypted with Transport Layer Security (TLS). For a full list of API endpoints, see Amazon Regions and endpoints in the Amazon Web Services General Reference.

When you connect your function to a file system, Lambda uses encryption in transit for all connections. For more information, see Data encryption in Amazon EFS in the Amazon Elastic File System User Guide.

When you use environment variables, you can enable console encryption helpers to use client-side encryption to protect the environment variables in transit. For more information, see Securing Lambda environment variables.

Encryption at rest

Lambda always encrypts environment variables at rest. By default, Lambda uses an Amazon KMS key that Lambda creates in your account to encrypt your environment variables. This Amazon managed key is named aws/lambda.

On a per-function basis, you can optionally configure Lambda to use a customer managed key instead of the default Amazon managed key to encrypt your environment variables. For more information, see Securing Lambda environment variables.

Lambda always encrypts files that you upload to Lambda, including deployment packages and layer archives.

Amazon CloudWatch Logs and Amazon X-Ray also encrypt data by default, and can be configured to use a customer managed key. For details, see Encrypt log data in CloudWatch Logs and Data protection in Amazon X-Ray.