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
Copy file name to clipboardExpand all lines: doc_source/access-control-identity-based.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -170,7 +170,7 @@ The permissions in the policy are organized into statements based on the [resour
170
170
171
171
This policy allows a user to get started with Lambda, without putting other users' resources at risk\. It doesn't allow a user to configure a function to be triggered by or call other AWS services, which requires broader IAM permissions\. It also doesn't include permission to services that don't support limited\-scope policies, like CloudWatch and X\-Ray\. Use the read\-only policies for these services to give the user access to metrics and trace data\.
172
172
173
-
When you configure triggers for your function, you need access to use the AWS service that invokes your function\. For example, to configure an Amazon S3 trigger, you need permission to use the Amazon S3 actions that manage bucket notifications\. Many of these permissions are included in the **AWSLambdaFullAccess** managed policy\. Example policies are available in this guide's [GitHub repository](https://github.com/awsdocs/aws-lambda-developer-guide/tree/main/iam-policies)\.
173
+
When you configure triggers for your function, you need access to use the AWS service that invokes your function\. For example, to configure an Amazon S3 trigger, you need permission to use the Amazon S3 actions that manage bucket notifications\. Many of these permissions are included in the **AWSLambdaFullAccess** managed policy\. Example policies are available in this guide's [GitHub repository](https://github.com/awsdocs/aws-lambda-developer-guide/tree/master/iam-policies)\.
174
174
175
175
## Layer development and use<aname="permissions-user-layer"></a>
Copy file name to clipboardExpand all lines: doc_source/access-control-resource-based.md
+7-7
Original file line number
Diff line number
Diff line change
@@ -10,9 +10,9 @@ For Lambda functions, you can [grant an account permission](#permissions-resourc
10
10
11
11
1. Choose a function\.
12
12
13
-
1. Choose **Permissions**\.
13
+
1. Choose **Configuration** and then choose **Permissions**\.
14
14
15
-
1. The resource\-based policy shows the permissions that are applied when another account or AWS service attempts to access the function\. The following example shows a statement that allows Amazon S3 to invoke a function named `my-function` for a bucket named `my-bucket` in account `123456789012`\.
15
+
1.Scroll down to **Resource\-based policy** and then choose **View policy document**\.The resource\-based policy shows the permissions that are applied when another account or AWS service attempts to access the function\. The following example shows a statement that allows Amazon S3 to invoke a function named `my-function` for a bucket named `my-bucket` in account `123456789012`\.
16
16
**Example Resource\-based policy**
17
17
18
18
```
@@ -22,7 +22,7 @@ For Lambda functions, you can [grant an account permission](#permissions-resourc
22
22
"Statement": [
23
23
{
24
24
"Sid": "lambda-allow-s3-my-function",
25
-
"Effect": "Allow",
25
+
"Effect": "Allow",
26
26
"Principal": {
27
27
"Service": "s3.amazonaws.com"
28
28
},
@@ -31,12 +31,12 @@ For Lambda functions, you can [grant an account permission](#permissions-resourc
Copy file name to clipboardExpand all lines: doc_source/configuration-aliases.md
+7-10
Original file line number
Diff line number
Diff line change
@@ -6,10 +6,9 @@ You can create one or more aliases for your Lambda function\. A Lambda alias is
6
6
7
7
1. Open the [Functions page](https://console.aws.amazon.com/lambda/home#/functions) on the Lambda console\.
8
8
9
-
1. Choose the name of a function\.
9
+
1. Choose a function\.
10
10
11
-
1. On the function configuration page, choose **Actions**, **Create alias**\.
12
-
![\[Image NOT FOUND\]](http://docs.aws.amazon.com/lambda/latest/dg/images/version-actions.png)
11
+
1. Choose **Aliases** and then choose **Create alias**\.
13
12
14
13
1. On the **Create alias** page, do the following:
15
14
@@ -23,8 +22,6 @@ You can create one or more aliases for your Lambda function\. A Lambda alias is
23
22
24
23
1. Choose **Save**\.
25
24
26
-
To view the aliases that are currently defined for a function, on the function configuration page, choose **Qualifiers**, and then choose the **Aliases** tab\.
27
-
28
25
## Managing aliases with the Lambda API<aname="versioning-aliases-api"></a>
29
26
30
27
To create an alias using the AWS Command Line Interface \(AWS CLI\), use the [https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lambda/create-alias.html](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lambda/create-alias.html) command\.
@@ -84,14 +81,14 @@ You can point an alias to a maximum of two Lambda function versions\. The versio
84
81
+ Both versions must be published\. The alias cannot point to `$LATEST`\.
85
82
86
83
**To configure routing on an alias**
84
+
**Note**
85
+
Verify that the function has at least two published versions\. To create additional versions, follow the instructions in [Lambda function versions](configuration-versions.md)\.
87
86
88
87
1. Open the [Functions page](https://console.aws.amazon.com/lambda/home#/functions) on the Lambda console\.
89
88
90
-
1. Choose the name of a function\.
91
-
92
-
1. Verify that the function has at least two published versions\. On the function configuration page, choose **Qualifiers**, and then choose the **Versions** tab to display the list of versions\. To create additional versions, follow the instructions in [Lambda function versions](configuration-versions.md)\.
89
+
1. Choose a function\.
93
90
94
-
1. Choose **Actions**,**Create alias**\.
91
+
1. Choose **Aliases** and then choose**Create alias**\.
95
92
96
93
1. On the **Create alias** page, do the following:
To route all traffic to version 2, use the `update-alias` command to change the `function-version` property to point the alias to version 2\. The command also resets the routing configuration\.
Copy file name to clipboardExpand all lines: doc_source/configuration-console.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -2,18 +2,18 @@
2
2
3
3
You can use the Lambda console to configure function settings, add triggers and destinations, and update and test your code\.
4
4
5
-
To manage a function, open the Lambda console [Functions page](https://console.aws.amazon.com/lambda/home#/functions) and choose a function\. Under **Aliases**, choose `Latest`\. The function designer is near the top of the page\.
5
+
To manage a function, open the Lambda console [Functions page](https://console.aws.amazon.com/lambda/home#/functions) and choose a function\.
6
6
7
-
![\[The function designer in the AWS Lambda console.\]](http://docs.aws.amazon.com/lambda/latest/dg/images/console-designer.png)
7
+
![\[The function overview in the AWS Lambda console.\]](http://docs.aws.amazon.com/lambda/latest/dg/images/console-designer.png)
8
8
9
-
The designer shows an overview of your function and its upstream and downstream resources\.
9
+
The function overview shows a visualization of your function and its upstream and downstream resources\.
10
10
11
11
You can use it to configure triggers, layers, and destinations\.
12
12
+**Triggers** – Triggers are services and resources that you have configured to invoke your function\. Choose **Add trigger** to create a Lambda [event source mapping](invocation-eventsourcemapping.md) or to configure a trigger in another service that the Lambda console integrates with\. For details about these services and others, see [Using AWS Lambda with other services](lambda-services.md)\.
13
13
+**Layers** – Choose the **Layers** node to add [layers](configuration-layers.md) to your application\. A layer is a \.zip file archive that contains libraries, a custom runtime, or other dependencies\.
14
14
+**Destinations** – Add a destination to your function to send details about invocation results to another service\. You can send invocation records when your function is invoked [asynchronously](invocation-async.md), or by an [event source mapping](invocation-eventsourcemapping.md) that reads from a stream\.
15
15
16
-
With the `Latest` function version selected, you can modify the following settings\.
16
+
By default you are working with the `Latest` function version\. You can modify the following settings in this version:
17
17
18
18
**Function settings**
19
19
+**Code** – The code and dependencies of your function\. For scripting languages, you can edit your function code in the embedded [editor](code-editor.md)\. To add libraries, or for languages that the editor doesn't support, or to create a function deployed as a container image, upload a [deployment package](gettingstarted-package.md)\. If your deployment package is larger than 50 MB, choose **Upload a file from Amazon S3**\.
Copy file name to clipboardExpand all lines: doc_source/configuration-database.md
+4-2
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,8 @@ You can use the Lambda console to create an Amazon RDS Proxy database proxy for
8
8
9
9
1. Choose a function\.
10
10
11
+
1. Choose **Configuration** and then choose **Database proxies**\.
12
+
11
13
1. Choose **Add database proxy**\.
12
14
13
15
1. Configure the following options\.
@@ -46,7 +48,7 @@ You can create a database proxy that uses the function's IAM credentials for aut
46
48
47
49
The Lambda console adds the required permission \(`rds-db:connect`\) to the execution role\. You can then use the AWS SDK to generate a token that allows it to connect to the proxy\. The following example shows how to configure a database connection with the `mysql2` library in Node\.js\.
@@ -82,4 +84,4 @@ Sample applications that demonstrate the use of Lambda with an Amazon RDS databa
82
84
83
85
[![\[The processor function processes Kinesis events and stores the events in a MySQL database.\]](http://docs.aws.amazon.com/lambda/latest/dg/images/sample-listmanager.png)](https://github.com/awsdocs/aws-lambda-developer-guide/tree/main/sample-apps/list-manager)
84
86
85
-
To use the sample applications, follow the instructions in the GitHub repository: [RDS MySQL](https://github.com/awsdocs/aws-lambda-developer-guide/blob/main/sample-apps/rds-mysql/README.md), [List Manager](https://github.com/awsdocs/aws-lambda-developer-guide/blob/main/sample-apps/list-manager/README.md)\.
87
+
To use the sample applications, follow the instructions in the GitHub repository: [RDS MySQL](https://github.com/awsdocs/aws-lambda-developer-guide/blob/master/sample-apps/rds-mysql/README.md), [List Manager](https://github.com/awsdocs/aws-lambda-developer-guide/blob/master/sample-apps/list-manager/README.md)\.
Copy file name to clipboardExpand all lines: doc_source/configuration-layers.md
+72-49
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ You can configure your Lambda function to pull in additional code and content in
5
5
**Note**
6
6
Functions defined as container images do not support layers\. When you build a container image, you can package your preferred runtimes and dependencies as a part of the image\.
7
7
8
-
Layers let you keep your deployment package small, which makes development easier\. You can avoid errors that can occur when you install and package dependencies with your function code\. For Node\.js, Python, and Ruby functions, you can [develop your function code in the Lambda console](code-editor.md) as long as you keep your deployment package under 3 MB\.
8
+
Layers let you keep your deployment package small, which makes development easier\. You can avoid errors that can occur when you install and package dependencies with your function code\. For Node\.js, Python, and Ruby functions, you can [develop your function code in the Lambda console](code-editor.md) as long as you keep your deployment package under 3 MB\(and each code file under `512 KB`\)\.
9
9
10
10
**Note**
11
11
A function can use up to five layers at a time\. The total unzipped size of the function and all layers can't exceed the unzipped deployment package size limit of 250 MB\. For more information, see [Lambda quotas](gettingstarted-limits.md)\.
@@ -200,53 +200,76 @@ When you delete a layer version, you can no longer configure functions to use it
200
200
201
201
## Include library dependencies in a layer<aname="configuration-layers-path"></a>
202
202
203
-
You can move runtime dependencies out of your Lambda function code by placing them in a layer\. Lambda runtimes include paths in the `/opt` directory to ensure that your function code has access to libraries that are included in layers\.
204
-
205
-
To include libraries in a layer, place them in one of the folders that your runtime supports, or modify that path variable for your language\.
You can move runtime dependencies out of your Lambda function by placing them in a layer\. Each Lambda runtime includes the paths to specific folders in the `/opt` directory\. Define the same folder structure in your layer \.zip archive to ensure that your function code has access to the libraries in that layer\.
204
+
205
+
To include libraries in a layer, place them in one of the folders that your runtime supports, or modify that path variable for your language\. The following table lists the folder paths that each runtime supports\.
206
+
207
+
208
+
**Layer paths for each Lambda runtime**
209
+
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html)
210
+
211
+
The following examples show how you can structure the folders for your layer\.
212
+
213
+
------
214
+
#### [ Node\.js ]
215
+
216
+
**Example file structure for AWS X\-Ray SDK**
217
+
218
+
```
219
+
xray-sdk.zip
220
+
└ nodejs/node_modules/aws-xray-sdk
221
+
```
222
+
223
+
------
224
+
#### [ Python ]
225
+
226
+
**Example file structure for the Pillow library**
227
+
228
+
```
229
+
pillow.zip
230
+
│ python/PIL
231
+
└ python/Pillow-5.3.0.dist-info
232
+
```
233
+
234
+
------
235
+
#### [ Ruby ]
236
+
237
+
**Example file structure for JSON gem**
238
+
239
+
```
240
+
json.zip
241
+
└ ruby/gems/2.5.0/
242
+
| build_info
243
+
| cache
244
+
| doc
245
+
| extensions
246
+
| gems
247
+
| └ json-2.1.0
248
+
└ specifications
249
+
└ json-2.1.0.gemspec
250
+
```
251
+
252
+
------
253
+
#### [ Java ]
254
+
255
+
**Example file structure for Jackson jar file**
256
+
257
+
```
258
+
jackson.zip
259
+
└ java/lib/jackson-core-2.2.3.jar
260
+
```
261
+
262
+
------
263
+
#### [ All ]
264
+
265
+
**Example file structure for JQ library**
266
+
267
+
```
268
+
jq.zip
269
+
└ bin/jq
270
+
```
271
+
272
+
------
250
273
251
274
For more information about path settings in the Lambda execution environment, see [Runtime environment variables](configuration-envvars.md#configuration-envvars-runtime)\.
252
275
@@ -275,7 +298,7 @@ For more examples, see [Granting layer access to other accounts](access-control-
275
298
276
299
To automate the creation and mapping of layers in your application, use AWS SAM in your AWS CloudFormation templates\. The `AWS::Serverless::LayerVersion` resource type creates a layer version that you can reference from your Lambda function configuration\.
Copy file name to clipboardExpand all lines: doc_source/configuration-versions.md
+2-8
Original file line number
Diff line number
Diff line change
@@ -14,20 +14,14 @@ You can change the function code and settings only on the unpublished version of
14
14
15
15
1. Open the [Functions page](https://console.aws.amazon.com/lambda/home#/functions) on the Lambda console\.
16
16
17
-
1. Choose the name of the function that you want to publish\.
17
+
1. Choose a function and then choose **Versions**\.
18
18
19
-
1. On the function configuration page, choose**Actions**,**Publish new version**\.
19
+
1. On the versions configuration page, choose **Publish new version**\.
20
20
21
21
1.\(Optional\) Enter a version description\.
22
22
23
23
1. Choose **Publish**\.
24
24
25
-
After you publish the first version of a function, the Lambda console displays a dropdown list of the available versions\. The **Designer** panel displays a version qualifier at the end of the function name\.
26
-
27
-
![\[Image NOT FOUND\]](http://docs.aws.amazon.com/lambda/latest/dg/images/version-1-created.png)
28
-
29
-
To view the current versions of a function, on the function configuration page, choose **Qualifiers**, and then choose the **Versions** tab to see a list of versions for the function\. If you haven't published a new version of the function, the list only displays the `$LATEST` version\.
30
-
31
25
## Managing versions with the Lambda API<aname="versioning-versions-api"></a>
32
26
33
27
To publish a version of a function, use the [PublishVersion](API_PublishVersion.md) API operation\.
0 commit comments