Skip to content

Commit f6277ef

Browse files
author
AWS
committed
AWS Lambda Update: Support Managed Streaming for Kafka as an Event Source. Support retry until record expiration for Kinesis and Dynamodb streams event source mappings.
1 parent d551d7a commit f6277ef

File tree

2 files changed

+40
-15
lines changed

2 files changed

+40
-15
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"type": "feature",
3+
"category": "AWS Lambda",
4+
"description": "Support Managed Streaming for Kafka as an Event Source. Support retry until record expiration for Kinesis and Dynamodb streams event source mappings."
5+
}

services/lambda/src/main/resources/codegen-resources/service-2.json

Lines changed: 35 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
{"shape":"TooManyRequestsException"},
8585
{"shape":"ResourceNotFoundException"}
8686
],
87-
"documentation":"<p>Creates a mapping between an event source and an AWS Lambda function. Lambda reads items from the event source and triggers the function.</p> <p>For details about each event source type, see the following topics.</p> <ul> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html\">Using AWS Lambda with Amazon DynamoDB</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html\">Using AWS Lambda with Amazon Kinesis</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html\">Using AWS Lambda with Amazon SQS</a> </p> </li> </ul> <p>The following error handling options are only available for stream sources (DynamoDB and Kinesis):</p> <ul> <li> <p> <code>BisectBatchOnFunctionError</code> - If the function returns an error, split the batch in two and retry.</p> </li> <li> <p> <code>DestinationConfig</code> - Send discarded records to an Amazon SQS queue or Amazon SNS topic.</p> </li> <li> <p> <code>MaximumRecordAgeInSeconds</code> - Discard records older than the specified age.</p> </li> <li> <p> <code>MaximumRetryAttempts</code> - Discard records after the specified number of retries.</p> </li> <li> <p> <code>ParallelizationFactor</code> - Process multiple batches from each shard concurrently.</p> </li> </ul>"
87+
"documentation":"<p>Creates a mapping between an event source and an AWS Lambda function. Lambda reads items from the event source and triggers the function.</p> <p>For details about each event source type, see the following topics.</p> <ul> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html\">Using AWS Lambda with Amazon DynamoDB</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html\">Using AWS Lambda with Amazon Kinesis</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html\">Using AWS Lambda with Amazon SQS</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html\">Using AWS Lambda with Amazon MSK</a> </p> </li> </ul> <p>The following error handling options are only available for stream sources (DynamoDB and Kinesis):</p> <ul> <li> <p> <code>BisectBatchOnFunctionError</code> - If the function returns an error, split the batch in two and retry.</p> </li> <li> <p> <code>DestinationConfig</code> - Send discarded records to an Amazon SQS queue or Amazon SNS topic.</p> </li> <li> <p> <code>MaximumRecordAgeInSeconds</code> - Discard records older than the specified age. Default -1 (infinite). Minimum 60. Maximum 604800.</p> </li> <li> <p> <code>MaximumRetryAttempts</code> - Discard records after the specified number of retries. Default -1 (infinite). Minimum 0. Maximum 10000. When infinite, failed records will be retried until the record expires.</p> </li> <li> <p> <code>ParallelizationFactor</code> - Process multiple batches from each shard concurrently.</p> </li> </ul>"
8888
},
8989
"CreateFunction":{
9090
"name":"CreateFunction",
@@ -825,7 +825,7 @@
825825
{"shape":"ResourceConflictException"},
826826
{"shape":"ResourceInUseException"}
827827
],
828-
"documentation":"<p>Updates an event source mapping. You can change the function that AWS Lambda invokes, or pause invocation and resume later from the same location.</p> <p>The following error handling options are only available for stream sources (DynamoDB and Kinesis):</p> <ul> <li> <p> <code>BisectBatchOnFunctionError</code> - If the function returns an error, split the batch in two and retry.</p> </li> <li> <p> <code>DestinationConfig</code> - Send discarded records to an Amazon SQS queue or Amazon SNS topic.</p> </li> <li> <p> <code>MaximumRecordAgeInSeconds</code> - Discard records older than the specified age.</p> </li> <li> <p> <code>MaximumRetryAttempts</code> - Discard records after the specified number of retries.</p> </li> <li> <p> <code>ParallelizationFactor</code> - Process multiple batches from each shard concurrently.</p> </li> </ul>"
828+
"documentation":"<p>Updates an event source mapping. You can change the function that AWS Lambda invokes, or pause invocation and resume later from the same location.</p> <p>The following error handling options are only available for stream sources (DynamoDB and Kinesis):</p> <ul> <li> <p> <code>BisectBatchOnFunctionError</code> - If the function returns an error, split the batch in two and retry.</p> </li> <li> <p> <code>DestinationConfig</code> - Send discarded records to an Amazon SQS queue or Amazon SNS topic.</p> </li> <li> <p> <code>MaximumRecordAgeInSeconds</code> - Discard records older than the specified age. Default -1 (infinite). Minimum 60. Maximum 604800.</p> </li> <li> <p> <code>MaximumRetryAttempts</code> - Discard records after the specified number of retries. Default -1 (infinite). Minimum 0. Maximum 10000. When infinite, failed records will be retried until the record expires.</p> </li> <li> <p> <code>ParallelizationFactor</code> - Process multiple batches from each shard concurrently.</p> </li> </ul>"
829829
},
830830
"UpdateFunctionCode":{
831831
"name":"UpdateFunctionCode",
@@ -1196,19 +1196,19 @@
11961196
"members":{
11971197
"EventSourceArn":{
11981198
"shape":"Arn",
1199-
"documentation":"<p>The Amazon Resource Name (ARN) of the event source.</p> <ul> <li> <p> <b>Amazon Kinesis</b> - The ARN of the data stream or a stream consumer.</p> </li> <li> <p> <b>Amazon DynamoDB Streams</b> - The ARN of the stream.</p> </li> <li> <p> <b>Amazon Simple Queue Service</b> - The ARN of the queue.</p> </li> </ul>"
1199+
"documentation":"<p>The Amazon Resource Name (ARN) of the event source.</p> <ul> <li> <p> <b>Amazon Kinesis</b> - The ARN of the data stream or a stream consumer.</p> </li> <li> <p> <b>Amazon DynamoDB Streams</b> - The ARN of the stream.</p> </li> <li> <p> <b>Amazon Simple Queue Service</b> - The ARN of the queue.</p> </li> <li> <p> <b>Amazon Managed Streaming for Apache Kafka</b> - The ARN of the cluster.</p> </li> </ul>"
12001200
},
12011201
"FunctionName":{
12021202
"shape":"FunctionName",
12031203
"documentation":"<p>The name of the Lambda function.</p> <p class=\"title\"> <b>Name formats</b> </p> <ul> <li> <p> <b>Function name</b> - <code>MyFunction</code>.</p> </li> <li> <p> <b>Function ARN</b> - <code>arn:aws:lambda:us-west-2:123456789012:function:MyFunction</code>.</p> </li> <li> <p> <b>Version or Alias ARN</b> - <code>arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD</code>.</p> </li> <li> <p> <b>Partial ARN</b> - <code>123456789012:function:MyFunction</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it's limited to 64 characters in length.</p>"
12041204
},
12051205
"Enabled":{
12061206
"shape":"Enabled",
1207-
"documentation":"<p>Disables the event source mapping to pause polling and invocation.</p>"
1207+
"documentation":"<p>If true, the event source mapping is active. Set to false to pause polling and invocation.</p>"
12081208
},
12091209
"BatchSize":{
12101210
"shape":"BatchSize",
1211-
"documentation":"<p>The maximum number of items to retrieve in a single batch.</p> <ul> <li> <p> <b>Amazon Kinesis</b> - Default 100. Max 10,000.</p> </li> <li> <p> <b>Amazon DynamoDB Streams</b> - Default 100. Max 1,000.</p> </li> <li> <p> <b>Amazon Simple Queue Service</b> - Default 10. Max 10.</p> </li> </ul>"
1211+
"documentation":"<p>The maximum number of items to retrieve in a single batch.</p> <ul> <li> <p> <b>Amazon Kinesis</b> - Default 100. Max 10,000.</p> </li> <li> <p> <b>Amazon DynamoDB Streams</b> - Default 100. Max 1,000.</p> </li> <li> <p> <b>Amazon Simple Queue Service</b> - Default 10. Max 10.</p> </li> <li> <p> <b>Amazon Managed Streaming for Apache Kafka</b> - Default 100. Max 10,000.</p> </li> </ul>"
12121212
},
12131213
"MaximumBatchingWindowInSeconds":{
12141214
"shape":"MaximumBatchingWindowInSeconds",
@@ -1220,7 +1220,7 @@
12201220
},
12211221
"StartingPosition":{
12221222
"shape":"EventSourcePosition",
1223-
"documentation":"<p>The position in a stream from which to start reading. Required for Amazon Kinesis and Amazon DynamoDB Streams sources. <code>AT_TIMESTAMP</code> is only supported for Amazon Kinesis streams.</p>"
1223+
"documentation":"<p>The position in a stream from which to start reading. Required for Amazon Kinesis, Amazon DynamoDB, and Amazon MSK Streams sources. <code>AT_TIMESTAMP</code> is only supported for Amazon Kinesis streams.</p>"
12241224
},
12251225
"StartingPositionTimestamp":{
12261226
"shape":"Date",
@@ -1232,15 +1232,19 @@
12321232
},
12331233
"MaximumRecordAgeInSeconds":{
12341234
"shape":"MaximumRecordAgeInSeconds",
1235-
"documentation":"<p>(Streams) The maximum age of a record that Lambda sends to a function for processing.</p>"
1235+
"documentation":"<p>(Streams) Discard records older than the specified age. The default value is infinite (-1).</p>"
12361236
},
12371237
"BisectBatchOnFunctionError":{
12381238
"shape":"BisectBatchOnFunctionError",
12391239
"documentation":"<p>(Streams) If the function returns an error, split the batch in two and retry.</p>"
12401240
},
12411241
"MaximumRetryAttempts":{
12421242
"shape":"MaximumRetryAttemptsEventSourceMapping",
1243-
"documentation":"<p>(Streams) The maximum number of times to retry when the function returns an error.</p>"
1243+
"documentation":"<p>(Streams) Discard records after the specified number of retries. The default value is infinite (-1). When set to infinite (-1), failed records will be retried until the record expires.</p>"
1244+
},
1245+
"Topics":{
1246+
"shape":"Topics",
1247+
"documentation":"<p> (MSK) The name of the Kafka topic. </p>"
12441248
}
12451249
}
12461250
},
@@ -1665,6 +1669,10 @@
16651669
"shape":"DestinationConfig",
16661670
"documentation":"<p>(Streams) An Amazon SQS queue or Amazon SNS topic destination for discarded records.</p>"
16671671
},
1672+
"Topics":{
1673+
"shape":"Topics",
1674+
"documentation":"<p> (MSK) The name of the Kafka topic. </p>"
1675+
},
16681676
"MaximumRecordAgeInSeconds":{
16691677
"shape":"MaximumRecordAgeInSeconds",
16701678
"documentation":"<p>(Streams) The maximum age of a record that Lambda sends to a function for processing.</p>"
@@ -2711,7 +2719,7 @@
27112719
"members":{
27122720
"EventSourceArn":{
27132721
"shape":"Arn",
2714-
"documentation":"<p>The Amazon Resource Name (ARN) of the event source.</p> <ul> <li> <p> <b>Amazon Kinesis</b> - The ARN of the data stream or a stream consumer.</p> </li> <li> <p> <b>Amazon DynamoDB Streams</b> - The ARN of the stream.</p> </li> <li> <p> <b>Amazon Simple Queue Service</b> - The ARN of the queue.</p> </li> </ul>",
2722+
"documentation":"<p>The Amazon Resource Name (ARN) of the event source.</p> <ul> <li> <p> <b>Amazon Kinesis</b> - The ARN of the data stream or a stream consumer.</p> </li> <li> <p> <b>Amazon DynamoDB Streams</b> - The ARN of the stream.</p> </li> <li> <p> <b>Amazon Simple Queue Service</b> - The ARN of the queue.</p> </li> <li> <p> <b>Amazon Managed Streaming for Apache Kafka</b> - The ARN of the cluster.</p> </li> </ul>",
27152723
"location":"querystring",
27162724
"locationName":"EventSourceArn"
27172725
},
@@ -3052,7 +3060,7 @@
30523060
"MaximumRecordAgeInSeconds":{
30533061
"type":"integer",
30543062
"max":604800,
3055-
"min":60
3063+
"min":-1
30563064
},
30573065
"MaximumRetryAttempts":{
30583066
"type":"integer",
@@ -3062,7 +3070,7 @@
30623070
"MaximumRetryAttemptsEventSourceMapping":{
30633071
"type":"integer",
30643072
"max":10000,
3065-
"min":0
3073+
"min":-1
30663074
},
30673075
"MemorySize":{
30683076
"type":"integer",
@@ -3727,6 +3735,18 @@
37273735
"error":{"httpStatusCode":429},
37283736
"exception":true
37293737
},
3738+
"Topic":{
3739+
"type":"string",
3740+
"max":249,
3741+
"min":1,
3742+
"pattern":"^[^.]([a-zA-Z0-9\\-_.]+)"
3743+
},
3744+
"Topics":{
3745+
"type":"list",
3746+
"member":{"shape":"Topic"},
3747+
"max":1,
3748+
"min":1
3749+
},
37303750
"TracingConfig":{
37313751
"type":"structure",
37323752
"members":{
@@ -3842,11 +3862,11 @@
38423862
},
38433863
"Enabled":{
38443864
"shape":"Enabled",
3845-
"documentation":"<p>Disables the event source mapping to pause polling and invocation.</p>"
3865+
"documentation":"<p>If true, the event source mapping is active. Set to false to pause polling and invocation.</p>"
38463866
},
38473867
"BatchSize":{
38483868
"shape":"BatchSize",
3849-
"documentation":"<p>The maximum number of items to retrieve in a single batch.</p> <ul> <li> <p> <b>Amazon Kinesis</b> - Default 100. Max 10,000.</p> </li> <li> <p> <b>Amazon DynamoDB Streams</b> - Default 100. Max 1,000.</p> </li> <li> <p> <b>Amazon Simple Queue Service</b> - Default 10. Max 10.</p> </li> </ul>"
3869+
"documentation":"<p>The maximum number of items to retrieve in a single batch.</p> <ul> <li> <p> <b>Amazon Kinesis</b> - Default 100. Max 10,000.</p> </li> <li> <p> <b>Amazon DynamoDB Streams</b> - Default 100. Max 1,000.</p> </li> <li> <p> <b>Amazon Simple Queue Service</b> - Default 10. Max 10.</p> </li> <li> <p> <b>Amazon Managed Streaming for Apache Kafka</b> - Default 100. Max 10,000.</p> </li> </ul>"
38503870
},
38513871
"MaximumBatchingWindowInSeconds":{
38523872
"shape":"MaximumBatchingWindowInSeconds",
@@ -3858,15 +3878,15 @@
38583878
},
38593879
"MaximumRecordAgeInSeconds":{
38603880
"shape":"MaximumRecordAgeInSeconds",
3861-
"documentation":"<p>(Streams) The maximum age of a record that Lambda sends to a function for processing.</p>"
3881+
"documentation":"<p>(Streams) Discard records older than the specified age. The default value is infinite (-1).</p>"
38623882
},
38633883
"BisectBatchOnFunctionError":{
38643884
"shape":"BisectBatchOnFunctionError",
38653885
"documentation":"<p>(Streams) If the function returns an error, split the batch in two and retry.</p>"
38663886
},
38673887
"MaximumRetryAttempts":{
38683888
"shape":"MaximumRetryAttemptsEventSourceMapping",
3869-
"documentation":"<p>(Streams) The maximum number of times to retry when the function returns an error.</p>"
3889+
"documentation":"<p>(Streams) Discard records after the specified number of retries. The default value is infinite (-1). When set to infinite (-1), failed records will be retried until the record expires.</p>"
38703890
},
38713891
"ParallelizationFactor":{
38723892
"shape":"ParallelizationFactor",

0 commit comments

Comments
 (0)