You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The instruction set architecture that the function supports\. Enter a string array with one of the valid values\. The default value is `x86_64`\.
89
+
The instruction set architecture that the function supports\. Enter a string array with one of the valid values\(arm64 or x86\_64\)\. The default value is `x86_64`\.
The JSON that you want to provide to your Lambda function as input\.
68
+
The JSON that you want to provide to your Lambda function as input\.
69
+
You can enter the JSON directly\. For example, `--payload '{ "key": "value" }'`\. You can also specify a file path\. For example, `--payload file://payload.json`\.
Copy file name to clipboardExpand all lines: doc_source/API_SourceAccessConfiguration.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ The type of authentication protocol, VPC components, or virtual host for your ev
12
12
+`VPC_SECURITY_GROUP`\- The VPC security group used to manage access to your self\-managed Apache Kafka brokers\.
13
13
+`SASL_SCRAM_256_AUTH`\- The Secrets Manager ARN of your secret key used for SASL SCRAM\-256 authentication of your self\-managed Apache Kafka brokers\.
14
14
+`SASL_SCRAM_512_AUTH`\- The Secrets Manager ARN of your secret key used for SASL SCRAM\-512 authentication of your self\-managed Apache Kafka brokers\.
15
-
+`VIRTUAL_HOST`\-\(Amazon MQ\) The name of the virtual host in your RabbitMQ broker\. Lambda uses this RabbitMQ host as the event source\.
15
+
+`VIRTUAL_HOST`\-\(Amazon MQ\) The name of the virtual host in your RabbitMQ broker\. Lambda uses this RabbitMQ host as the event source\. This property cannot be specified in an UpdateEventSourceMapping API call\.
The instruction set architecture that the function supports\. Enter a string array with one of the valid values\. The default value is `x86_64`\.
50
+
The instruction set architecture that the function supports\. Enter a string array with one of the valid values\(arm64 or x86\_64\)\. The default value is `x86_64`\.
Copy file name to clipboardExpand all lines: doc_source/configuration-envvars.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -217,7 +217,7 @@ Lambda always provides server\-side encryption at rest with an AWS KMS key\. By
217
217
218
218
If you prefer, you can provide an AWS KMS customer managed key instead\. You might do this to have control over rotation of the KMS key or to meet the requirements of your organization for managing KMS keys\. When you use a customer managed key, only users in your account with access to the KMS key can view or manage environment variables on the function\.
219
219
220
-
Customer managed keys incur standard AWS KMS charges\. For more information, see [AWS Key Management Service pricing](https://aws.amazon.com/kms/pricing/), in the *AWS KMS produt pages*\.
220
+
Customer managed keys incur standard AWS KMS charges\. For more information, see [AWS Key Management Service pricing](https://aws.amazon.com/kms/pricing/), in the *AWS KMS product pages*\.
221
221
222
222
**Security in transit**
223
223
For additional security, you can enable helpers for encryption in transit, which ensures that your environment variables are encrypted client\-side for protection in transit\.
Copy file name to clipboardExpand all lines: doc_source/configuration-filesystem.md
+58-38
Original file line number
Diff line number
Diff line change
@@ -3,39 +3,27 @@
3
3
You can configure a function to mount an Amazon Elastic File System \(Amazon EFS\) file system to a local directory\. With Amazon EFS, your function code can access and modify shared resources safely and at high concurrency\.
4
4
5
5
**Topics**
6
-
+[Connecting to a file system \(console\)](#configuration-filesystem-config)
7
-
+[Configuring a file system and access point](#configuration-filesystem-setup)
8
6
+[Execution role and user permissions](#configuration-filesystem-permissions)
7
+
+[Configuring a file system and access point](#configuration-filesystem-setup)
8
+
+[Connecting to a file system \(console\)](#configuration-filesystem-config)
9
9
+[Configuring file system access with the Lambda API](#configuration-filesystem-api)
10
10
+[AWS CloudFormation and AWS SAM](#configuration-filesystem-cloudformation)
## Connecting to a file system \(console\)<aname="configuration-filesystem-config"></a>
14
-
15
-
A function connects to a file system over the local network in a VPC\. The subnets that your function connects to can be the same subnets that contain mount points for your file system, or subnets in the same Availability Zone that can route NFS traffic \(port 2049\) to the file system\.
16
-
17
-
**Note**
18
-
If your function is not already connected to a VPC, see [Configuring a Lambda function to access resources in a VPC](configuration-vpc.md)\.
19
-
20
-
**To configure file system access**
21
-
22
-
1. Open the [Functions page](https://console.aws.amazon.com/lambda/home#/functions) on the Lambda console\.
23
-
24
-
1. Choose a function\.
13
+
## Execution role and user permissions<aname="configuration-filesystem-permissions"></a>
25
14
26
-
1. Choose **Configuration** and then choose **File systems**\.
15
+
Lambda uses your function's permissions to mount file systems\. To connect to a file system, your function's execution role must have the following permissions in addition to the [permissions required to connect to the file system's VPC](configuration-vpc.md#vpc-permissions):
27
16
28
-
1. Under **File system**, choose **Add file system**\.
17
+
**Execution role permissions**
18
+
+**elasticfilesystem:ClientMount**
19
+
+**elasticfilesystem:ClientWrite\(not required for read\-only connections\)**
29
20
30
-
1. Configure the following properties:
31
-
+**EFS file system** – The access point for a file system in the same VPC\.
32
-
+**Local mount path** – The location where the file system is mounted on the Lambda function, starting with `/mnt/`\.
21
+
These permissions are included in the **AmazonElasticFileSystemClientReadWriteAccess** managed policy\.
33
22
34
-
**Pricing**
35
-
Amazon EFS charges for storage and throughput, with rates that vary by storage class\. For details, see [Amazon EFS pricing](https://aws.amazon.com/efs/pricing)\.
36
-
Lambda charges for data transfer between VPCs\. This only applies if your function's VPC is peered to another VPC with a file system\. The rates are the same as for Amazon EC2 data transfer between VPCs in the same Region\. For details, see [Lambda pricing](https://aws.amazon.com/lambda/pricing)\.
23
+
When you configure a file system, Lambda uses your permissions to verify mount targets\. To configure a function to connect to a file system, your IAM user needs the following permissions:
37
24
38
-
For more information about Lambda's integration with Amazon EFS, see [Using Amazon EFS with Lambda](services-efs.md)\.
25
+
**User permissions**
26
+
+**elasticfilesystem:DescribeMountTargets**
39
27
40
28
## Configuring a file system and access point<aname="configuration-filesystem-setup"></a>
41
29
@@ -61,20 +49,32 @@ For more information, see the following topics in the *Amazon Elastic File Syste
61
49
+[Creating resources for Amazon EFS](https://docs.aws.amazon.com/efs/latest/ug/creating-using.html)
62
50
+[Working with users, groups, and permissions](https://docs.aws.amazon.com/efs/latest/ug/accessing-fs-nfs-permissions.html)
63
51
64
-
## Execution role and user permissions<aname="configuration-filesystem-permissions"></a>
52
+
## Connecting to a file system \(console\)<aname="configuration-filesystem-config"></a>
65
53
66
-
Lambda uses your function's permissions to mount file systems\. To connect to a file system, your function's execution role must have the following permissions in addition to the [permissions required to connect to the file system's VPC](configuration-vpc.md#vpc-permissions):
54
+
A function connects to a file system over the local network in a VPC\. The subnets that your function connects to can be the same subnets that contain mount points for your file system, or subnets in the same Availability Zone that can route NFS traffic \(port 2049\)to the file system\.
67
55
68
-
**Execution role permissions**
69
-
+**elasticfilesystem:ClientMount**
70
-
+**elasticfilesystem:ClientWrite\(not required for read\-only connections\)**
56
+
**Note**
57
+
If your function is not already connected to a VPC, see [Configuring a Lambda function to access resources in a VPC](configuration-vpc.md)\.
71
58
72
-
These permissions are included in the **AmazonElasticFileSystemClientReadWriteAccess** managed policy\.
59
+
**To configure file system access**
73
60
74
-
When you configure a file system, Lambda uses your permissions to verify mount targets\. To configure a function to connect to a file system, your IAM user needs the following permissions:
61
+
1. Open the [Functions page](https://console.aws.amazon.com/lambda/home#/functions) on the Lambda console\.
75
62
76
-
**User permissions**
77
-
+**elasticfilesystem:DescribeMountTargets**
63
+
1. Choose a function\.
64
+
65
+
1. Choose **Configuration** and then choose **File systems**\.
66
+
67
+
1. Under **File system**, choose **Add file system**\.
68
+
69
+
1. Configure the following properties:
70
+
+**EFS file system** – The access point for a file system in the same VPC\.
71
+
+**Local mount path** – The location where the file system is mounted on the Lambda function, starting with `/mnt/`\.
72
+
73
+
**Pricing**
74
+
Amazon EFS charges for storage and throughput, with rates that vary by storage class\. For details, see [Amazon EFS pricing](https://aws.amazon.com/efs/pricing)\.
75
+
Lambda charges for data transfer between VPCs\. This only applies if your function's VPC is peered to another VPC with a file system\. The rates are the same as for Amazon EC2 data transfer between VPCs in the same Region\. For details, see [Lambda pricing](https://aws.amazon.com/lambda/pricing)\.
76
+
77
+
For more information about Lambda's integration with Amazon EFS, see [Using Amazon EFS with Lambda](services-efs.md)\.
78
78
79
79
## Configuring file system access with the Lambda API<aname="configuration-filesystem-api"></a>
80
80
@@ -130,6 +130,7 @@ You can use AWS CloudFormation and the AWS Serverless Application Model \(AWS SA
130
130
**Example template\.yml – File system configuration**
For your function to access the container image in Amazon ECR, you can add `ecr:BatchGetImage` and `ecr:GetDownloadUrlForLayer` permissions to your Amazon ECR repository\. The following example shows the minimum policy:
40
+
For a function in the same account as the container image in Amazon ECR, you can add `ecr:BatchGetImage` and `ecr:GetDownloadUrlForLayer` permissions to your Amazon ECR repository\. The following example shows the minimum policy:
41
41
42
42
```
43
43
{
@@ -59,6 +59,53 @@ If the Amazon ECR repository does not include these permissions, Lambda adds `ec
59
59
60
60
To view or edit your Amazon ECR repository permissions, follow the directions in [Setting a repository policy statement](https://docs.aws.amazon.com/AmazonECR/latest/userguide/set-repository-policy.html) in the *Amazon Elastic Container Registry User Guide*\.
A different account in the same region can create a function that uses a container image owned by your account\. In the following example, your Amazon ECR repository permissions policy needs the following statements to grant access to account number 123456789012\.
65
+
+**CrossAccountPermission** – Allows account 123456789012 to create and update Lambda functions that use images from this ECR repository\.
66
+
+**LambdaECRImageCrossAccountRetrievalPolicy** – Lambda will eventually set a function's state to inactive if it is not invoked for an extended period\. This statement is required so that Lambda can retrieve the container image for optimization and caching on behalf of the function owned by 123456789012\.
67
+
68
+
**Example Add cross\-account permission to your repository**
To give access to multiple accounts, you add the account IDs to the Principal list in the `CrossAccountPermission` policy and to the Condition evaluation list in the `LambdaECRImageCrossAccountRetrievalPolicy`\.
106
+
107
+
If you are working with multiple accounts in an AWS Organization, we recommend that you enumerate each account ID in the ECR permissions policy\. This approach aligns with the AWS security best practice of setting narrow permissions in IAM policies\.
108
+
62
109
## Override the container settings<aname="configuration-images-settings"></a>
63
110
64
111
You can use the Lambda console or the Lambda API to override the following container image settings:
@@ -163,7 +210,7 @@ To create a function defined as container image, use the `create-function` comma
163
210
164
211
When you create the function, you can specify the instruction set architecture\. The default architecture is `x86-64`\. Make sure that the code in your container image is compatible with the architecture\.
165
212
166
-
Note that you must create the function from the same account as the container registry in Amazon ECR\.
213
+
You can create the function from the same account as the container registry or from a different account in the same region as the container registry in Amazon ECR\. For cross\-account access, adjust the [Amazon ECR permissions](#configuration-images-xaccount-permissions) for the image\.
0 commit comments