Skip to content

Commit 4bc1fe1

Browse files
committed
language chapters, kinesis http2 event source, python 3.7
1 parent dc4353e commit 4bc1fe1

File tree

121 files changed

+1541
-1294
lines changed

Some content is hidden

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

121 files changed

+1541
-1294
lines changed

doc_source/API_CreateEventSourceMapping.md

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,11 @@
11
# CreateEventSourceMapping<a name="API_CreateEventSourceMapping"></a>
22

3-
Identifies a poll\-based event source for a Lambda function\. It can be either an Amazon Kinesis or DynamoDB stream\. AWS Lambda invokes the specified function when records are posted to the event source\.
3+
Creates a mapping between an event source and an AWS Lambda function\. Lambda reads items from the event source and triggers the function\.
44

5-
This association between a poll\-based source and a Lambda function is called the event source mapping\.
6-
7-
You provide mapping information \(for example, which stream or SQS queue to read from and which Lambda function to invoke\) in the request body\.
8-
9-
Amazon Kinesis or DynamoDB stream event sources can be associated with multiple AWS Lambda functions and a given Lambda function can be associated with multiple AWS event sources\. For Amazon SQS, you can configure multiple queues as event sources for a single Lambda function, but an SQS queue can be mapped only to a single Lambda function\.
10-
11-
You can configure an SQS queue in an account separate from your Lambda function's account\. Also the queue needs to reside in the same AWS region as your function\.
12-
13-
If you are using versioning, you can specify a specific function version or an alias via the function name parameter\. For more information about versioning, see [AWS Lambda Function Versioning and Aliases](https://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html)\.
14-
15-
This operation requires permission for the `lambda:CreateEventSourceMapping` action\.
5+
For details about each event source type, see the following topics\.
6+
+ [Using AWS Lambda with Amazon Kinesis](https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html)
7+
+ [Using AWS Lambda with Amazon SQS](https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html)
8+
+ [Using AWS Lambda with Amazon DynamoDB](https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html)
169

1710
## Request Syntax<a name="API_CreateEventSourceMapping_RequestSyntax"></a>
1811

@@ -39,44 +32,50 @@ The request does not use any URI parameters\.
3932
The request accepts the following data in JSON format\.
4033

4134
** [BatchSize](#API_CreateEventSourceMapping_RequestSyntax) ** <a name="SSS-CreateEventSourceMapping-request-BatchSize"></a>
42-
The largest number of records that AWS Lambda will retrieve from your event source at the time of invoking your function\. Your function receives an event with all the retrieved records\. The default for Amazon Kinesis and Amazon DynamoDB is 100 records\. Both the default and maximum for Amazon SQS are 10 messages\.
35+
The maximum number of items to retrieve in a single batch\.
36+
+ **Amazon Kinesis** \- Default 100\. Max 10,000\.
37+
+ **Amazon DynamoDB Streams** \- Default 100\. Max 1,000\.
38+
+ **Amazon Simple Queue Service** \- Default 10\. Max 10\.
4339
Type: Integer
4440
Valid Range: Minimum value of 1\. Maximum value of 10000\.
4541
Required: No
4642

4743
** [Enabled](#API_CreateEventSourceMapping_RequestSyntax) ** <a name="SSS-CreateEventSourceMapping-request-Enabled"></a>
48-
Set to false to disable the event source upon creation\.
44+
Disables the event source mapping to pause polling and invocation\.
4945
Type: Boolean
5046
Required: No
5147

5248
** [EventSourceArn](#API_CreateEventSourceMapping_RequestSyntax) ** <a name="SSS-CreateEventSourceMapping-request-EventSourceArn"></a>
5349
The Amazon Resource Name \(ARN\) of the event source\.
50+
+ **Amazon Kinesis** \- The ARN of the data stream or a stream consumer\.
51+
+ **Amazon DynamoDB Streams** \- The ARN of the stream\.
52+
+ **Amazon Simple Queue Service** \- The ARN of the queue\.
5453
Type: String
5554
Pattern: `arn:(aws[a-zA-Z0-9-]*):([a-zA-Z0-9\-])+:([a-z]{2}(-gov)?-[a-z]+-\d{1})?:(\d{12})?:(.*)`
5655
Required: Yes
5756

5857
** [FunctionName](#API_CreateEventSourceMapping_RequestSyntax) ** <a name="SSS-CreateEventSourceMapping-request-FunctionName"></a>
59-
The name of the lambda function\.
58+
The name of the Lambda function\.
6059

6160
**Name formats**
6261
+ **Function name** \- `MyFunction`\.
6362
+ **Function ARN** \- `arn:aws:lambda:us-west-2:123456789012:function:MyFunction`\.
6463
+ **Version or Alias ARN** \- `arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD`\.
6564
+ **Partial ARN** \- `123456789012:function:MyFunction`\.
66-
The length constraint applies only to the full ARN\. If you specify only the function name, it is limited to 64 characters in length\.
65+
The length constraint applies only to the full ARN\. If you specify only the function name, it's limited to 64 characters in length\.
6766
Type: String
6867
Length Constraints: Minimum length of 1\. Maximum length of 140\.
6968
Pattern: `(arn:(aws[a-zA-Z-]*)?:lambda:)?([a-z]{2}(-gov)?-[a-z]+-\d{1}:)?(\d{12}:)?(function:)?([a-zA-Z0-9-_]+)(:(\$LATEST|[a-zA-Z0-9-_]+))?`
7069
Required: Yes
7170

7271
** [StartingPosition](#API_CreateEventSourceMapping_RequestSyntax) ** <a name="SSS-CreateEventSourceMapping-request-StartingPosition"></a>
73-
The position in the DynamoDB or Kinesis stream where AWS Lambda should start reading\. For more information, see [GetShardIterator](https://docs.aws.amazon.com/kinesis/latest/APIReference/API_GetShardIterator.html#Kinesis-GetShardIterator-request-ShardIteratorType) in the *Amazon Kinesis API Reference Guide* or [GetShardIterator](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_streams_GetShardIterator.html) in the *Amazon DynamoDB API Reference Guide*\. The `AT_TIMESTAMP` value is supported only for [Kinesis streams](https://docs.aws.amazon.com/streams/latest/dev/amazon-kinesis-streams.html)\.
72+
The position in a stream from which to start reading\. Required for Amazon Kinesis and Amazon DynamoDB Streams sources\. `AT_TIMESTAMP` is only supported for Amazon Kinesis streams\.
7473
Type: String
7574
Valid Values:` TRIM_HORIZON | LATEST | AT_TIMESTAMP`
7675
Required: No
7776

7877
** [StartingPositionTimestamp](#API_CreateEventSourceMapping_RequestSyntax) ** <a name="SSS-CreateEventSourceMapping-request-StartingPositionTimestamp"></a>
79-
The timestamp of the data record from which to start reading\. Used with [shard iterator type](https://docs.aws.amazon.com/kinesis/latest/APIReference/API_GetShardIterator.html#Kinesis-GetShardIterator-request-ShardIteratorType) AT\_TIMESTAMP\. If a record with this exact timestamp does not exist, the iterator returned is for the next \(later\) record\. If the timestamp is older than the current trim horizon, the iterator returned is for the oldest untrimmed data record \(TRIM\_HORIZON\)\. Valid only for [Kinesis streams](https://docs.aws.amazon.com/streams/latest/dev/amazon-kinesis-streams.html)\.
78+
With `StartingPosition` set to `AT_TIMESTAMP`, the Unix time in seconds from which to start reading\.
8079
Type: Timestamp
8180
Required: No
8281

@@ -105,38 +104,38 @@ If the action is successful, the service sends back an HTTP 202 response\.
105104
The following data is returned in JSON format by the service\.
106105

107106
** [BatchSize](#API_CreateEventSourceMapping_ResponseSyntax) ** <a name="SSS-CreateEventSourceMapping-response-BatchSize"></a>
108-
The largest number of records that AWS Lambda will retrieve from your event source at the time of invoking your function\. Your function receives an event with all the retrieved records\.
107+
The maximum number of items to retrieve in a single batch\.
109108
Type: Integer
110109
Valid Range: Minimum value of 1\. Maximum value of 10000\.
111110

112111
** [EventSourceArn](#API_CreateEventSourceMapping_ResponseSyntax) ** <a name="SSS-CreateEventSourceMapping-response-EventSourceArn"></a>
113-
The Amazon Resource Name \(ARN\) of the Amazon Kinesis or DynamoDB stream that is the source of events\.
112+
The Amazon Resource Name \(ARN\) of the event source\.
114113
Type: String
115114
Pattern: `arn:(aws[a-zA-Z0-9-]*):([a-zA-Z0-9\-])+:([a-z]{2}(-gov)?-[a-z]+-\d{1})?:(\d{12})?:(.*)`
116115

117116
** [FunctionArn](#API_CreateEventSourceMapping_ResponseSyntax) ** <a name="SSS-CreateEventSourceMapping-response-FunctionArn"></a>
118-
The Lambda function to invoke when AWS Lambda detects an event on the poll\-based source\.
117+
The ARN of the Lambda function\.
119118
Type: String
120119
Pattern: `arn:(aws[a-zA-Z-]*)?:lambda:[a-z]{2}(-gov)?-[a-z]+-\d{1}:\d{12}:function:[a-zA-Z0-9-_]+(:(\$LATEST|[a-zA-Z0-9-_]+))?`
121120

122121
** [LastModified](#API_CreateEventSourceMapping_ResponseSyntax) ** <a name="SSS-CreateEventSourceMapping-response-LastModified"></a>
123-
The UTC time string indicating the last time the event mapping was updated\.
122+
The date that the event source mapping was last updated, in Unix time seconds\.
124123
Type: Timestamp
125124

126125
** [LastProcessingResult](#API_CreateEventSourceMapping_ResponseSyntax) ** <a name="SSS-CreateEventSourceMapping-response-LastProcessingResult"></a>
127-
The result of the last AWS Lambda invocation of your Lambda function\. This value will be null if an SQS queue is the event source\.
126+
The result of the last AWS Lambda invocation of your Lambda function\.
128127
Type: String
129128

130129
** [State](#API_CreateEventSourceMapping_ResponseSyntax) ** <a name="SSS-CreateEventSourceMapping-response-State"></a>
131-
The state of the event source mapping\. It can be `Creating`, `Enabled`, `Disabled`, `Enabling`, `Disabling`, `Updating`, or `Deleting`\.
130+
The state of the event source mapping\. It can be one of the following: `Creating`, `Enabling`, `Enabled`, `Disabling`, `Disabled`, `Updating`, or `Deleting`\.
132131
Type: String
133132

134133
** [StateTransitionReason](#API_CreateEventSourceMapping_ResponseSyntax) ** <a name="SSS-CreateEventSourceMapping-response-StateTransitionReason"></a>
135-
The reason the event source mapping is in its current state\. It is either user\-requested or an AWS Lambda\-initiated state transition\.
134+
The cause of the last state change, either `User initiated` or `Lambda initiated`\.
136135
Type: String
137136

138137
** [UUID](#API_CreateEventSourceMapping_ResponseSyntax) ** <a name="SSS-CreateEventSourceMapping-response-UUID"></a>
139-
The AWS Lambda assigned opaque identifier for the mapping\.
138+
The identifier of the event source mapping\.
140139
Type: String
141140

142141
## Errors<a name="API_CreateEventSourceMapping_Errors"></a>

doc_source/API_CreateFunction.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ Required: Yes
122122
** [Runtime](#API_CreateFunction_RequestSyntax) ** <a name="SSS-CreateFunction-request-Runtime"></a>
123123
The runtime version for the function\.
124124
Type: String
125-
Valid Values:` nodejs | nodejs4.3 | nodejs6.10 | nodejs8.10 | java8 | python2.7 | python3.6 | dotnetcore1.0 | dotnetcore2.0 | dotnetcore2.1 | nodejs4.3-edge | go1.x`
125+
Valid Values:` nodejs | nodejs4.3 | nodejs6.10 | nodejs8.10 | java8 | python2.7 | python3.6 | python3.7 | dotnetcore1.0 | dotnetcore2.0 | dotnetcore2.1 | nodejs4.3-edge | go1.x`
126126
Required: Yes
127127

128128
** [Tags](#API_CreateFunction_RequestSyntax) ** <a name="SSS-CreateFunction-request-Tags"></a>
@@ -266,7 +266,7 @@ Pattern: `arn:(aws[a-zA-Z-]*)?:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@\-_/]+`
266266
** [Runtime](#API_CreateFunction_ResponseSyntax) ** <a name="SSS-CreateFunction-response-Runtime"></a>
267267
The runtime environment for the Lambda function\.
268268
Type: String
269-
Valid Values:` nodejs | nodejs4.3 | nodejs6.10 | nodejs8.10 | java8 | python2.7 | python3.6 | dotnetcore1.0 | dotnetcore2.0 | dotnetcore2.1 | nodejs4.3-edge | go1.x`
269+
Valid Values:` nodejs | nodejs4.3 | nodejs6.10 | nodejs8.10 | java8 | python2.7 | python3.6 | python3.7 | dotnetcore1.0 | dotnetcore2.0 | dotnetcore2.1 | nodejs4.3-edge | go1.x`
270270

271271
** [Timeout](#API_CreateFunction_ResponseSyntax) ** <a name="SSS-CreateFunction-response-Timeout"></a>
272272
The amount of time that Lambda allows a function to run before terminating it\.

doc_source/API_DeleteEventSourceMapping.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# DeleteEventSourceMapping<a name="API_DeleteEventSourceMapping"></a>
22

3-
Removes an event source mapping\. This means AWS Lambda will no longer invoke the function for events in the associated source\.
4-
5-
This operation requires permission for the `lambda:DeleteEventSourceMapping` action\.
3+
Deletes an event source mapping\.
64

75
## Request Syntax<a name="API_DeleteEventSourceMapping_RequestSyntax"></a>
86

@@ -15,7 +13,7 @@ DELETE /2015-03-31/event-source-mappings/UUID HTTP/1.1
1513
The request requires the following URI parameters\.
1614

1715
** [UUID](#API_DeleteEventSourceMapping_RequestSyntax) ** <a name="SSS-DeleteEventSourceMapping-request-UUID"></a>
18-
The event source mapping ID\.
16+
The identifier of the event source mapping\.
1917

2018
## Request Body<a name="API_DeleteEventSourceMapping_RequestBody"></a>
2119

@@ -46,38 +44,38 @@ If the action is successful, the service sends back an HTTP 202 response\.
4644
The following data is returned in JSON format by the service\.
4745

4846
** [BatchSize](#API_DeleteEventSourceMapping_ResponseSyntax) ** <a name="SSS-DeleteEventSourceMapping-response-BatchSize"></a>
49-
The largest number of records that AWS Lambda will retrieve from your event source at the time of invoking your function\. Your function receives an event with all the retrieved records\.
47+
The maximum number of items to retrieve in a single batch\.
5048
Type: Integer
5149
Valid Range: Minimum value of 1\. Maximum value of 10000\.
5250

5351
** [EventSourceArn](#API_DeleteEventSourceMapping_ResponseSyntax) ** <a name="SSS-DeleteEventSourceMapping-response-EventSourceArn"></a>
54-
The Amazon Resource Name \(ARN\) of the Amazon Kinesis or DynamoDB stream that is the source of events\.
52+
The Amazon Resource Name \(ARN\) of the event source\.
5553
Type: String
5654
Pattern: `arn:(aws[a-zA-Z0-9-]*):([a-zA-Z0-9\-])+:([a-z]{2}(-gov)?-[a-z]+-\d{1})?:(\d{12})?:(.*)`
5755

5856
** [FunctionArn](#API_DeleteEventSourceMapping_ResponseSyntax) ** <a name="SSS-DeleteEventSourceMapping-response-FunctionArn"></a>
59-
The Lambda function to invoke when AWS Lambda detects an event on the poll\-based source\.
57+
The ARN of the Lambda function\.
6058
Type: String
6159
Pattern: `arn:(aws[a-zA-Z-]*)?:lambda:[a-z]{2}(-gov)?-[a-z]+-\d{1}:\d{12}:function:[a-zA-Z0-9-_]+(:(\$LATEST|[a-zA-Z0-9-_]+))?`
6260

6361
** [LastModified](#API_DeleteEventSourceMapping_ResponseSyntax) ** <a name="SSS-DeleteEventSourceMapping-response-LastModified"></a>
64-
The UTC time string indicating the last time the event mapping was updated\.
62+
The date that the event source mapping was last updated, in Unix time seconds\.
6563
Type: Timestamp
6664

6765
** [LastProcessingResult](#API_DeleteEventSourceMapping_ResponseSyntax) ** <a name="SSS-DeleteEventSourceMapping-response-LastProcessingResult"></a>
68-
The result of the last AWS Lambda invocation of your Lambda function\. This value will be null if an SQS queue is the event source\.
66+
The result of the last AWS Lambda invocation of your Lambda function\.
6967
Type: String
7068

7169
** [State](#API_DeleteEventSourceMapping_ResponseSyntax) ** <a name="SSS-DeleteEventSourceMapping-response-State"></a>
72-
The state of the event source mapping\. It can be `Creating`, `Enabled`, `Disabled`, `Enabling`, `Disabling`, `Updating`, or `Deleting`\.
70+
The state of the event source mapping\. It can be one of the following: `Creating`, `Enabling`, `Enabled`, `Disabling`, `Disabled`, `Updating`, or `Deleting`\.
7371
Type: String
7472

7573
** [StateTransitionReason](#API_DeleteEventSourceMapping_ResponseSyntax) ** <a name="SSS-DeleteEventSourceMapping-response-StateTransitionReason"></a>
76-
The reason the event source mapping is in its current state\. It is either user\-requested or an AWS Lambda\-initiated state transition\.
74+
The cause of the last state change, either `User initiated` or `Lambda initiated`\.
7775
Type: String
7876

7977
** [UUID](#API_DeleteEventSourceMapping_ResponseSyntax) ** <a name="SSS-DeleteEventSourceMapping-response-UUID"></a>
80-
The AWS Lambda assigned opaque identifier for the mapping\.
78+
The identifier of the event source mapping\.
8179
Type: String
8280

8381
## Errors<a name="API_DeleteEventSourceMapping_Errors"></a>

doc_source/API_EventSourceMappingConfiguration.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,49 @@
11
# EventSourceMappingConfiguration<a name="API_EventSourceMappingConfiguration"></a>
22

3-
Describes mapping between an Amazon Kinesis or DynamoDB stream and a Lambda function\.
3+
A mapping between an AWS resource and an AWS Lambda function\. See [CreateEventSourceMapping](API_CreateEventSourceMapping.md) for details\.
44

55
## Contents<a name="API_EventSourceMappingConfiguration_Contents"></a>
66

77
**BatchSize** <a name="SSS-Type-EventSourceMappingConfiguration-BatchSize"></a>
8-
The largest number of records that AWS Lambda will retrieve from your event source at the time of invoking your function\. Your function receives an event with all the retrieved records\.
8+
The maximum number of items to retrieve in a single batch\.
99
Type: Integer
1010
Valid Range: Minimum value of 1\. Maximum value of 10000\.
1111
Required: No
1212

1313
**EventSourceArn** <a name="SSS-Type-EventSourceMappingConfiguration-EventSourceArn"></a>
14-
The Amazon Resource Name \(ARN\) of the Amazon Kinesis or DynamoDB stream that is the source of events\.
14+
The Amazon Resource Name \(ARN\) of the event source\.
1515
Type: String
1616
Pattern: `arn:(aws[a-zA-Z0-9-]*):([a-zA-Z0-9\-])+:([a-z]{2}(-gov)?-[a-z]+-\d{1})?:(\d{12})?:(.*)`
1717
Required: No
1818

1919
**FunctionArn** <a name="SSS-Type-EventSourceMappingConfiguration-FunctionArn"></a>
20-
The Lambda function to invoke when AWS Lambda detects an event on the poll\-based source\.
20+
The ARN of the Lambda function\.
2121
Type: String
2222
Pattern: `arn:(aws[a-zA-Z-]*)?:lambda:[a-z]{2}(-gov)?-[a-z]+-\d{1}:\d{12}:function:[a-zA-Z0-9-_]+(:(\$LATEST|[a-zA-Z0-9-_]+))?`
2323
Required: No
2424

2525
**LastModified** <a name="SSS-Type-EventSourceMappingConfiguration-LastModified"></a>
26-
The UTC time string indicating the last time the event mapping was updated\.
26+
The date that the event source mapping was last updated, in Unix time seconds\.
2727
Type: Timestamp
2828
Required: No
2929

3030
**LastProcessingResult** <a name="SSS-Type-EventSourceMappingConfiguration-LastProcessingResult"></a>
31-
The result of the last AWS Lambda invocation of your Lambda function\. This value will be null if an SQS queue is the event source\.
31+
The result of the last AWS Lambda invocation of your Lambda function\.
3232
Type: String
3333
Required: No
3434

3535
**State** <a name="SSS-Type-EventSourceMappingConfiguration-State"></a>
36-
The state of the event source mapping\. It can be `Creating`, `Enabled`, `Disabled`, `Enabling`, `Disabling`, `Updating`, or `Deleting`\.
36+
The state of the event source mapping\. It can be one of the following: `Creating`, `Enabling`, `Enabled`, `Disabling`, `Disabled`, `Updating`, or `Deleting`\.
3737
Type: String
3838
Required: No
3939

4040
**StateTransitionReason** <a name="SSS-Type-EventSourceMappingConfiguration-StateTransitionReason"></a>
41-
The reason the event source mapping is in its current state\. It is either user\-requested or an AWS Lambda\-initiated state transition\.
41+
The cause of the last state change, either `User initiated` or `Lambda initiated`\.
4242
Type: String
4343
Required: No
4444

4545
**UUID** <a name="SSS-Type-EventSourceMappingConfiguration-UUID"></a>
46-
The AWS Lambda assigned opaque identifier for the mapping\.
46+
The identifier of the event source mapping\.
4747
Type: String
4848
Required: No
4949

doc_source/API_FunctionConfiguration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Required: No
8787
**Runtime** <a name="SSS-Type-FunctionConfiguration-Runtime"></a>
8888
The runtime environment for the Lambda function\.
8989
Type: String
90-
Valid Values:` nodejs | nodejs4.3 | nodejs6.10 | nodejs8.10 | java8 | python2.7 | python3.6 | dotnetcore1.0 | dotnetcore2.0 | dotnetcore2.1 | nodejs4.3-edge | go1.x`
90+
Valid Values:` nodejs | nodejs4.3 | nodejs6.10 | nodejs8.10 | java8 | python2.7 | python3.6 | python3.7 | dotnetcore1.0 | dotnetcore2.0 | dotnetcore2.1 | nodejs4.3-edge | go1.x`
9191
Required: No
9292

9393
**Timeout** <a name="SSS-Type-FunctionConfiguration-Timeout"></a>

0 commit comments

Comments
 (0)