Skip to content

Commit 94b3498

Browse files
committed
Periodic update
1 parent 6c005f9 commit 94b3498

File tree

99 files changed

+1270
-607
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+1270
-607
lines changed

doc_source/access-control-identity-based.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ The permissions in the policy are organized into statements based on the [resour
170170

171171
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\.
172172

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)\.
174174

175175
## Layer development and use<a name="permissions-user-layer"></a>
176176

doc_source/access-control-resource-based.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ For Lambda functions, you can [grant an account permission](#permissions-resourc
1010

1111
1. Choose a function\.
1212

13-
1. Choose **Permissions**\.
13+
1. Choose **Configuration** and then choose **Permissions**\.
1414

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`\.
1616
**Example Resource\-based policy**
1717

1818
```
@@ -22,7 +22,7 @@ For Lambda functions, you can [grant an account permission](#permissions-resourc
2222
"Statement": [
2323
{
2424
"Sid": "lambda-allow-s3-my-function",
25-
"Effect": "Allow",
25+
"Effect": "Allow",
2626
"Principal": {
2727
"Service": "s3.amazonaws.com"
2828
},
@@ -31,12 +31,12 @@ For Lambda functions, you can [grant an account permission](#permissions-resourc
3131
"Condition": {
3232
"StringEquals": {
3333
"AWS:SourceAccount": "123456789012"
34-
},
34+
},
3535
"ArnLike": {
36-
"AWS:SourceArn": "arn:aws:s3:::my-bucket"
36+
"AWS:SourceArn": "arn:aws:s3:::my-bucket"
3737
}
38-
}
39-
}
38+
}
39+
}
4040
]
4141
}
4242
```

doc_source/configuration-aliases.md

+7-10
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@ You can create one or more aliases for your Lambda function\. A Lambda alias is
66

77
1. Open the [Functions page](https://console.aws.amazon.com/lambda/home#/functions) on the Lambda console\.
88

9-
1. Choose the name of a function\.
9+
1. Choose a function\.
1010

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**\.
1312

1413
1. On the **Create alias** page, do the following:
1514

@@ -23,8 +22,6 @@ You can create one or more aliases for your Lambda function\. A Lambda alias is
2322

2423
1. Choose **Save**\.
2524

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-
2825
## Managing aliases with the Lambda API<a name="versioning-aliases-api"></a>
2926

3027
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
8481
+ Both versions must be published\. The alias cannot point to `$LATEST`\.
8582

8683
**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)\.
8786

8887
1. Open the [Functions page](https://console.aws.amazon.com/lambda/home#/functions) on the Lambda console\.
8988

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\.
9390

94-
1. Choose **Actions**, **Create alias**\.
91+
1. Choose **Aliases** and then choose **Create alias**\.
9592

9693
1. On the **Create alias** page, do the following:
9794

@@ -130,7 +127,7 @@ aws lambda update-alias --name routing-alias --function-name my-function \
130127
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\.
131128

132129
```
133-
aws lambda update-alias --name routing-alias --function-name my-function \
130+
aws lambda update-alias --name routing-alias --function-name my-function \
134131
--function-version 2 --routing-config AdditionalVersionWeights={}
135132
```
136133

doc_source/configuration-concurrency.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ To manage reserved concurrency settings for a function, use the Lambda console\.
3636

3737
1. Choose a function\.
3838

39+
1. Choose **Configuration** and then choose **Concurrency**\.
40+
3941
1. Under **Concurrency**, choose **Edit**\.
4042

4143
1. Choose **Reserve concurrency**\. Enter the amount of concurrency to reserve for the function\.
@@ -70,7 +72,9 @@ To manage provisioned concurrency settings for a version or alias, use the Lambd
7072

7173
1. Choose a function\.
7274

73-
1. Under **Provisioned concurrency configurations**, choose **Add**\.
75+
1. Choose **Configuration** and then choose **Concurrency**\.
76+
77+
1. Under **Provisioned concurrency configurations**, choose **Add configuration**\.
7478

7579
1. Choose an alias or version\.
7680

doc_source/configuration-console.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22

33
You can use the Lambda console to configure function settings, add triggers and destinations, and update and test your code\.
44

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\.
66

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)
88

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\.
1010

1111
You can use it to configure triggers, layers, and destinations\.
1212
+ **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)\.
1313
+ **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\.
1414
+ **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\.
1515

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:
1717

1818
**Function settings**
1919
+ **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**\.

doc_source/configuration-database.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ You can use the Lambda console to create an Amazon RDS Proxy database proxy for
88

99
1. Choose a function\.
1010

11+
1. Choose **Configuration** and then choose **Database proxies**\.
12+
1113
1. Choose **Add database proxy**\.
1214

1315
1. Configure the following options\.
@@ -46,7 +48,7 @@ You can create a database proxy that uses the function's IAM credentials for aut
4648

4749
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\.
4850

49-
**Example [dbadmin/index\-iam\.js](https://github.com/awsdocs/aws-lambda-developer-guide/blob/main/sample-apps/rds-mysql/dbadmin/index-iam.js) – AWS SDK signer**
51+
**Example [dbadmin/index\-iam\.js](https://github.com/awsdocs/aws-lambda-developer-guide/blob/master/sample-apps/rds-mysql/dbadmin/index-iam.js) – AWS SDK signer**
5052

5153
```
5254
const signer = new AWS.RDS.Signer({
@@ -82,4 +84,4 @@ Sample applications that demonstrate the use of Lambda with an Amazon RDS databa
8284

8385
[ ![\[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)
8486

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)\.

doc_source/configuration-envvars.md

+9-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ You set environment variables on the unpublished version of your function by spe
1313

1414
1. Choose a function\.
1515

16-
1. Under **Environment variables**, choose **Edit**\.
16+
1. Choose **Code** if it is not already selected\.
17+
18+
1. Scroll down\. Under **Environment variables**, choose **Edit**\.
1719

1820
1. Choose **Add environment variable**\.
1921

@@ -155,7 +157,9 @@ When you provide the key, only users in your account with access to the key can
155157

156158
1. Choose a function\.
157159

158-
1. Under **Environment variables**, choose **Edit**\.
160+
1. Choose **Code** if it is not already selected\.
161+
162+
1. Scroll down\. Under **Environment variables**, choose **Edit**\.
159163

160164
1. Expand **Encryption configuration**\.
161165

@@ -206,7 +210,9 @@ You can also encrypt environment variable values on the client side before sendi
206210

207211
1. Choose a function\.
208212

209-
1. Under **Environment variables**, choose **Edit**\.
213+
1. Choose **Code** if it is not already selected\.
214+
215+
1. Scroll down\. Under **Environment variables**, choose **Edit**\.
210216

211217
1. Expand **Encryption configuration**\.
212218

doc_source/configuration-filesystem.md

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ If your function is not already connected to a VPC, see [Configuring a Lambda fu
1313

1414
1. Choose a function\.
1515

16+
1. Choose **Configuration** and then choose **File systems**\.
17+
1618
1. Under **File system**, choose **Add file system**\.
1719

1820
1. Configure the following properties:

doc_source/configuration-layers.md

+72-49
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ You can configure your Lambda function to pull in additional code and content in
55
**Note**
66
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\.
77

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`\)\.
99

1010
**Note**
1111
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
200200

201201
## Include library dependencies in a layer<a name="configuration-layers-path"></a>
202202

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\.
206-
+ **Node\.js**`nodejs/node_modules`, `nodejs/node8/node_modules` \(`NODE_PATH`\)
207-
**Example AWS X\-Ray SDK for Node\.js**
208-
209-
```
210-
xray-sdk.zip
211-
└ nodejs/node_modules/aws-xray-sdk
212-
```
213-
+ **Python**`python`, `python/lib/python3.8/site-packages` \(site directories\)
214-
**Example Pillow**
215-
216-
```
217-
pillow.zip
218-
│ python/PIL
219-
└ python/Pillow-5.3.0.dist-info
220-
```
221-
+ **Ruby**`ruby/gems/2.5.0` \(`GEM_PATH`\), `ruby/lib` \(`RUBYLIB`\)
222-
**Example JSON**
223-
224-
```
225-
json.zip
226-
└ ruby/gems/2.5.0/
227-
| build_info
228-
| cache
229-
| doc
230-
| extensions
231-
| gems
232-
| └ json-2.1.0
233-
└ specifications
234-
└ json-2.1.0.gemspec
235-
```
236-
+ **Java**`java/lib` \(classpath\)
237-
**Example Jackson**
238-
239-
```
240-
jackson.zip
241-
└ java/lib/jackson-core-2.2.3.jar
242-
```
243-
+ **All**`bin` \(`PATH`\), `lib` \(`LD_LIBRARY_PATH`\)
244-
**Example JQ**
245-
246-
```
247-
jq.zip
248-
└ bin/jq
249-
```
203+
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+
------
250273

251274
For more information about path settings in the Lambda execution environment, see [Runtime environment variables](configuration-envvars.md#configuration-envvars-runtime)\.
252275

@@ -275,7 +298,7 @@ For more examples, see [Granting layer access to other accounts](access-control-
275298

276299
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\.
277300

278-
**Example [blank\-nodejs/template\.yml](https://github.com/awsdocs/aws-lambda-developer-guide/blob/main/sample-apps/blank-nodejs/template.yml) – Serverless resources**
301+
**Example [blank\-nodejs/template\.yml](https://github.com/awsdocs/aws-lambda-developer-guide/blob/master/sample-apps/blank-nodejs/template.yml) – Serverless resources**
279302

280303
```
281304
AWSTemplateFormatVersion: '2010-09-09'

doc_source/configuration-tags.md

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ You can tag Lambda functions to organize them by owner, project or department\.
88

99
1. Choose a function\.
1010

11+
1. Choose **Configuration** and then choose **Tags**\.
12+
1113
1. Under **Tags**, choose **Manage tags**\.
1214

1315
1. Enter a key and value\. To add additional tags, choose **Add new tag**\.

doc_source/configuration-versions.md

+2-8
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,14 @@ You can change the function code and settings only on the unpublished version of
1414

1515
1. Open the [Functions page](https://console.aws.amazon.com/lambda/home#/functions) on the Lambda console\.
1616

17-
1. Choose the name of the function that you want to publish\.
17+
1. Choose a function and then choose **Versions**\.
1818

19-
1. On the function configuration page, choose **Actions**, **Publish new version**\.
19+
1. On the versions configuration page, choose **Publish new version**\.
2020

2121
1. \(Optional\) Enter a version description\.
2222

2323
1. Choose **Publish**\.
2424

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-
3125
## Managing versions with the Lambda API<a name="versioning-versions-api"></a>
3226

3327
To publish a version of a function, use the [PublishVersion](API_PublishVersion.md) API operation\.

0 commit comments

Comments
 (0)