Skip to content

Commit f3d92b4

Browse files
Add support for MaximumConcurrency parameter for SQS event source. Customers can now limit the maximum concurrent invocations for their SQS Event Source Mapping.
1 parent ee0baf8 commit f3d92b4

39 files changed

+657
-185
lines changed

generator/ServiceModels/lambda/lambda-2015-03-31.api.json

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1418,7 +1418,8 @@
14181418
"SelfManagedEventSource":{"shape":"SelfManagedEventSource"},
14191419
"FunctionResponseTypes":{"shape":"FunctionResponseTypeList"},
14201420
"AmazonManagedKafkaEventSourceConfig":{"shape":"AmazonManagedKafkaEventSourceConfig"},
1421-
"SelfManagedKafkaEventSourceConfig":{"shape":"SelfManagedKafkaEventSourceConfig"}
1421+
"SelfManagedKafkaEventSourceConfig":{"shape":"SelfManagedKafkaEventSourceConfig"},
1422+
"ScalingConfig":{"shape":"ScalingConfig"}
14221423
}
14231424
},
14241425
"CreateFunctionRequest":{
@@ -1841,7 +1842,8 @@
18411842
"TumblingWindowInSeconds":{"shape":"TumblingWindowInSeconds"},
18421843
"FunctionResponseTypes":{"shape":"FunctionResponseTypeList"},
18431844
"AmazonManagedKafkaEventSourceConfig":{"shape":"AmazonManagedKafkaEventSourceConfig"},
1844-
"SelfManagedKafkaEventSourceConfig":{"shape":"SelfManagedKafkaEventSourceConfig"}
1845+
"SelfManagedKafkaEventSourceConfig":{"shape":"SelfManagedKafkaEventSourceConfig"},
1846+
"ScalingConfig":{"shape":"ScalingConfig"}
18451847
}
18461848
},
18471849
"EventSourceMappingsList":{
@@ -3122,6 +3124,11 @@
31223124
"max":300,
31233125
"min":0
31243126
},
3127+
"MaximumConcurrency":{
3128+
"type":"integer",
3129+
"max":1000,
3130+
"min":2
3131+
},
31253132
"MaximumEventAgeInSeconds":{
31263133
"type":"integer",
31273134
"max":21600,
@@ -3600,6 +3607,12 @@
36003607
"max":1024,
36013608
"min":1
36023609
},
3610+
"ScalingConfig":{
3611+
"type":"structure",
3612+
"members":{
3613+
"MaximumConcurrency":{"shape":"MaximumConcurrency"}
3614+
}
3615+
},
36033616
"SecurityGroupId":{"type":"string"},
36043617
"SecurityGroupIds":{
36053618
"type":"list",
@@ -3984,7 +3997,8 @@
39843997
"ParallelizationFactor":{"shape":"ParallelizationFactor"},
39853998
"SourceAccessConfigurations":{"shape":"SourceAccessConfigurations"},
39863999
"TumblingWindowInSeconds":{"shape":"TumblingWindowInSeconds"},
3987-
"FunctionResponseTypes":{"shape":"FunctionResponseTypeList"}
4000+
"FunctionResponseTypes":{"shape":"FunctionResponseTypeList"},
4001+
"ScalingConfig":{"shape":"ScalingConfig"}
39884002
}
39894003
},
39904004
"UpdateFunctionCodeRequest":{

generator/ServiceModels/lambda/lambda-2015-03-31.docs.json

Lines changed: 26 additions & 12 deletions
Large diffs are not rendered by default.

generator/ServiceModels/lambda/lambda-2015-03-31.endpoint-rule-set.json

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,6 @@
5252
"ref": "Endpoint"
5353
}
5454
]
55-
},
56-
{
57-
"fn": "parseURL",
58-
"argv": [
59-
{
60-
"ref": "Endpoint"
61-
}
62-
],
63-
"assign": "url"
6455
}
6556
],
6657
"type": "tree",

generator/ServiceModels/lambda/lambda-2015-03-31.normal.json

Lines changed: 39 additions & 12 deletions
Large diffs are not rendered by default.

sdk/code-analysis/ServiceAnalysis/CleanRooms/AWSSDK.CleanRooms.CodeAnalysis.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@
3535
<Compile Include="Properties\AssemblyInfo.cs" />
3636
</ItemGroup>
3737
<ItemGroup>
38+
<Compile Include="Generated\*.cs">
39+
<SubType>Code</SubType>
40+
</Compile>
3841
</ItemGroup>
3942
<ItemGroup>
4043
<None Include="packages.config" />

sdk/code-analysis/ServiceAnalysis/Lambda/Generated/PropertyValueRules.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1662,6 +1662,11 @@
16621662
<property>Amazon.Lambda.Model.ProvisionedConcurrencyConfigListItem.RequestedProvisionedConcurrentExecutions</property>
16631663
<min>1</min>
16641664
</property-value-rule>
1665+
<property-value-rule>
1666+
<property>Amazon.Lambda.Model.ScalingConfig.MaximumConcurrency</property>
1667+
<min>2</min>
1668+
<max>1000</max>
1669+
</property-value-rule>
16651670
<property-value-rule>
16661671
<property>Amazon.Lambda.Model.SelfManagedKafkaEventSourceConfig.ConsumerGroupId</property>
16671672
<min>1</min>

sdk/src/Services/Lambda/Generated/Internal/AmazonLambdaEndpointProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public Endpoint ResolveEndpoint(EndpointParameters parameters)
5656
};
5757
if ((refs["PartitionResult"] = Partition((string)refs["Region"])) != null)
5858
{
59-
if (IsSet(refs["Endpoint"]) && (refs["url"] = ParseURL((string)refs["Endpoint"])) != null)
59+
if (IsSet(refs["Endpoint"]))
6060
{
6161
if (Equals(refs["UseFIPS"], true))
6262
{

sdk/src/Services/Lambda/Generated/Model/CreateEventSourceMappingRequest.cs

Lines changed: 41 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -75,29 +75,29 @@ namespace Amazon.Lambda.Model
7575
/// </para>
7676
/// <ul> <li>
7777
/// <para>
78-
/// <code>BisectBatchOnFunctionError</code> - If the function returns an error, split
78+
/// <code>BisectBatchOnFunctionError</code> If the function returns an error, split
7979
/// the batch in two and retry.
8080
/// </para>
8181
/// </li> <li>
8282
/// <para>
83-
/// <code>DestinationConfig</code> - Send discarded records to an Amazon SQS queue or
83+
/// <code>DestinationConfig</code> Send discarded records to an Amazon SQS queue or
8484
/// Amazon SNS topic.
8585
/// </para>
8686
/// </li> <li>
8787
/// <para>
88-
/// <code>MaximumRecordAgeInSeconds</code> - Discard records older than the specified
88+
/// <code>MaximumRecordAgeInSeconds</code> Discard records older than the specified
8989
/// age. The default value is infinite (-1). When set to infinite (-1), failed records
9090
/// are retried until the record expires
9191
/// </para>
9292
/// </li> <li>
9393
/// <para>
94-
/// <code>MaximumRetryAttempts</code> - Discard records after the specified number of
94+
/// <code>MaximumRetryAttempts</code> Discard records after the specified number of
9595
/// retries. The default value is infinite (-1). When set to infinite (-1), failed records
9696
/// are retried until the record expires.
9797
/// </para>
9898
/// </li> <li>
9999
/// <para>
100-
/// <code>ParallelizationFactor</code> - Process multiple batches from each shard concurrently.
100+
/// <code>ParallelizationFactor</code> Process multiple batches from each shard concurrently.
101101
/// </para>
102102
/// </li> </ul>
103103
/// <para>
@@ -152,6 +152,7 @@ public partial class CreateEventSourceMappingRequest : AmazonLambdaRequest
152152
private int? _maximumRetryAttempts;
153153
private int? _parallelizationFactor;
154154
private List<string> _queues = new List<string>();
155+
private ScalingConfig _scalingConfig;
155156
private SelfManagedEventSource _selfManagedEventSource;
156157
private SelfManagedKafkaEventSourceConfig _selfManagedKafkaEventSourceConfig;
157158
private List<SourceAccessConfiguration> _sourceAccessConfigurations = new List<SourceAccessConfiguration>();
@@ -189,28 +190,28 @@ internal bool IsSetAmazonManagedKafkaEventSourceConfig()
189190
/// </para>
190191
/// <ul> <li>
191192
/// <para>
192-
/// <b>Amazon Kinesis</b> - Default 100. Max 10,000.
193+
/// <b>Amazon Kinesis</b> Default 100. Max 10,000.
193194
/// </para>
194195
/// </li> <li>
195196
/// <para>
196-
/// <b>Amazon DynamoDB Streams</b> - Default 100. Max 10,000.
197+
/// <b>Amazon DynamoDB Streams</b> Default 100. Max 10,000.
197198
/// </para>
198199
/// </li> <li>
199200
/// <para>
200-
/// <b>Amazon Simple Queue Service</b> - Default 10. For standard queues the max is 10,000.
201+
/// <b>Amazon Simple Queue Service</b> Default 10. For standard queues the max is 10,000.
201202
/// For FIFO queues the max is 10.
202203
/// </para>
203204
/// </li> <li>
204205
/// <para>
205-
/// <b>Amazon Managed Streaming for Apache Kafka</b> - Default 100. Max 10,000.
206+
/// <b>Amazon Managed Streaming for Apache Kafka</b> Default 100. Max 10,000.
206207
/// </para>
207208
/// </li> <li>
208209
/// <para>
209-
/// <b>Self-managed Apache Kafka</b> - Default 100. Max 10,000.
210+
/// <b>Self-managed Apache Kafka</b> Default 100. Max 10,000.
210211
/// </para>
211212
/// </li> <li>
212213
/// <para>
213-
/// <b>Amazon MQ (ActiveMQ and RabbitMQ)</b> - Default 100. Max 10,000.
214+
/// <b>Amazon MQ (ActiveMQ and RabbitMQ)</b> Default 100. Max 10,000.
214215
/// </para>
215216
/// </li> </ul>
216217
/// </summary>
@@ -293,23 +294,23 @@ internal bool IsSetEnabled()
293294
/// </para>
294295
/// <ul> <li>
295296
/// <para>
296-
/// <b>Amazon Kinesis</b> - The ARN of the data stream or a stream consumer.
297+
/// <b>Amazon Kinesis</b> The ARN of the data stream or a stream consumer.
297298
/// </para>
298299
/// </li> <li>
299300
/// <para>
300-
/// <b>Amazon DynamoDB Streams</b> - The ARN of the stream.
301+
/// <b>Amazon DynamoDB Streams</b> The ARN of the stream.
301302
/// </para>
302303
/// </li> <li>
303304
/// <para>
304-
/// <b>Amazon Simple Queue Service</b> - The ARN of the queue.
305+
/// <b>Amazon Simple Queue Service</b> The ARN of the queue.
305306
/// </para>
306307
/// </li> <li>
307308
/// <para>
308-
/// <b>Amazon Managed Streaming for Apache Kafka</b> - The ARN of the cluster.
309+
/// <b>Amazon Managed Streaming for Apache Kafka</b> The ARN of the cluster.
309310
/// </para>
310311
/// </li> <li>
311312
/// <para>
312-
/// <b>Amazon MQ</b> - The ARN of the broker.
313+
/// <b>Amazon MQ</b> The ARN of the broker.
313314
/// </para>
314315
/// </li> </ul>
315316
/// </summary>
@@ -354,19 +355,19 @@ internal bool IsSetFilterCriteria()
354355
/// </para>
355356
/// <ul> <li>
356357
/// <para>
357-
/// <b>Function name</b> - <code>MyFunction</code>.
358+
/// <b>Function name</b> <code>MyFunction</code>.
358359
/// </para>
359360
/// </li> <li>
360361
/// <para>
361-
/// <b>Function ARN</b> - <code>arn:aws:lambda:us-west-2:123456789012:function:MyFunction</code>.
362+
/// <b>Function ARN</b> <code>arn:aws:lambda:us-west-2:123456789012:function:MyFunction</code>.
362363
/// </para>
363364
/// </li> <li>
364365
/// <para>
365-
/// <b>Version or Alias ARN</b> - <code>arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD</code>.
366+
/// <b>Version or Alias ARN</b> <code>arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD</code>.
366367
/// </para>
367368
/// </li> <li>
368369
/// <para>
369-
/// <b>Partial ARN</b> - <code>123456789012:function:MyFunction</code>.
370+
/// <b>Partial ARN</b> <code>123456789012:function:MyFunction</code>.
370371
/// </para>
371372
/// </li> </ul>
372373
/// <para>
@@ -522,6 +523,26 @@ internal bool IsSetQueues()
522523
return this._queues != null && this._queues.Count > 0;
523524
}
524525

526+
/// <summary>
527+
/// Gets and sets the property ScalingConfig.
528+
/// <para>
529+
/// (Amazon SQS only) The scaling configuration for the event source. For more information,
530+
/// see <a href="https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-max-concurrency">Configuring
531+
/// maximum concurrency for Amazon SQS event sources</a>.
532+
/// </para>
533+
/// </summary>
534+
public ScalingConfig ScalingConfig
535+
{
536+
get { return this._scalingConfig; }
537+
set { this._scalingConfig = value; }
538+
}
539+
540+
// Check to see if ScalingConfig property is set
541+
internal bool IsSetScalingConfig()
542+
{
543+
return this._scalingConfig != null;
544+
}
545+
525546
/// <summary>
526547
/// Gets and sets the property SelfManagedEventSource.
527548
/// <para>

sdk/src/Services/Lambda/Generated/Model/CreateEventSourceMappingResponse.cs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ public partial class CreateEventSourceMappingResponse : AmazonWebServiceResponse
4949
private int? _maximumRetryAttempts;
5050
private int? _parallelizationFactor;
5151
private List<string> _queues = new List<string>();
52+
private ScalingConfig _scalingConfig;
5253
private SelfManagedEventSource _selfManagedEventSource;
5354
private SelfManagedKafkaEventSourceConfig _selfManagedKafkaEventSourceConfig;
5455
private List<SourceAccessConfiguration> _sourceAccessConfigurations = new List<SourceAccessConfiguration>();
@@ -377,6 +378,26 @@ internal bool IsSetQueues()
377378
return this._queues != null && this._queues.Count > 0;
378379
}
379380

381+
/// <summary>
382+
/// Gets and sets the property ScalingConfig.
383+
/// <para>
384+
/// (Amazon SQS only) The scaling configuration for the event source. For more information,
385+
/// see <a href="https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-max-concurrency">Configuring
386+
/// maximum concurrency for Amazon SQS event sources</a>.
387+
/// </para>
388+
/// </summary>
389+
public ScalingConfig ScalingConfig
390+
{
391+
get { return this._scalingConfig; }
392+
set { this._scalingConfig = value; }
393+
}
394+
395+
// Check to see if ScalingConfig property is set
396+
internal bool IsSetScalingConfig()
397+
{
398+
return this._scalingConfig != null;
399+
}
400+
380401
/// <summary>
381402
/// Gets and sets the property SelfManagedEventSource.
382403
/// <para>

sdk/src/Services/Lambda/Generated/Model/CreateFunctionResponse.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -555,8 +555,8 @@ internal bool IsSetSigningProfileVersionArn()
555555
/// <para>
556556
/// Set <code>ApplyOn</code> to <code>PublishedVersions</code> to create a snapshot of
557557
/// the initialized execution environment when you publish a function version. For more
558-
/// information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html">Reducing
559-
/// startup time with Lambda SnapStart</a>.
558+
/// information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html">Improving
559+
/// startup performance with Lambda SnapStart</a>.
560560
/// </para>
561561
/// </summary>
562562
public SnapStartResponse SnapStart

0 commit comments

Comments
 (0)