aws-cdk-lib 2.151.1__py3-none-any.whl → 2.152.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of aws-cdk-lib might be problematic. Click here for more details.

@@ -820,6 +820,50 @@ fn.add_event_source(eventsources.DynamoEventSource(table,
820
820
  ))
821
821
  ```
822
822
 
823
+ By default, Lambda will encrypt Filter Criteria using AWS managed keys. But if you want to use a self managed KMS key to encrypt the filters, You can specify the self managed key using the `filterEncryption` property.
824
+
825
+ ```python
826
+ import aws_cdk.aws_lambda_event_sources as eventsources
827
+ import aws_cdk.aws_dynamodb as dynamodb
828
+ from aws_cdk.aws_kms import Key
829
+
830
+ # fn: lambda.Function
831
+
832
+ table = dynamodb.Table(self, "Table",
833
+ partition_key=dynamodb.Attribute(
834
+ name="id",
835
+ type=dynamodb.AttributeType.STRING
836
+ ),
837
+ stream=dynamodb.StreamViewType.NEW_IMAGE
838
+ )
839
+ # Your self managed KMS key
840
+ my_key = Key.from_key_arn(self, "SourceBucketEncryptionKey", "arn:aws:kms:us-east-1:123456789012:key/<key-id>")
841
+
842
+ fn.add_event_source(eventsources.DynamoEventSource(table,
843
+ starting_position=lambda_.StartingPosition.LATEST,
844
+ filters=[lambda_.FilterCriteria.filter({"event_name": lambda_.FilterRule.is_equal("INSERT")})],
845
+ filter_encryption=my_key
846
+ ))
847
+ ```
848
+
849
+ > Lambda requires allow `kms:Decrypt` on Lambda principal `lambda.amazonaws.com` to use the key for Filter Criteria Encryption. If you create the KMS key in the stack, CDK will automatically add this permission to the Key when you creates eventSourceMapping. However, if you import the key using function like `Key.fromKeyArn` then you need to add the following permission to the KMS key before using it to encrypt Filter Criteria
850
+
851
+ ```json
852
+ {
853
+ "Version": "2012-10-17",
854
+ "Statement": [
855
+ {
856
+ "Effect": "Allow",
857
+ "Principal": {
858
+ "Service": "lambda.amazonaws.com"
859
+ },
860
+ "Action": "kms:Decrypt",
861
+ "Resource": "*"
862
+ }
863
+ ]
864
+ }
865
+ ```
866
+
823
867
  See the documentation for the **@aws-cdk/aws-lambda-event-sources** module for more details.
824
868
 
825
869
  ## Imported Lambdas
@@ -4374,6 +4418,7 @@ class CfnEventSourceMapping(
4374
4418
  )]
4375
4419
  ),
4376
4420
  function_response_types=["functionResponseTypes"],
4421
+ kms_key_arn="kmsKeyArn",
4377
4422
  maximum_batching_window_in_seconds=123,
4378
4423
  maximum_record_age_in_seconds=123,
4379
4424
  maximum_retry_attempts=123,
@@ -4416,6 +4461,7 @@ class CfnEventSourceMapping(
4416
4461
  event_source_arn: typing.Optional[builtins.str] = None,
4417
4462
  filter_criteria: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union["CfnEventSourceMapping.FilterCriteriaProperty", typing.Dict[builtins.str, typing.Any]]]] = None,
4418
4463
  function_response_types: typing.Optional[typing.Sequence[builtins.str]] = None,
4464
+ kms_key_arn: typing.Optional[builtins.str] = None,
4419
4465
  maximum_batching_window_in_seconds: typing.Optional[jsii.Number] = None,
4420
4466
  maximum_record_age_in_seconds: typing.Optional[jsii.Number] = None,
4421
4467
  maximum_retry_attempts: typing.Optional[jsii.Number] = None,
@@ -4433,29 +4479,30 @@ class CfnEventSourceMapping(
4433
4479
  '''
4434
4480
  :param scope: Scope in which this resource is defined.
4435
4481
  :param id: Construct identifier for this resource (unique in its scope).
4436
- :param function_name: The name or ARN of the Lambda function. **Name formats** - *Function name* – ``MyFunction`` . - *Function ARN* – ``arn:aws:lambda:us-west-2:123456789012:function:MyFunction`` . - *Version or Alias ARN* – ``arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD`` . - *Partial ARN* – ``123456789012:function:MyFunction`` . The length constraint applies only to the full ARN. If you specify only the function name, it's limited to 64 characters in length.
4437
- :param amazon_managed_kafka_event_source_config: Specific configuration settings for an Amazon Managed Streaming for Apache Kafka (Amazon MSK) event source.
4438
- :param batch_size: The maximum number of records in each batch that Lambda pulls from your stream or queue and sends to your function. Lambda passes all of the records in the batch to the function in a single call, up to the payload limit for synchronous invocation (6 MB). - *Amazon Kinesis* – Default 100. Max 10,000. - *Amazon DynamoDB Streams* – Default 100. Max 10,000. - *Amazon Simple Queue Service* – Default 10. For standard queues the max is 10,000. For FIFO queues the max is 10. - *Amazon Managed Streaming for Apache Kafka* – Default 100. Max 10,000. - *Self-managed Apache Kafka* – Default 100. Max 10,000. - *Amazon MQ (ActiveMQ and RabbitMQ)* – Default 100. Max 10,000. - *DocumentDB* – Default 100. Max 10,000.
4439
- :param bisect_batch_on_function_error: (Kinesis and DynamoDB Streams only) If the function returns an error, split the batch in two and retry. The default value is false.
4440
- :param destination_config: (Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka event sources only) A configuration object that specifies the destination of an event after Lambda processes it.
4441
- :param document_db_event_source_config: Specific configuration settings for a DocumentDB event source.
4442
- :param enabled: When true, the event source mapping is active. When false, Lambda pauses polling and invocation. Default: True
4443
- :param event_source_arn: The Amazon Resource Name (ARN) of the event source. - *Amazon Kinesis* – The ARN of the data stream or a stream consumer. - *Amazon DynamoDB Streams* – The ARN of the stream. - *Amazon Simple Queue Service* – The ARN of the queue. - *Amazon Managed Streaming for Apache Kafka* – The ARN of the cluster or the ARN of the VPC connection (for `cross-account event source mappings <https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#msk-multi-vpc>`_ ). - *Amazon MQ* – The ARN of the broker. - *Amazon DocumentDB* – The ARN of the DocumentDB change stream.
4444
- :param filter_criteria: An object that defines the filter criteria that determine whether Lambda should process an event. For more information, see `Lambda event filtering <https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html>`_ .
4445
- :param function_response_types: (Streams and SQS) A list of current response type enums applied to the event source mapping. Valid Values: ``ReportBatchItemFailures``
4446
- :param maximum_batching_window_in_seconds: The maximum amount of time, in seconds, that Lambda spends gathering records before invoking the function. *Default ( Kinesis , DynamoDB , Amazon SQS event sources)* : 0 *Default ( Amazon MSK , Kafka, Amazon MQ , Amazon DocumentDB event sources)* : 500 ms *Related setting:* For Amazon SQS event sources, when you set ``BatchSize`` to a value greater than 10, you must set ``MaximumBatchingWindowInSeconds`` to at least 1.
4447
- :param maximum_record_age_in_seconds: (Kinesis and DynamoDB Streams only) Discard records older than the specified age. The default value is -1, which sets the maximum age to infinite. When the value is set to infinite, Lambda never discards old records. .. epigraph:: The minimum valid value for maximum record age is 60s. Although values less than 60 and greater than -1 fall within the parameter's absolute range, they are not allowed
4448
- :param maximum_retry_attempts: (Kinesis and DynamoDB Streams only) Discard records after the specified number of retries. The default value is -1, which sets the maximum number of retries to infinite. When MaximumRetryAttempts is infinite, Lambda retries failed records until the record expires in the event source.
4449
- :param parallelization_factor: (Kinesis and DynamoDB Streams only) The number of batches to process concurrently from each shard. The default value is 1.
4450
- :param queues: (Amazon MQ) The name of the Amazon MQ broker destination queue to consume.
4451
- :param scaling_config: (Amazon SQS only) The scaling configuration for the event source. For more information, see `Configuring maximum concurrency for Amazon SQS event sources <https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-max-concurrency>`_ .
4452
- :param self_managed_event_source: The self-managed Apache Kafka cluster for your event source.
4453
- :param self_managed_kafka_event_source_config: Specific configuration settings for a self-managed Apache Kafka event source.
4454
- :param source_access_configurations: An array of the authentication protocol, VPC components, or virtual host to secure and define your event source.
4455
- :param starting_position: The position in a stream from which to start reading. Required for Amazon Kinesis and Amazon DynamoDB. - *LATEST* - Read only new records. - *TRIM_HORIZON* - Process all available records. - *AT_TIMESTAMP* - Specify a time from which to start reading records.
4456
- :param starting_position_timestamp: With ``StartingPosition`` set to ``AT_TIMESTAMP`` , the time from which to start reading, in Unix time seconds. ``StartingPositionTimestamp`` cannot be in the future.
4457
- :param topics: The name of the Kafka topic.
4458
- :param tumbling_window_in_seconds: (Kinesis and DynamoDB Streams only) The duration in seconds of a processing window for DynamoDB and Kinesis Streams event sources. A value of 0 seconds indicates no tumbling window.
4482
+ :param function_name: The name of the Lambda function.
4483
+ :param amazon_managed_kafka_event_source_config: Specific configuration settings for an MSK event source.
4484
+ :param batch_size: The maximum number of items to retrieve in a single batch.
4485
+ :param bisect_batch_on_function_error: (Streams) If the function returns an error, split the batch in two and retry.
4486
+ :param destination_config: A configuration object that specifies the destination of an event after Lambda processes it.
4487
+ :param document_db_event_source_config: Document db event source config.
4488
+ :param enabled: Disables the event source mapping to pause polling and invocation.
4489
+ :param event_source_arn: The Amazon Resource Name (ARN) of the event source.
4490
+ :param filter_criteria: The filter criteria to control event filtering.
4491
+ :param function_response_types: (Streams) A list of response types supported by the function.
4492
+ :param kms_key_arn: The Amazon Resource Name (ARN) of the KMS key.
4493
+ :param maximum_batching_window_in_seconds: (Streams) The maximum amount of time to gather records before invoking the function, in seconds.
4494
+ :param maximum_record_age_in_seconds: (Streams) The maximum age of a record that Lambda sends to a function for processing.
4495
+ :param maximum_retry_attempts: (Streams) The maximum number of times to retry when the function returns an error.
4496
+ :param parallelization_factor: (Streams) The number of batches to process from each shard concurrently.
4497
+ :param queues: (ActiveMQ) A list of ActiveMQ queues.
4498
+ :param scaling_config: The scaling configuration for the event source.
4499
+ :param self_managed_event_source: The configuration used by AWS Lambda to access a self-managed event source.
4500
+ :param self_managed_kafka_event_source_config: Specific configuration settings for a Self-Managed Apache Kafka event source.
4501
+ :param source_access_configurations: A list of SourceAccessConfiguration.
4502
+ :param starting_position: The position in a stream from which to start reading. Required for Amazon Kinesis and Amazon DynamoDB Streams sources.
4503
+ :param starting_position_timestamp: With StartingPosition set to AT_TIMESTAMP, the time from which to start reading, in Unix time seconds.
4504
+ :param topics: (Kafka) A list of Kafka topics.
4505
+ :param tumbling_window_in_seconds: (Streams) Tumbling window (non-overlapping time window) duration to perform aggregations.
4459
4506
  '''
4460
4507
  if __debug__:
4461
4508
  type_hints = typing.get_type_hints(_typecheckingstub__2fc9432254acf5a7dbe3c68dcedbda61de1f0e804a81d20ae79e04857b83d419)
@@ -4472,6 +4519,7 @@ class CfnEventSourceMapping(
4472
4519
  event_source_arn=event_source_arn,
4473
4520
  filter_criteria=filter_criteria,
4474
4521
  function_response_types=function_response_types,
4522
+ kms_key_arn=kms_key_arn,
4475
4523
  maximum_batching_window_in_seconds=maximum_batching_window_in_seconds,
4476
4524
  maximum_record_age_in_seconds=maximum_record_age_in_seconds,
4477
4525
  maximum_retry_attempts=maximum_retry_attempts,
@@ -4522,7 +4570,7 @@ class CfnEventSourceMapping(
4522
4570
  @builtins.property
4523
4571
  @jsii.member(jsii_name="attrId")
4524
4572
  def attr_id(self) -> builtins.str:
4525
- '''The event source mapping's ID.
4573
+ '''Event Source Mapping Identifier UUID.
4526
4574
 
4527
4575
  :cloudformationAttribute: Id
4528
4576
  '''
@@ -4536,7 +4584,7 @@ class CfnEventSourceMapping(
4536
4584
  @builtins.property
4537
4585
  @jsii.member(jsii_name="functionName")
4538
4586
  def function_name(self) -> builtins.str:
4539
- '''The name or ARN of the Lambda function.'''
4587
+ '''The name of the Lambda function.'''
4540
4588
  return typing.cast(builtins.str, jsii.get(self, "functionName"))
4541
4589
 
4542
4590
  @function_name.setter
@@ -4551,7 +4599,7 @@ class CfnEventSourceMapping(
4551
4599
  def amazon_managed_kafka_event_source_config(
4552
4600
  self,
4553
4601
  ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnEventSourceMapping.AmazonManagedKafkaEventSourceConfigProperty"]]:
4554
- '''Specific configuration settings for an Amazon Managed Streaming for Apache Kafka (Amazon MSK) event source.'''
4602
+ '''Specific configuration settings for an MSK event source.'''
4555
4603
  return typing.cast(typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnEventSourceMapping.AmazonManagedKafkaEventSourceConfigProperty"]], jsii.get(self, "amazonManagedKafkaEventSourceConfig"))
4556
4604
 
4557
4605
  @amazon_managed_kafka_event_source_config.setter
@@ -4567,7 +4615,7 @@ class CfnEventSourceMapping(
4567
4615
  @builtins.property
4568
4616
  @jsii.member(jsii_name="batchSize")
4569
4617
  def batch_size(self) -> typing.Optional[jsii.Number]:
4570
- '''The maximum number of records in each batch that Lambda pulls from your stream or queue and sends to your function.'''
4618
+ '''The maximum number of items to retrieve in a single batch.'''
4571
4619
  return typing.cast(typing.Optional[jsii.Number], jsii.get(self, "batchSize"))
4572
4620
 
4573
4621
  @batch_size.setter
@@ -4582,7 +4630,7 @@ class CfnEventSourceMapping(
4582
4630
  def bisect_batch_on_function_error(
4583
4631
  self,
4584
4632
  ) -> typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]]:
4585
- '''(Kinesis and DynamoDB Streams only) If the function returns an error, split the batch in two and retry.'''
4633
+ '''(Streams) If the function returns an error, split the batch in two and retry.'''
4586
4634
  return typing.cast(typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]], jsii.get(self, "bisectBatchOnFunctionError"))
4587
4635
 
4588
4636
  @bisect_batch_on_function_error.setter
@@ -4600,7 +4648,7 @@ class CfnEventSourceMapping(
4600
4648
  def destination_config(
4601
4649
  self,
4602
4650
  ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnEventSourceMapping.DestinationConfigProperty"]]:
4603
- '''(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka event sources only) A configuration object that specifies the destination of an event after Lambda processes it.'''
4651
+ '''A configuration object that specifies the destination of an event after Lambda processes it.'''
4604
4652
  return typing.cast(typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnEventSourceMapping.DestinationConfigProperty"]], jsii.get(self, "destinationConfig"))
4605
4653
 
4606
4654
  @destination_config.setter
@@ -4618,7 +4666,7 @@ class CfnEventSourceMapping(
4618
4666
  def document_db_event_source_config(
4619
4667
  self,
4620
4668
  ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnEventSourceMapping.DocumentDBEventSourceConfigProperty"]]:
4621
- '''Specific configuration settings for a DocumentDB event source.'''
4669
+ '''Document db event source config.'''
4622
4670
  return typing.cast(typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnEventSourceMapping.DocumentDBEventSourceConfigProperty"]], jsii.get(self, "documentDbEventSourceConfig"))
4623
4671
 
4624
4672
  @document_db_event_source_config.setter
@@ -4636,10 +4684,7 @@ class CfnEventSourceMapping(
4636
4684
  def enabled(
4637
4685
  self,
4638
4686
  ) -> typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]]:
4639
- '''When true, the event source mapping is active.
4640
-
4641
- When false, Lambda pauses polling and invocation.
4642
- '''
4687
+ '''Disables the event source mapping to pause polling and invocation.'''
4643
4688
  return typing.cast(typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]], jsii.get(self, "enabled"))
4644
4689
 
4645
4690
  @enabled.setter
@@ -4670,7 +4715,7 @@ class CfnEventSourceMapping(
4670
4715
  def filter_criteria(
4671
4716
  self,
4672
4717
  ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnEventSourceMapping.FilterCriteriaProperty"]]:
4673
- '''An object that defines the filter criteria that determine whether Lambda should process an event.'''
4718
+ '''The filter criteria to control event filtering.'''
4674
4719
  return typing.cast(typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnEventSourceMapping.FilterCriteriaProperty"]], jsii.get(self, "filterCriteria"))
4675
4720
 
4676
4721
  @filter_criteria.setter
@@ -4686,7 +4731,7 @@ class CfnEventSourceMapping(
4686
4731
  @builtins.property
4687
4732
  @jsii.member(jsii_name="functionResponseTypes")
4688
4733
  def function_response_types(self) -> typing.Optional[typing.List[builtins.str]]:
4689
- '''(Streams and SQS) A list of current response type enums applied to the event source mapping.'''
4734
+ '''(Streams) A list of response types supported by the function.'''
4690
4735
  return typing.cast(typing.Optional[typing.List[builtins.str]], jsii.get(self, "functionResponseTypes"))
4691
4736
 
4692
4737
  @function_response_types.setter
@@ -4699,10 +4744,23 @@ class CfnEventSourceMapping(
4699
4744
  check_type(argname="argument value", value=value, expected_type=type_hints["value"])
4700
4745
  jsii.set(self, "functionResponseTypes", value)
4701
4746
 
4747
+ @builtins.property
4748
+ @jsii.member(jsii_name="kmsKeyArn")
4749
+ def kms_key_arn(self) -> typing.Optional[builtins.str]:
4750
+ '''The Amazon Resource Name (ARN) of the KMS key.'''
4751
+ return typing.cast(typing.Optional[builtins.str], jsii.get(self, "kmsKeyArn"))
4752
+
4753
+ @kms_key_arn.setter
4754
+ def kms_key_arn(self, value: typing.Optional[builtins.str]) -> None:
4755
+ if __debug__:
4756
+ type_hints = typing.get_type_hints(_typecheckingstub__5110117b05ec57a413615f5bf30afd8bbafb2be839685cf0e158a1b4de420fbc)
4757
+ check_type(argname="argument value", value=value, expected_type=type_hints["value"])
4758
+ jsii.set(self, "kmsKeyArn", value)
4759
+
4702
4760
  @builtins.property
4703
4761
  @jsii.member(jsii_name="maximumBatchingWindowInSeconds")
4704
4762
  def maximum_batching_window_in_seconds(self) -> typing.Optional[jsii.Number]:
4705
- '''The maximum amount of time, in seconds, that Lambda spends gathering records before invoking the function.'''
4763
+ '''(Streams) The maximum amount of time to gather records before invoking the function, in seconds.'''
4706
4764
  return typing.cast(typing.Optional[jsii.Number], jsii.get(self, "maximumBatchingWindowInSeconds"))
4707
4765
 
4708
4766
  @maximum_batching_window_in_seconds.setter
@@ -4718,7 +4776,7 @@ class CfnEventSourceMapping(
4718
4776
  @builtins.property
4719
4777
  @jsii.member(jsii_name="maximumRecordAgeInSeconds")
4720
4778
  def maximum_record_age_in_seconds(self) -> typing.Optional[jsii.Number]:
4721
- '''(Kinesis and DynamoDB Streams only) Discard records older than the specified age.'''
4779
+ '''(Streams) The maximum age of a record that Lambda sends to a function for processing.'''
4722
4780
  return typing.cast(typing.Optional[jsii.Number], jsii.get(self, "maximumRecordAgeInSeconds"))
4723
4781
 
4724
4782
  @maximum_record_age_in_seconds.setter
@@ -4734,7 +4792,7 @@ class CfnEventSourceMapping(
4734
4792
  @builtins.property
4735
4793
  @jsii.member(jsii_name="maximumRetryAttempts")
4736
4794
  def maximum_retry_attempts(self) -> typing.Optional[jsii.Number]:
4737
- '''(Kinesis and DynamoDB Streams only) Discard records after the specified number of retries.'''
4795
+ '''(Streams) The maximum number of times to retry when the function returns an error.'''
4738
4796
  return typing.cast(typing.Optional[jsii.Number], jsii.get(self, "maximumRetryAttempts"))
4739
4797
 
4740
4798
  @maximum_retry_attempts.setter
@@ -4747,7 +4805,7 @@ class CfnEventSourceMapping(
4747
4805
  @builtins.property
4748
4806
  @jsii.member(jsii_name="parallelizationFactor")
4749
4807
  def parallelization_factor(self) -> typing.Optional[jsii.Number]:
4750
- '''(Kinesis and DynamoDB Streams only) The number of batches to process concurrently from each shard.'''
4808
+ '''(Streams) The number of batches to process from each shard concurrently.'''
4751
4809
  return typing.cast(typing.Optional[jsii.Number], jsii.get(self, "parallelizationFactor"))
4752
4810
 
4753
4811
  @parallelization_factor.setter
@@ -4760,7 +4818,7 @@ class CfnEventSourceMapping(
4760
4818
  @builtins.property
4761
4819
  @jsii.member(jsii_name="queues")
4762
4820
  def queues(self) -> typing.Optional[typing.List[builtins.str]]:
4763
- '''(Amazon MQ) The name of the Amazon MQ broker destination queue to consume.'''
4821
+ '''(ActiveMQ) A list of ActiveMQ queues.'''
4764
4822
  return typing.cast(typing.Optional[typing.List[builtins.str]], jsii.get(self, "queues"))
4765
4823
 
4766
4824
  @queues.setter
@@ -4775,7 +4833,7 @@ class CfnEventSourceMapping(
4775
4833
  def scaling_config(
4776
4834
  self,
4777
4835
  ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnEventSourceMapping.ScalingConfigProperty"]]:
4778
- '''(Amazon SQS only) The scaling configuration for the event source.'''
4836
+ '''The scaling configuration for the event source.'''
4779
4837
  return typing.cast(typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnEventSourceMapping.ScalingConfigProperty"]], jsii.get(self, "scalingConfig"))
4780
4838
 
4781
4839
  @scaling_config.setter
@@ -4793,7 +4851,7 @@ class CfnEventSourceMapping(
4793
4851
  def self_managed_event_source(
4794
4852
  self,
4795
4853
  ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnEventSourceMapping.SelfManagedEventSourceProperty"]]:
4796
- '''The self-managed Apache Kafka cluster for your event source.'''
4854
+ '''The configuration used by AWS Lambda to access a self-managed event source.'''
4797
4855
  return typing.cast(typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnEventSourceMapping.SelfManagedEventSourceProperty"]], jsii.get(self, "selfManagedEventSource"))
4798
4856
 
4799
4857
  @self_managed_event_source.setter
@@ -4811,7 +4869,7 @@ class CfnEventSourceMapping(
4811
4869
  def self_managed_kafka_event_source_config(
4812
4870
  self,
4813
4871
  ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnEventSourceMapping.SelfManagedKafkaEventSourceConfigProperty"]]:
4814
- '''Specific configuration settings for a self-managed Apache Kafka event source.'''
4872
+ '''Specific configuration settings for a Self-Managed Apache Kafka event source.'''
4815
4873
  return typing.cast(typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnEventSourceMapping.SelfManagedKafkaEventSourceConfigProperty"]], jsii.get(self, "selfManagedKafkaEventSourceConfig"))
4816
4874
 
4817
4875
  @self_managed_kafka_event_source_config.setter
@@ -4829,7 +4887,7 @@ class CfnEventSourceMapping(
4829
4887
  def source_access_configurations(
4830
4888
  self,
4831
4889
  ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, typing.List[typing.Union[_IResolvable_da3f097b, "CfnEventSourceMapping.SourceAccessConfigurationProperty"]]]]:
4832
- '''An array of the authentication protocol, VPC components, or virtual host to secure and define your event source.'''
4890
+ '''A list of SourceAccessConfiguration.'''
4833
4891
  return typing.cast(typing.Optional[typing.Union[_IResolvable_da3f097b, typing.List[typing.Union[_IResolvable_da3f097b, "CfnEventSourceMapping.SourceAccessConfigurationProperty"]]]], jsii.get(self, "sourceAccessConfigurations"))
4834
4892
 
4835
4893
  @source_access_configurations.setter
@@ -4845,10 +4903,7 @@ class CfnEventSourceMapping(
4845
4903
  @builtins.property
4846
4904
  @jsii.member(jsii_name="startingPosition")
4847
4905
  def starting_position(self) -> typing.Optional[builtins.str]:
4848
- '''The position in a stream from which to start reading.
4849
-
4850
- Required for Amazon Kinesis and Amazon DynamoDB.
4851
- '''
4906
+ '''The position in a stream from which to start reading.'''
4852
4907
  return typing.cast(typing.Optional[builtins.str], jsii.get(self, "startingPosition"))
4853
4908
 
4854
4909
  @starting_position.setter
@@ -4861,7 +4916,7 @@ class CfnEventSourceMapping(
4861
4916
  @builtins.property
4862
4917
  @jsii.member(jsii_name="startingPositionTimestamp")
4863
4918
  def starting_position_timestamp(self) -> typing.Optional[jsii.Number]:
4864
- '''With ``StartingPosition`` set to ``AT_TIMESTAMP`` , the time from which to start reading, in Unix time seconds.'''
4919
+ '''With StartingPosition set to AT_TIMESTAMP, the time from which to start reading, in Unix time seconds.'''
4865
4920
  return typing.cast(typing.Optional[jsii.Number], jsii.get(self, "startingPositionTimestamp"))
4866
4921
 
4867
4922
  @starting_position_timestamp.setter
@@ -4874,7 +4929,7 @@ class CfnEventSourceMapping(
4874
4929
  @builtins.property
4875
4930
  @jsii.member(jsii_name="topics")
4876
4931
  def topics(self) -> typing.Optional[typing.List[builtins.str]]:
4877
- '''The name of the Kafka topic.'''
4932
+ '''(Kafka) A list of Kafka topics.'''
4878
4933
  return typing.cast(typing.Optional[typing.List[builtins.str]], jsii.get(self, "topics"))
4879
4934
 
4880
4935
  @topics.setter
@@ -4887,7 +4942,7 @@ class CfnEventSourceMapping(
4887
4942
  @builtins.property
4888
4943
  @jsii.member(jsii_name="tumblingWindowInSeconds")
4889
4944
  def tumbling_window_in_seconds(self) -> typing.Optional[jsii.Number]:
4890
- '''(Kinesis and DynamoDB Streams only) The duration in seconds of a processing window for DynamoDB and Kinesis Streams event sources.'''
4945
+ '''(Streams) Tumbling window (non-overlapping time window) duration to perform aggregations.'''
4891
4946
  return typing.cast(typing.Optional[jsii.Number], jsii.get(self, "tumblingWindowInSeconds"))
4892
4947
 
4893
4948
  @tumbling_window_in_seconds.setter
@@ -4908,9 +4963,9 @@ class CfnEventSourceMapping(
4908
4963
  *,
4909
4964
  consumer_group_id: typing.Optional[builtins.str] = None,
4910
4965
  ) -> None:
4911
- '''Specific configuration settings for an Amazon Managed Streaming for Apache Kafka (Amazon MSK) event source.
4966
+ '''Specific configuration settings for an MSK event source.
4912
4967
 
4913
- :param consumer_group_id: The identifier for the Kafka consumer group to join. The consumer group ID must be unique among all your Kafka event sources. After creating a Kafka event source mapping with the consumer group ID specified, you cannot update this value. For more information, see `Customizable consumer group ID <https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#services-msk-consumer-group-id>`_ .
4968
+ :param consumer_group_id: The identifier for the Kafka Consumer Group to join.
4914
4969
 
4915
4970
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-amazonmanagedkafkaeventsourceconfig.html
4916
4971
  :exampleMetadata: fixture=_generated
@@ -4934,9 +4989,7 @@ class CfnEventSourceMapping(
4934
4989
 
4935
4990
  @builtins.property
4936
4991
  def consumer_group_id(self) -> typing.Optional[builtins.str]:
4937
- '''The identifier for the Kafka consumer group to join.
4938
-
4939
- The consumer group ID must be unique among all your Kafka event sources. After creating a Kafka event source mapping with the consumer group ID specified, you cannot update this value. For more information, see `Customizable consumer group ID <https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#services-msk-consumer-group-id>`_ .
4992
+ '''The identifier for the Kafka Consumer Group to join.
4940
4993
 
4941
4994
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-amazonmanagedkafkaeventsourceconfig.html#cfn-lambda-eventsourcemapping-amazonmanagedkafkaeventsourceconfig-consumergroupid
4942
4995
  '''
@@ -4967,7 +5020,7 @@ class CfnEventSourceMapping(
4967
5020
  ) -> None:
4968
5021
  '''A configuration object that specifies the destination of an event after Lambda processes it.
4969
5022
 
4970
- :param on_failure: The destination configuration for failed invocations.
5023
+ :param on_failure: A destination for records of invocations that failed processing.
4971
5024
 
4972
5025
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-destinationconfig.html
4973
5026
  :exampleMetadata: fixture=_generated
@@ -4995,7 +5048,7 @@ class CfnEventSourceMapping(
4995
5048
  def on_failure(
4996
5049
  self,
4997
5050
  ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnEventSourceMapping.OnFailureProperty"]]:
4998
- '''The destination configuration for failed invocations.
5051
+ '''A destination for records of invocations that failed processing.
4999
5052
 
5000
5053
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-destinationconfig.html#cfn-lambda-eventsourcemapping-destinationconfig-onfailure
5001
5054
  '''
@@ -5030,11 +5083,11 @@ class CfnEventSourceMapping(
5030
5083
  database_name: typing.Optional[builtins.str] = None,
5031
5084
  full_document: typing.Optional[builtins.str] = None,
5032
5085
  ) -> None:
5033
- '''Specific configuration settings for a DocumentDB event source.
5086
+ '''Document db event source config.
5034
5087
 
5035
- :param collection_name: The name of the collection to consume within the database. If you do not specify a collection, Lambda consumes all collections.
5036
- :param database_name: The name of the database to consume within the DocumentDB cluster.
5037
- :param full_document: Determines what DocumentDB sends to your event stream during document update operations. If set to UpdateLookup, DocumentDB sends a delta describing the changes, along with a copy of the entire document. Otherwise, DocumentDB sends only a partial document that contains the changes.
5088
+ :param collection_name: The collection name to connect to.
5089
+ :param database_name: The database name to connect to.
5090
+ :param full_document: Include full document in change stream response. The default option will only send the changes made to documents to Lambda. If you want the complete document sent to Lambda, set this to UpdateLookup.
5038
5091
 
5039
5092
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-documentdbeventsourceconfig.html
5040
5093
  :exampleMetadata: fixture=_generated
@@ -5066,9 +5119,7 @@ class CfnEventSourceMapping(
5066
5119
 
5067
5120
  @builtins.property
5068
5121
  def collection_name(self) -> typing.Optional[builtins.str]:
5069
- '''The name of the collection to consume within the database.
5070
-
5071
- If you do not specify a collection, Lambda consumes all collections.
5122
+ '''The collection name to connect to.
5072
5123
 
5073
5124
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-documentdbeventsourceconfig.html#cfn-lambda-eventsourcemapping-documentdbeventsourceconfig-collectionname
5074
5125
  '''
@@ -5077,7 +5128,7 @@ class CfnEventSourceMapping(
5077
5128
 
5078
5129
  @builtins.property
5079
5130
  def database_name(self) -> typing.Optional[builtins.str]:
5080
- '''The name of the database to consume within the DocumentDB cluster.
5131
+ '''The database name to connect to.
5081
5132
 
5082
5133
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-documentdbeventsourceconfig.html#cfn-lambda-eventsourcemapping-documentdbeventsourceconfig-databasename
5083
5134
  '''
@@ -5086,9 +5137,9 @@ class CfnEventSourceMapping(
5086
5137
 
5087
5138
  @builtins.property
5088
5139
  def full_document(self) -> typing.Optional[builtins.str]:
5089
- '''Determines what DocumentDB sends to your event stream during document update operations.
5140
+ '''Include full document in change stream response.
5090
5141
 
5091
- If set to UpdateLookup, DocumentDB sends a delta describing the changes, along with a copy of the entire document. Otherwise, DocumentDB sends only a partial document that contains the changes.
5142
+ The default option will only send the changes made to documents to Lambda. If you want the complete document sent to Lambda, set this to UpdateLookup.
5092
5143
 
5093
5144
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-documentdbeventsourceconfig.html#cfn-lambda-eventsourcemapping-documentdbeventsourceconfig-fulldocument
5094
5145
  '''
@@ -5117,9 +5168,9 @@ class CfnEventSourceMapping(
5117
5168
  *,
5118
5169
  kafka_bootstrap_servers: typing.Optional[typing.Sequence[builtins.str]] = None,
5119
5170
  ) -> None:
5120
- '''The list of bootstrap servers for your Kafka brokers in the following format: ``"KafkaBootstrapServers": ["abc.xyz.com:xxxx","abc2.xyz.com:xxxx"]`` .
5171
+ '''The endpoints used by AWS Lambda to access a self-managed event source.
5121
5172
 
5122
- :param kafka_bootstrap_servers: The list of bootstrap servers for your Kafka brokers in the following format: ``"KafkaBootstrapServers": ["abc.xyz.com:xxxx","abc2.xyz.com:xxxx"]`` .
5173
+ :param kafka_bootstrap_servers: A list of Kafka server endpoints.
5123
5174
 
5124
5175
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-endpoints.html
5125
5176
  :exampleMetadata: fixture=_generated
@@ -5143,7 +5194,7 @@ class CfnEventSourceMapping(
5143
5194
 
5144
5195
  @builtins.property
5145
5196
  def kafka_bootstrap_servers(self) -> typing.Optional[typing.List[builtins.str]]:
5146
- '''The list of bootstrap servers for your Kafka brokers in the following format: ``"KafkaBootstrapServers": ["abc.xyz.com:xxxx","abc2.xyz.com:xxxx"]`` .
5197
+ '''A list of Kafka server endpoints.
5147
5198
 
5148
5199
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-endpoints.html#cfn-lambda-eventsourcemapping-endpoints-kafkabootstrapservers
5149
5200
  '''
@@ -5172,9 +5223,9 @@ class CfnEventSourceMapping(
5172
5223
  *,
5173
5224
  filters: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Sequence[typing.Union[_IResolvable_da3f097b, typing.Union["CfnEventSourceMapping.FilterProperty", typing.Dict[builtins.str, typing.Any]]]]]] = None,
5174
5225
  ) -> None:
5175
- '''An object that contains the filters for an event source.
5226
+ '''The filter criteria to control event filtering.
5176
5227
 
5177
- :param filters: A list of filters.
5228
+ :param filters: List of filters of this FilterCriteria.
5178
5229
 
5179
5230
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-filtercriteria.html
5180
5231
  :exampleMetadata: fixture=_generated
@@ -5202,7 +5253,7 @@ class CfnEventSourceMapping(
5202
5253
  def filters(
5203
5254
  self,
5204
5255
  ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, typing.List[typing.Union[_IResolvable_da3f097b, "CfnEventSourceMapping.FilterProperty"]]]]:
5205
- '''A list of filters.
5256
+ '''List of filters of this FilterCriteria.
5206
5257
 
5207
5258
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-filtercriteria.html#cfn-lambda-eventsourcemapping-filtercriteria-filters
5208
5259
  '''
@@ -5227,9 +5278,9 @@ class CfnEventSourceMapping(
5227
5278
  )
5228
5279
  class FilterProperty:
5229
5280
  def __init__(self, *, pattern: typing.Optional[builtins.str] = None) -> None:
5230
- '''A structure within a ``FilterCriteria`` object that defines an event filtering pattern.
5281
+ '''The filter object that defines parameters for ESM filtering.
5231
5282
 
5232
- :param pattern: A filter pattern. For more information on the syntax of a filter pattern, see `Filter rule syntax <https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html#filtering-syntax>`_ .
5283
+ :param pattern: The filter pattern that defines which events should be passed for invocations.
5233
5284
 
5234
5285
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-filter.html
5235
5286
  :exampleMetadata: fixture=_generated
@@ -5253,9 +5304,7 @@ class CfnEventSourceMapping(
5253
5304
 
5254
5305
  @builtins.property
5255
5306
  def pattern(self) -> typing.Optional[builtins.str]:
5256
- '''A filter pattern.
5257
-
5258
- For more information on the syntax of a filter pattern, see `Filter rule syntax <https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html#filtering-syntax>`_ .
5307
+ '''The filter pattern that defines which events should be passed for invocations.
5259
5308
 
5260
5309
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-filter.html#cfn-lambda-eventsourcemapping-filter-pattern
5261
5310
  '''
@@ -5284,9 +5333,9 @@ class CfnEventSourceMapping(
5284
5333
  *,
5285
5334
  destination: typing.Optional[builtins.str] = None,
5286
5335
  ) -> None:
5287
- '''A destination for events that failed processing.
5336
+ '''A destination for records of invocations that failed processing.
5288
5337
 
5289
- :param destination: The Amazon Resource Name (ARN) of the destination resource. To retain records of `asynchronous invocations <https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-async-destinations>`_ , you can configure an Amazon SNS topic, Amazon SQS queue, Lambda function, or Amazon EventBridge event bus as the destination. To retain records of failed invocations from `Kinesis and DynamoDB event sources <https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html#event-source-mapping-destinations>`_ , you can configure an Amazon SNS topic or Amazon SQS queue as the destination. To retain records of failed invocations from `self-managed Kafka <https://docs.aws.amazon.com/lambda/latest/dg/with-kafka.html#services-smaa-onfailure-destination>`_ or `Amazon MSK <https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#services-msk-onfailure-destination>`_ , you can configure an Amazon SNS topic, Amazon SQS queue, or Amazon S3 bucket as the destination.
5338
+ :param destination: The Amazon Resource Name (ARN) of the destination resource.
5290
5339
 
5291
5340
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-onfailure.html
5292
5341
  :exampleMetadata: fixture=_generated
@@ -5312,12 +5361,6 @@ class CfnEventSourceMapping(
5312
5361
  def destination(self) -> typing.Optional[builtins.str]:
5313
5362
  '''The Amazon Resource Name (ARN) of the destination resource.
5314
5363
 
5315
- To retain records of `asynchronous invocations <https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-async-destinations>`_ , you can configure an Amazon SNS topic, Amazon SQS queue, Lambda function, or Amazon EventBridge event bus as the destination.
5316
-
5317
- To retain records of failed invocations from `Kinesis and DynamoDB event sources <https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html#event-source-mapping-destinations>`_ , you can configure an Amazon SNS topic or Amazon SQS queue as the destination.
5318
-
5319
- To retain records of failed invocations from `self-managed Kafka <https://docs.aws.amazon.com/lambda/latest/dg/with-kafka.html#services-smaa-onfailure-destination>`_ or `Amazon MSK <https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#services-msk-onfailure-destination>`_ , you can configure an Amazon SNS topic, Amazon SQS queue, or Amazon S3 bucket as the destination.
5320
-
5321
5364
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-onfailure.html#cfn-lambda-eventsourcemapping-onfailure-destination
5322
5365
  '''
5323
5366
  result = self._values.get("destination")
@@ -5345,11 +5388,9 @@ class CfnEventSourceMapping(
5345
5388
  *,
5346
5389
  maximum_concurrency: typing.Optional[jsii.Number] = None,
5347
5390
  ) -> None:
5348
- '''(Amazon SQS only) The scaling configuration for the event source.
5349
-
5350
- To remove the configuration, pass an empty value.
5391
+ '''The scaling configuration for the event source.
5351
5392
 
5352
- :param maximum_concurrency: Limits the number of concurrent instances that the Amazon SQS event source can invoke.
5393
+ :param maximum_concurrency: The maximum number of concurrent functions that an event source can invoke.
5353
5394
 
5354
5395
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-scalingconfig.html
5355
5396
  :exampleMetadata: fixture=_generated
@@ -5373,7 +5414,7 @@ class CfnEventSourceMapping(
5373
5414
 
5374
5415
  @builtins.property
5375
5416
  def maximum_concurrency(self) -> typing.Optional[jsii.Number]:
5376
- '''Limits the number of concurrent instances that the Amazon SQS event source can invoke.
5417
+ '''The maximum number of concurrent functions that an event source can invoke.
5377
5418
 
5378
5419
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-scalingconfig.html#cfn-lambda-eventsourcemapping-scalingconfig-maximumconcurrency
5379
5420
  '''
@@ -5402,9 +5443,9 @@ class CfnEventSourceMapping(
5402
5443
  *,
5403
5444
  endpoints: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union["CfnEventSourceMapping.EndpointsProperty", typing.Dict[builtins.str, typing.Any]]]] = None,
5404
5445
  ) -> None:
5405
- '''The self-managed Apache Kafka cluster for your event source.
5446
+ '''The configuration used by AWS Lambda to access a self-managed event source.
5406
5447
 
5407
- :param endpoints: The list of bootstrap servers for your Kafka brokers in the following format: ``"KafkaBootstrapServers": ["abc.xyz.com:xxxx","abc2.xyz.com:xxxx"]`` .
5448
+ :param endpoints: The endpoints used by AWS Lambda to access a self-managed event source.
5408
5449
 
5409
5450
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-selfmanagedeventsource.html
5410
5451
  :exampleMetadata: fixture=_generated
@@ -5432,7 +5473,7 @@ class CfnEventSourceMapping(
5432
5473
  def endpoints(
5433
5474
  self,
5434
5475
  ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnEventSourceMapping.EndpointsProperty"]]:
5435
- '''The list of bootstrap servers for your Kafka brokers in the following format: ``"KafkaBootstrapServers": ["abc.xyz.com:xxxx","abc2.xyz.com:xxxx"]`` .
5476
+ '''The endpoints used by AWS Lambda to access a self-managed event source.
5436
5477
 
5437
5478
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-selfmanagedeventsource.html#cfn-lambda-eventsourcemapping-selfmanagedeventsource-endpoints
5438
5479
  '''
@@ -5461,9 +5502,9 @@ class CfnEventSourceMapping(
5461
5502
  *,
5462
5503
  consumer_group_id: typing.Optional[builtins.str] = None,
5463
5504
  ) -> None:
5464
- '''Specific configuration settings for a self-managed Apache Kafka event source.
5505
+ '''Specific configuration settings for a Self-Managed Apache Kafka event source.
5465
5506
 
5466
- :param consumer_group_id: The identifier for the Kafka consumer group to join. The consumer group ID must be unique among all your Kafka event sources. After creating a Kafka event source mapping with the consumer group ID specified, you cannot update this value. For more information, see `Customizable consumer group ID <https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#services-msk-consumer-group-id>`_ .
5507
+ :param consumer_group_id: The identifier for the Kafka Consumer Group to join.
5467
5508
 
5468
5509
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-selfmanagedkafkaeventsourceconfig.html
5469
5510
  :exampleMetadata: fixture=_generated
@@ -5487,9 +5528,7 @@ class CfnEventSourceMapping(
5487
5528
 
5488
5529
  @builtins.property
5489
5530
  def consumer_group_id(self) -> typing.Optional[builtins.str]:
5490
- '''The identifier for the Kafka consumer group to join.
5491
-
5492
- The consumer group ID must be unique among all your Kafka event sources. After creating a Kafka event source mapping with the consumer group ID specified, you cannot update this value. For more information, see `Customizable consumer group ID <https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#services-msk-consumer-group-id>`_ .
5531
+ '''The identifier for the Kafka Consumer Group to join.
5493
5532
 
5494
5533
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-selfmanagedkafkaeventsourceconfig.html#cfn-lambda-eventsourcemapping-selfmanagedkafkaeventsourceconfig-consumergroupid
5495
5534
  '''
@@ -5519,10 +5558,10 @@ class CfnEventSourceMapping(
5519
5558
  type: typing.Optional[builtins.str] = None,
5520
5559
  uri: typing.Optional[builtins.str] = None,
5521
5560
  ) -> None:
5522
- '''An array of the authentication protocol, VPC components, or virtual host to secure and define your event source.
5561
+ '''The configuration used by AWS Lambda to access event source.
5523
5562
 
5524
- :param type: The type of authentication protocol, VPC components, or virtual host for your event source. For example: ``"Type":"SASL_SCRAM_512_AUTH"`` . - ``BASIC_AUTH`` – (Amazon MQ) The AWS Secrets Manager secret that stores your broker credentials. - ``BASIC_AUTH`` – (Self-managed Apache Kafka) The Secrets Manager ARN of your secret key used for SASL/PLAIN authentication of your Apache Kafka brokers. - ``VPC_SUBNET`` – (Self-managed Apache Kafka) The subnets associated with your VPC. Lambda connects to these subnets to fetch data from your self-managed Apache Kafka cluster. - ``VPC_SECURITY_GROUP`` – (Self-managed Apache Kafka) The VPC security group used to manage access to your self-managed Apache Kafka brokers. - ``SASL_SCRAM_256_AUTH`` – (Self-managed Apache Kafka) The Secrets Manager ARN of your secret key used for SASL SCRAM-256 authentication of your self-managed Apache Kafka brokers. - ``SASL_SCRAM_512_AUTH`` – (Amazon MSK, Self-managed Apache Kafka) The Secrets Manager ARN of your secret key used for SASL SCRAM-512 authentication of your self-managed Apache Kafka brokers. - ``VIRTUAL_HOST`` –- (RabbitMQ) The name of the virtual host in your RabbitMQ broker. Lambda uses this RabbitMQ host as the event source. This property cannot be specified in an UpdateEventSourceMapping API call. - ``CLIENT_CERTIFICATE_TLS_AUTH`` – (Amazon MSK, self-managed Apache Kafka) The Secrets Manager ARN of your secret key containing the certificate chain (X.509 PEM), private key (PKCS#8 PEM), and private key password (optional) used for mutual TLS authentication of your MSK/Apache Kafka brokers. - ``SERVER_ROOT_CA_CERTIFICATE`` – (Self-managed Apache Kafka) The Secrets Manager ARN of your secret key containing the root CA certificate (X.509 PEM) used for TLS encryption of your Apache Kafka brokers.
5525
- :param uri: The value for your chosen configuration in ``Type`` . For example: ``"URI": "arn:aws:secretsmanager:us-east-1:01234567890:secret:MyBrokerSecretName"`` .
5563
+ :param type: The type of source access configuration.
5564
+ :param uri: The URI for the source access configuration resource.
5526
5565
 
5527
5566
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-sourceaccessconfiguration.html
5528
5567
  :exampleMetadata: fixture=_generated
@@ -5550,17 +5589,7 @@ class CfnEventSourceMapping(
5550
5589
 
5551
5590
  @builtins.property
5552
5591
  def type(self) -> typing.Optional[builtins.str]:
5553
- '''The type of authentication protocol, VPC components, or virtual host for your event source. For example: ``"Type":"SASL_SCRAM_512_AUTH"`` .
5554
-
5555
- - ``BASIC_AUTH`` – (Amazon MQ) The AWS Secrets Manager secret that stores your broker credentials.
5556
- - ``BASIC_AUTH`` – (Self-managed Apache Kafka) The Secrets Manager ARN of your secret key used for SASL/PLAIN authentication of your Apache Kafka brokers.
5557
- - ``VPC_SUBNET`` – (Self-managed Apache Kafka) The subnets associated with your VPC. Lambda connects to these subnets to fetch data from your self-managed Apache Kafka cluster.
5558
- - ``VPC_SECURITY_GROUP`` – (Self-managed Apache Kafka) The VPC security group used to manage access to your self-managed Apache Kafka brokers.
5559
- - ``SASL_SCRAM_256_AUTH`` – (Self-managed Apache Kafka) The Secrets Manager ARN of your secret key used for SASL SCRAM-256 authentication of your self-managed Apache Kafka brokers.
5560
- - ``SASL_SCRAM_512_AUTH`` – (Amazon MSK, Self-managed Apache Kafka) The Secrets Manager ARN of your secret key used for SASL SCRAM-512 authentication of your self-managed Apache Kafka brokers.
5561
- - ``VIRTUAL_HOST`` –- (RabbitMQ) The name of the virtual host in your RabbitMQ broker. Lambda uses this RabbitMQ host as the event source. This property cannot be specified in an UpdateEventSourceMapping API call.
5562
- - ``CLIENT_CERTIFICATE_TLS_AUTH`` – (Amazon MSK, self-managed Apache Kafka) The Secrets Manager ARN of your secret key containing the certificate chain (X.509 PEM), private key (PKCS#8 PEM), and private key password (optional) used for mutual TLS authentication of your MSK/Apache Kafka brokers.
5563
- - ``SERVER_ROOT_CA_CERTIFICATE`` – (Self-managed Apache Kafka) The Secrets Manager ARN of your secret key containing the root CA certificate (X.509 PEM) used for TLS encryption of your Apache Kafka brokers.
5592
+ '''The type of source access configuration.
5564
5593
 
5565
5594
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-sourceaccessconfiguration.html#cfn-lambda-eventsourcemapping-sourceaccessconfiguration-type
5566
5595
  '''
@@ -5569,9 +5598,7 @@ class CfnEventSourceMapping(
5569
5598
 
5570
5599
  @builtins.property
5571
5600
  def uri(self) -> typing.Optional[builtins.str]:
5572
- '''The value for your chosen configuration in ``Type`` .
5573
-
5574
- For example: ``"URI": "arn:aws:secretsmanager:us-east-1:01234567890:secret:MyBrokerSecretName"`` .
5601
+ '''The URI for the source access configuration resource.
5575
5602
 
5576
5603
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-sourceaccessconfiguration.html#cfn-lambda-eventsourcemapping-sourceaccessconfiguration-uri
5577
5604
  '''
@@ -5604,6 +5631,7 @@ class CfnEventSourceMapping(
5604
5631
  "event_source_arn": "eventSourceArn",
5605
5632
  "filter_criteria": "filterCriteria",
5606
5633
  "function_response_types": "functionResponseTypes",
5634
+ "kms_key_arn": "kmsKeyArn",
5607
5635
  "maximum_batching_window_in_seconds": "maximumBatchingWindowInSeconds",
5608
5636
  "maximum_record_age_in_seconds": "maximumRecordAgeInSeconds",
5609
5637
  "maximum_retry_attempts": "maximumRetryAttempts",
@@ -5633,6 +5661,7 @@ class CfnEventSourceMappingProps:
5633
5661
  event_source_arn: typing.Optional[builtins.str] = None,
5634
5662
  filter_criteria: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union[CfnEventSourceMapping.FilterCriteriaProperty, typing.Dict[builtins.str, typing.Any]]]] = None,
5635
5663
  function_response_types: typing.Optional[typing.Sequence[builtins.str]] = None,
5664
+ kms_key_arn: typing.Optional[builtins.str] = None,
5636
5665
  maximum_batching_window_in_seconds: typing.Optional[jsii.Number] = None,
5637
5666
  maximum_record_age_in_seconds: typing.Optional[jsii.Number] = None,
5638
5667
  maximum_retry_attempts: typing.Optional[jsii.Number] = None,
@@ -5649,29 +5678,30 @@ class CfnEventSourceMappingProps:
5649
5678
  ) -> None:
5650
5679
  '''Properties for defining a ``CfnEventSourceMapping``.
5651
5680
 
5652
- :param function_name: The name or ARN of the Lambda function. **Name formats** - *Function name* – ``MyFunction`` . - *Function ARN* – ``arn:aws:lambda:us-west-2:123456789012:function:MyFunction`` . - *Version or Alias ARN* – ``arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD`` . - *Partial ARN* – ``123456789012:function:MyFunction`` . The length constraint applies only to the full ARN. If you specify only the function name, it's limited to 64 characters in length.
5653
- :param amazon_managed_kafka_event_source_config: Specific configuration settings for an Amazon Managed Streaming for Apache Kafka (Amazon MSK) event source.
5654
- :param batch_size: The maximum number of records in each batch that Lambda pulls from your stream or queue and sends to your function. Lambda passes all of the records in the batch to the function in a single call, up to the payload limit for synchronous invocation (6 MB). - *Amazon Kinesis* – Default 100. Max 10,000. - *Amazon DynamoDB Streams* – Default 100. Max 10,000. - *Amazon Simple Queue Service* – Default 10. For standard queues the max is 10,000. For FIFO queues the max is 10. - *Amazon Managed Streaming for Apache Kafka* – Default 100. Max 10,000. - *Self-managed Apache Kafka* – Default 100. Max 10,000. - *Amazon MQ (ActiveMQ and RabbitMQ)* – Default 100. Max 10,000. - *DocumentDB* – Default 100. Max 10,000.
5655
- :param bisect_batch_on_function_error: (Kinesis and DynamoDB Streams only) If the function returns an error, split the batch in two and retry. The default value is false.
5656
- :param destination_config: (Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka event sources only) A configuration object that specifies the destination of an event after Lambda processes it.
5657
- :param document_db_event_source_config: Specific configuration settings for a DocumentDB event source.
5658
- :param enabled: When true, the event source mapping is active. When false, Lambda pauses polling and invocation. Default: True
5659
- :param event_source_arn: The Amazon Resource Name (ARN) of the event source. - *Amazon Kinesis* – The ARN of the data stream or a stream consumer. - *Amazon DynamoDB Streams* – The ARN of the stream. - *Amazon Simple Queue Service* – The ARN of the queue. - *Amazon Managed Streaming for Apache Kafka* – The ARN of the cluster or the ARN of the VPC connection (for `cross-account event source mappings <https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#msk-multi-vpc>`_ ). - *Amazon MQ* – The ARN of the broker. - *Amazon DocumentDB* – The ARN of the DocumentDB change stream.
5660
- :param filter_criteria: An object that defines the filter criteria that determine whether Lambda should process an event. For more information, see `Lambda event filtering <https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html>`_ .
5661
- :param function_response_types: (Streams and SQS) A list of current response type enums applied to the event source mapping. Valid Values: ``ReportBatchItemFailures``
5662
- :param maximum_batching_window_in_seconds: The maximum amount of time, in seconds, that Lambda spends gathering records before invoking the function. *Default ( Kinesis , DynamoDB , Amazon SQS event sources)* : 0 *Default ( Amazon MSK , Kafka, Amazon MQ , Amazon DocumentDB event sources)* : 500 ms *Related setting:* For Amazon SQS event sources, when you set ``BatchSize`` to a value greater than 10, you must set ``MaximumBatchingWindowInSeconds`` to at least 1.
5663
- :param maximum_record_age_in_seconds: (Kinesis and DynamoDB Streams only) Discard records older than the specified age. The default value is -1, which sets the maximum age to infinite. When the value is set to infinite, Lambda never discards old records. .. epigraph:: The minimum valid value for maximum record age is 60s. Although values less than 60 and greater than -1 fall within the parameter's absolute range, they are not allowed
5664
- :param maximum_retry_attempts: (Kinesis and DynamoDB Streams only) Discard records after the specified number of retries. The default value is -1, which sets the maximum number of retries to infinite. When MaximumRetryAttempts is infinite, Lambda retries failed records until the record expires in the event source.
5665
- :param parallelization_factor: (Kinesis and DynamoDB Streams only) The number of batches to process concurrently from each shard. The default value is 1.
5666
- :param queues: (Amazon MQ) The name of the Amazon MQ broker destination queue to consume.
5667
- :param scaling_config: (Amazon SQS only) The scaling configuration for the event source. For more information, see `Configuring maximum concurrency for Amazon SQS event sources <https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-max-concurrency>`_ .
5668
- :param self_managed_event_source: The self-managed Apache Kafka cluster for your event source.
5669
- :param self_managed_kafka_event_source_config: Specific configuration settings for a self-managed Apache Kafka event source.
5670
- :param source_access_configurations: An array of the authentication protocol, VPC components, or virtual host to secure and define your event source.
5671
- :param starting_position: The position in a stream from which to start reading. Required for Amazon Kinesis and Amazon DynamoDB. - *LATEST* - Read only new records. - *TRIM_HORIZON* - Process all available records. - *AT_TIMESTAMP* - Specify a time from which to start reading records.
5672
- :param starting_position_timestamp: With ``StartingPosition`` set to ``AT_TIMESTAMP`` , the time from which to start reading, in Unix time seconds. ``StartingPositionTimestamp`` cannot be in the future.
5673
- :param topics: The name of the Kafka topic.
5674
- :param tumbling_window_in_seconds: (Kinesis and DynamoDB Streams only) The duration in seconds of a processing window for DynamoDB and Kinesis Streams event sources. A value of 0 seconds indicates no tumbling window.
5681
+ :param function_name: The name of the Lambda function.
5682
+ :param amazon_managed_kafka_event_source_config: Specific configuration settings for an MSK event source.
5683
+ :param batch_size: The maximum number of items to retrieve in a single batch.
5684
+ :param bisect_batch_on_function_error: (Streams) If the function returns an error, split the batch in two and retry.
5685
+ :param destination_config: A configuration object that specifies the destination of an event after Lambda processes it.
5686
+ :param document_db_event_source_config: Document db event source config.
5687
+ :param enabled: Disables the event source mapping to pause polling and invocation.
5688
+ :param event_source_arn: The Amazon Resource Name (ARN) of the event source.
5689
+ :param filter_criteria: The filter criteria to control event filtering.
5690
+ :param function_response_types: (Streams) A list of response types supported by the function.
5691
+ :param kms_key_arn: The Amazon Resource Name (ARN) of the KMS key.
5692
+ :param maximum_batching_window_in_seconds: (Streams) The maximum amount of time to gather records before invoking the function, in seconds.
5693
+ :param maximum_record_age_in_seconds: (Streams) The maximum age of a record that Lambda sends to a function for processing.
5694
+ :param maximum_retry_attempts: (Streams) The maximum number of times to retry when the function returns an error.
5695
+ :param parallelization_factor: (Streams) The number of batches to process from each shard concurrently.
5696
+ :param queues: (ActiveMQ) A list of ActiveMQ queues.
5697
+ :param scaling_config: The scaling configuration for the event source.
5698
+ :param self_managed_event_source: The configuration used by AWS Lambda to access a self-managed event source.
5699
+ :param self_managed_kafka_event_source_config: Specific configuration settings for a Self-Managed Apache Kafka event source.
5700
+ :param source_access_configurations: A list of SourceAccessConfiguration.
5701
+ :param starting_position: The position in a stream from which to start reading. Required for Amazon Kinesis and Amazon DynamoDB Streams sources.
5702
+ :param starting_position_timestamp: With StartingPosition set to AT_TIMESTAMP, the time from which to start reading, in Unix time seconds.
5703
+ :param topics: (Kafka) A list of Kafka topics.
5704
+ :param tumbling_window_in_seconds: (Streams) Tumbling window (non-overlapping time window) duration to perform aggregations.
5675
5705
 
5676
5706
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html
5677
5707
  :exampleMetadata: fixture=_generated
@@ -5709,6 +5739,7 @@ class CfnEventSourceMappingProps:
5709
5739
  )]
5710
5740
  ),
5711
5741
  function_response_types=["functionResponseTypes"],
5742
+ kms_key_arn="kmsKeyArn",
5712
5743
  maximum_batching_window_in_seconds=123,
5713
5744
  maximum_record_age_in_seconds=123,
5714
5745
  maximum_retry_attempts=123,
@@ -5747,6 +5778,7 @@ class CfnEventSourceMappingProps:
5747
5778
  check_type(argname="argument event_source_arn", value=event_source_arn, expected_type=type_hints["event_source_arn"])
5748
5779
  check_type(argname="argument filter_criteria", value=filter_criteria, expected_type=type_hints["filter_criteria"])
5749
5780
  check_type(argname="argument function_response_types", value=function_response_types, expected_type=type_hints["function_response_types"])
5781
+ check_type(argname="argument kms_key_arn", value=kms_key_arn, expected_type=type_hints["kms_key_arn"])
5750
5782
  check_type(argname="argument maximum_batching_window_in_seconds", value=maximum_batching_window_in_seconds, expected_type=type_hints["maximum_batching_window_in_seconds"])
5751
5783
  check_type(argname="argument maximum_record_age_in_seconds", value=maximum_record_age_in_seconds, expected_type=type_hints["maximum_record_age_in_seconds"])
5752
5784
  check_type(argname="argument maximum_retry_attempts", value=maximum_retry_attempts, expected_type=type_hints["maximum_retry_attempts"])
@@ -5781,6 +5813,8 @@ class CfnEventSourceMappingProps:
5781
5813
  self._values["filter_criteria"] = filter_criteria
5782
5814
  if function_response_types is not None:
5783
5815
  self._values["function_response_types"] = function_response_types
5816
+ if kms_key_arn is not None:
5817
+ self._values["kms_key_arn"] = kms_key_arn
5784
5818
  if maximum_batching_window_in_seconds is not None:
5785
5819
  self._values["maximum_batching_window_in_seconds"] = maximum_batching_window_in_seconds
5786
5820
  if maximum_record_age_in_seconds is not None:
@@ -5810,15 +5844,7 @@ class CfnEventSourceMappingProps:
5810
5844
 
5811
5845
  @builtins.property
5812
5846
  def function_name(self) -> builtins.str:
5813
- '''The name or ARN of the Lambda function.
5814
-
5815
- **Name formats** - *Function name* – ``MyFunction`` .
5816
-
5817
- - *Function ARN* – ``arn:aws:lambda:us-west-2:123456789012:function:MyFunction`` .
5818
- - *Version or Alias ARN* – ``arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD`` .
5819
- - *Partial ARN* – ``123456789012:function:MyFunction`` .
5820
-
5821
- The length constraint applies only to the full ARN. If you specify only the function name, it's limited to 64 characters in length.
5847
+ '''The name of the Lambda function.
5822
5848
 
5823
5849
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-functionname
5824
5850
  '''
@@ -5830,7 +5856,7 @@ class CfnEventSourceMappingProps:
5830
5856
  def amazon_managed_kafka_event_source_config(
5831
5857
  self,
5832
5858
  ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, CfnEventSourceMapping.AmazonManagedKafkaEventSourceConfigProperty]]:
5833
- '''Specific configuration settings for an Amazon Managed Streaming for Apache Kafka (Amazon MSK) event source.
5859
+ '''Specific configuration settings for an MSK event source.
5834
5860
 
5835
5861
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-amazonmanagedkafkaeventsourceconfig
5836
5862
  '''
@@ -5839,17 +5865,7 @@ class CfnEventSourceMappingProps:
5839
5865
 
5840
5866
  @builtins.property
5841
5867
  def batch_size(self) -> typing.Optional[jsii.Number]:
5842
- '''The maximum number of records in each batch that Lambda pulls from your stream or queue and sends to your function.
5843
-
5844
- Lambda passes all of the records in the batch to the function in a single call, up to the payload limit for synchronous invocation (6 MB).
5845
-
5846
- - *Amazon Kinesis* – Default 100. Max 10,000.
5847
- - *Amazon DynamoDB Streams* – Default 100. Max 10,000.
5848
- - *Amazon Simple Queue Service* – Default 10. For standard queues the max is 10,000. For FIFO queues the max is 10.
5849
- - *Amazon Managed Streaming for Apache Kafka* – Default 100. Max 10,000.
5850
- - *Self-managed Apache Kafka* – Default 100. Max 10,000.
5851
- - *Amazon MQ (ActiveMQ and RabbitMQ)* – Default 100. Max 10,000.
5852
- - *DocumentDB* – Default 100. Max 10,000.
5868
+ '''The maximum number of items to retrieve in a single batch.
5853
5869
 
5854
5870
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-batchsize
5855
5871
  '''
@@ -5860,9 +5876,7 @@ class CfnEventSourceMappingProps:
5860
5876
  def bisect_batch_on_function_error(
5861
5877
  self,
5862
5878
  ) -> typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]]:
5863
- '''(Kinesis and DynamoDB Streams only) If the function returns an error, split the batch in two and retry.
5864
-
5865
- The default value is false.
5879
+ '''(Streams) If the function returns an error, split the batch in two and retry.
5866
5880
 
5867
5881
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-bisectbatchonfunctionerror
5868
5882
  '''
@@ -5873,7 +5887,7 @@ class CfnEventSourceMappingProps:
5873
5887
  def destination_config(
5874
5888
  self,
5875
5889
  ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, CfnEventSourceMapping.DestinationConfigProperty]]:
5876
- '''(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka event sources only) A configuration object that specifies the destination of an event after Lambda processes it.
5890
+ '''A configuration object that specifies the destination of an event after Lambda processes it.
5877
5891
 
5878
5892
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-destinationconfig
5879
5893
  '''
@@ -5884,7 +5898,7 @@ class CfnEventSourceMappingProps:
5884
5898
  def document_db_event_source_config(
5885
5899
  self,
5886
5900
  ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, CfnEventSourceMapping.DocumentDBEventSourceConfigProperty]]:
5887
- '''Specific configuration settings for a DocumentDB event source.
5901
+ '''Document db event source config.
5888
5902
 
5889
5903
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-documentdbeventsourceconfig
5890
5904
  '''
@@ -5895,9 +5909,7 @@ class CfnEventSourceMappingProps:
5895
5909
  def enabled(
5896
5910
  self,
5897
5911
  ) -> typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]]:
5898
- '''When true, the event source mapping is active. When false, Lambda pauses polling and invocation.
5899
-
5900
- Default: True
5912
+ '''Disables the event source mapping to pause polling and invocation.
5901
5913
 
5902
5914
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-enabled
5903
5915
  '''
@@ -5908,13 +5920,6 @@ class CfnEventSourceMappingProps:
5908
5920
  def event_source_arn(self) -> typing.Optional[builtins.str]:
5909
5921
  '''The Amazon Resource Name (ARN) of the event source.
5910
5922
 
5911
- - *Amazon Kinesis* – The ARN of the data stream or a stream consumer.
5912
- - *Amazon DynamoDB Streams* – The ARN of the stream.
5913
- - *Amazon Simple Queue Service* – The ARN of the queue.
5914
- - *Amazon Managed Streaming for Apache Kafka* – The ARN of the cluster or the ARN of the VPC connection (for `cross-account event source mappings <https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#msk-multi-vpc>`_ ).
5915
- - *Amazon MQ* – The ARN of the broker.
5916
- - *Amazon DocumentDB* – The ARN of the DocumentDB change stream.
5917
-
5918
5923
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-eventsourcearn
5919
5924
  '''
5920
5925
  result = self._values.get("event_source_arn")
@@ -5924,9 +5929,7 @@ class CfnEventSourceMappingProps:
5924
5929
  def filter_criteria(
5925
5930
  self,
5926
5931
  ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, CfnEventSourceMapping.FilterCriteriaProperty]]:
5927
- '''An object that defines the filter criteria that determine whether Lambda should process an event.
5928
-
5929
- For more information, see `Lambda event filtering <https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html>`_ .
5932
+ '''The filter criteria to control event filtering.
5930
5933
 
5931
5934
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-filtercriteria
5932
5935
  '''
@@ -5935,9 +5938,7 @@ class CfnEventSourceMappingProps:
5935
5938
 
5936
5939
  @builtins.property
5937
5940
  def function_response_types(self) -> typing.Optional[typing.List[builtins.str]]:
5938
- '''(Streams and SQS) A list of current response type enums applied to the event source mapping.
5939
-
5940
- Valid Values: ``ReportBatchItemFailures``
5941
+ '''(Streams) A list of response types supported by the function.
5941
5942
 
5942
5943
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-functionresponsetypes
5943
5944
  '''
@@ -5945,14 +5946,17 @@ class CfnEventSourceMappingProps:
5945
5946
  return typing.cast(typing.Optional[typing.List[builtins.str]], result)
5946
5947
 
5947
5948
  @builtins.property
5948
- def maximum_batching_window_in_seconds(self) -> typing.Optional[jsii.Number]:
5949
- '''The maximum amount of time, in seconds, that Lambda spends gathering records before invoking the function.
5950
-
5951
- *Default ( Kinesis , DynamoDB , Amazon SQS event sources)* : 0
5949
+ def kms_key_arn(self) -> typing.Optional[builtins.str]:
5950
+ '''The Amazon Resource Name (ARN) of the KMS key.
5952
5951
 
5953
- *Default ( Amazon MSK , Kafka, Amazon MQ , Amazon DocumentDB event sources)* : 500 ms
5952
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-kmskeyarn
5953
+ '''
5954
+ result = self._values.get("kms_key_arn")
5955
+ return typing.cast(typing.Optional[builtins.str], result)
5954
5956
 
5955
- *Related setting:* For Amazon SQS event sources, when you set ``BatchSize`` to a value greater than 10, you must set ``MaximumBatchingWindowInSeconds`` to at least 1.
5957
+ @builtins.property
5958
+ def maximum_batching_window_in_seconds(self) -> typing.Optional[jsii.Number]:
5959
+ '''(Streams) The maximum amount of time to gather records before invoking the function, in seconds.
5956
5960
 
5957
5961
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-maximumbatchingwindowinseconds
5958
5962
  '''
@@ -5961,13 +5965,7 @@ class CfnEventSourceMappingProps:
5961
5965
 
5962
5966
  @builtins.property
5963
5967
  def maximum_record_age_in_seconds(self) -> typing.Optional[jsii.Number]:
5964
- '''(Kinesis and DynamoDB Streams only) Discard records older than the specified age.
5965
-
5966
- The default value is -1,
5967
- which sets the maximum age to infinite. When the value is set to infinite, Lambda never discards old records.
5968
- .. epigraph::
5969
-
5970
- The minimum valid value for maximum record age is 60s. Although values less than 60 and greater than -1 fall within the parameter's absolute range, they are not allowed
5968
+ '''(Streams) The maximum age of a record that Lambda sends to a function for processing.
5971
5969
 
5972
5970
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-maximumrecordageinseconds
5973
5971
  '''
@@ -5976,10 +5974,7 @@ class CfnEventSourceMappingProps:
5976
5974
 
5977
5975
  @builtins.property
5978
5976
  def maximum_retry_attempts(self) -> typing.Optional[jsii.Number]:
5979
- '''(Kinesis and DynamoDB Streams only) Discard records after the specified number of retries.
5980
-
5981
- The default value is -1,
5982
- which sets the maximum number of retries to infinite. When MaximumRetryAttempts is infinite, Lambda retries failed records until the record expires in the event source.
5977
+ '''(Streams) The maximum number of times to retry when the function returns an error.
5983
5978
 
5984
5979
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-maximumretryattempts
5985
5980
  '''
@@ -5988,9 +5983,7 @@ class CfnEventSourceMappingProps:
5988
5983
 
5989
5984
  @builtins.property
5990
5985
  def parallelization_factor(self) -> typing.Optional[jsii.Number]:
5991
- '''(Kinesis and DynamoDB Streams only) The number of batches to process concurrently from each shard.
5992
-
5993
- The default value is 1.
5986
+ '''(Streams) The number of batches to process from each shard concurrently.
5994
5987
 
5995
5988
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-parallelizationfactor
5996
5989
  '''
@@ -5999,7 +5992,7 @@ class CfnEventSourceMappingProps:
5999
5992
 
6000
5993
  @builtins.property
6001
5994
  def queues(self) -> typing.Optional[typing.List[builtins.str]]:
6002
- '''(Amazon MQ) The name of the Amazon MQ broker destination queue to consume.
5995
+ '''(ActiveMQ) A list of ActiveMQ queues.
6003
5996
 
6004
5997
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-queues
6005
5998
  '''
@@ -6010,9 +6003,7 @@ class CfnEventSourceMappingProps:
6010
6003
  def scaling_config(
6011
6004
  self,
6012
6005
  ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, CfnEventSourceMapping.ScalingConfigProperty]]:
6013
- '''(Amazon SQS only) The scaling configuration for the event source.
6014
-
6015
- For more information, see `Configuring maximum concurrency for Amazon SQS event sources <https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-max-concurrency>`_ .
6006
+ '''The scaling configuration for the event source.
6016
6007
 
6017
6008
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-scalingconfig
6018
6009
  '''
@@ -6023,7 +6014,7 @@ class CfnEventSourceMappingProps:
6023
6014
  def self_managed_event_source(
6024
6015
  self,
6025
6016
  ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, CfnEventSourceMapping.SelfManagedEventSourceProperty]]:
6026
- '''The self-managed Apache Kafka cluster for your event source.
6017
+ '''The configuration used by AWS Lambda to access a self-managed event source.
6027
6018
 
6028
6019
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-selfmanagedeventsource
6029
6020
  '''
@@ -6034,7 +6025,7 @@ class CfnEventSourceMappingProps:
6034
6025
  def self_managed_kafka_event_source_config(
6035
6026
  self,
6036
6027
  ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, CfnEventSourceMapping.SelfManagedKafkaEventSourceConfigProperty]]:
6037
- '''Specific configuration settings for a self-managed Apache Kafka event source.
6028
+ '''Specific configuration settings for a Self-Managed Apache Kafka event source.
6038
6029
 
6039
6030
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-selfmanagedkafkaeventsourceconfig
6040
6031
  '''
@@ -6045,7 +6036,7 @@ class CfnEventSourceMappingProps:
6045
6036
  def source_access_configurations(
6046
6037
  self,
6047
6038
  ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, typing.List[typing.Union[_IResolvable_da3f097b, CfnEventSourceMapping.SourceAccessConfigurationProperty]]]]:
6048
- '''An array of the authentication protocol, VPC components, or virtual host to secure and define your event source.
6039
+ '''A list of SourceAccessConfiguration.
6049
6040
 
6050
6041
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-sourceaccessconfigurations
6051
6042
  '''
@@ -6054,11 +6045,9 @@ class CfnEventSourceMappingProps:
6054
6045
 
6055
6046
  @builtins.property
6056
6047
  def starting_position(self) -> typing.Optional[builtins.str]:
6057
- '''The position in a stream from which to start reading. Required for Amazon Kinesis and Amazon DynamoDB.
6048
+ '''The position in a stream from which to start reading.
6058
6049
 
6059
- - *LATEST* - Read only new records.
6060
- - *TRIM_HORIZON* - Process all available records.
6061
- - *AT_TIMESTAMP* - Specify a time from which to start reading records.
6050
+ Required for Amazon Kinesis and Amazon DynamoDB Streams sources.
6062
6051
 
6063
6052
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-startingposition
6064
6053
  '''
@@ -6067,9 +6056,7 @@ class CfnEventSourceMappingProps:
6067
6056
 
6068
6057
  @builtins.property
6069
6058
  def starting_position_timestamp(self) -> typing.Optional[jsii.Number]:
6070
- '''With ``StartingPosition`` set to ``AT_TIMESTAMP`` , the time from which to start reading, in Unix time seconds.
6071
-
6072
- ``StartingPositionTimestamp`` cannot be in the future.
6059
+ '''With StartingPosition set to AT_TIMESTAMP, the time from which to start reading, in Unix time seconds.
6073
6060
 
6074
6061
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-startingpositiontimestamp
6075
6062
  '''
@@ -6078,7 +6065,7 @@ class CfnEventSourceMappingProps:
6078
6065
 
6079
6066
  @builtins.property
6080
6067
  def topics(self) -> typing.Optional[typing.List[builtins.str]]:
6081
- '''The name of the Kafka topic.
6068
+ '''(Kafka) A list of Kafka topics.
6082
6069
 
6083
6070
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-topics
6084
6071
  '''
@@ -6087,9 +6074,7 @@ class CfnEventSourceMappingProps:
6087
6074
 
6088
6075
  @builtins.property
6089
6076
  def tumbling_window_in_seconds(self) -> typing.Optional[jsii.Number]:
6090
- '''(Kinesis and DynamoDB Streams only) The duration in seconds of a processing window for DynamoDB and Kinesis Streams event sources.
6091
-
6092
- A value of 0 seconds indicates no tumbling window.
6077
+ '''(Streams) Tumbling window (non-overlapping time window) duration to perform aggregations.
6093
6078
 
6094
6079
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-tumblingwindowinseconds
6095
6080
  '''
@@ -12584,6 +12569,7 @@ class EventInvokeConfigProps(EventInvokeConfigOptions):
12584
12569
  "bisect_batch_on_error": "bisectBatchOnError",
12585
12570
  "enabled": "enabled",
12586
12571
  "event_source_arn": "eventSourceArn",
12572
+ "filter_encryption": "filterEncryption",
12587
12573
  "filters": "filters",
12588
12574
  "kafka_bootstrap_servers": "kafkaBootstrapServers",
12589
12575
  "kafka_consumer_group_id": "kafkaConsumerGroupId",
@@ -12610,6 +12596,7 @@ class EventSourceMappingOptions:
12610
12596
  bisect_batch_on_error: typing.Optional[builtins.bool] = None,
12611
12597
  enabled: typing.Optional[builtins.bool] = None,
12612
12598
  event_source_arn: typing.Optional[builtins.str] = None,
12599
+ filter_encryption: typing.Optional[_IKey_5f11635f] = None,
12613
12600
  filters: typing.Optional[typing.Sequence[typing.Mapping[builtins.str, typing.Any]]] = None,
12614
12601
  kafka_bootstrap_servers: typing.Optional[typing.Sequence[builtins.str]] = None,
12615
12602
  kafka_consumer_group_id: typing.Optional[builtins.str] = None,
@@ -12632,6 +12619,7 @@ class EventSourceMappingOptions:
12632
12619
  :param bisect_batch_on_error: If the function returns an error, split the batch in two and retry. Default: false
12633
12620
  :param enabled: Set to false to disable the event source upon creation. Default: true
12634
12621
  :param event_source_arn: The Amazon Resource Name (ARN) of the event source. Any record added to this stream can invoke the Lambda function. Default: - not set if using a self managed Kafka cluster, throws an error otherwise
12622
+ :param filter_encryption: Add Customer managed KMS key to encrypt Filter Criteria. Default: - none
12635
12623
  :param filters: Add filter criteria to Event Source. Default: - none
12636
12624
  :param kafka_bootstrap_servers: A list of host and port pairs that are the addresses of the Kafka brokers in a self managed "bootstrap" Kafka cluster that a Kafka client connects to initially to bootstrap itself. They are in the format ``abc.example.com:9096``. Default: - none
12637
12625
  :param kafka_consumer_group_id: The identifier for the Kafka consumer group to join. The consumer group ID must be unique among all your Kafka event sources. After creating a Kafka event source mapping with the consumer group ID specified, you cannot update this value. The value must have a lenght between 1 and 200 and full the pattern '[a-zA-Z0-9-/*:_+=.@-]*'. For more information, see `Customizable consumer group ID <https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#services-msk-consumer-group-id>`_. Default: - none
@@ -12656,10 +12644,12 @@ class EventSourceMappingOptions:
12656
12644
  # The code below shows an example of how to instantiate this type.
12657
12645
  # The values are placeholders you should change.
12658
12646
  import aws_cdk as cdk
12647
+ from aws_cdk import aws_kms as kms
12659
12648
  from aws_cdk import aws_lambda as lambda_
12660
12649
 
12661
12650
  # event_source_dlq: lambda.IEventSourceDlq
12662
12651
  # filters: Any
12652
+ # key: kms.Key
12663
12653
  # source_access_configuration_type: lambda.SourceAccessConfigurationType
12664
12654
 
12665
12655
  event_source_mapping_options = lambda.EventSourceMappingOptions(
@@ -12667,6 +12657,7 @@ class EventSourceMappingOptions:
12667
12657
  bisect_batch_on_error=False,
12668
12658
  enabled=False,
12669
12659
  event_source_arn="eventSourceArn",
12660
+ filter_encryption=key,
12670
12661
  filters=[{
12671
12662
  "filters_key": filters
12672
12663
  }],
@@ -12696,6 +12687,7 @@ class EventSourceMappingOptions:
12696
12687
  check_type(argname="argument bisect_batch_on_error", value=bisect_batch_on_error, expected_type=type_hints["bisect_batch_on_error"])
12697
12688
  check_type(argname="argument enabled", value=enabled, expected_type=type_hints["enabled"])
12698
12689
  check_type(argname="argument event_source_arn", value=event_source_arn, expected_type=type_hints["event_source_arn"])
12690
+ check_type(argname="argument filter_encryption", value=filter_encryption, expected_type=type_hints["filter_encryption"])
12699
12691
  check_type(argname="argument filters", value=filters, expected_type=type_hints["filters"])
12700
12692
  check_type(argname="argument kafka_bootstrap_servers", value=kafka_bootstrap_servers, expected_type=type_hints["kafka_bootstrap_servers"])
12701
12693
  check_type(argname="argument kafka_consumer_group_id", value=kafka_consumer_group_id, expected_type=type_hints["kafka_consumer_group_id"])
@@ -12721,6 +12713,8 @@ class EventSourceMappingOptions:
12721
12713
  self._values["enabled"] = enabled
12722
12714
  if event_source_arn is not None:
12723
12715
  self._values["event_source_arn"] = event_source_arn
12716
+ if filter_encryption is not None:
12717
+ self._values["filter_encryption"] = filter_encryption
12724
12718
  if filters is not None:
12725
12719
  self._values["filters"] = filters
12726
12720
  if kafka_bootstrap_servers is not None:
@@ -12801,6 +12795,17 @@ class EventSourceMappingOptions:
12801
12795
  result = self._values.get("event_source_arn")
12802
12796
  return typing.cast(typing.Optional[builtins.str], result)
12803
12797
 
12798
+ @builtins.property
12799
+ def filter_encryption(self) -> typing.Optional[_IKey_5f11635f]:
12800
+ '''Add Customer managed KMS key to encrypt Filter Criteria.
12801
+
12802
+ :default: - none
12803
+
12804
+ :see: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
12805
+ '''
12806
+ result = self._values.get("filter_encryption")
12807
+ return typing.cast(typing.Optional[_IKey_5f11635f], result)
12808
+
12804
12809
  @builtins.property
12805
12810
  def filters(
12806
12811
  self,
@@ -13017,6 +13022,7 @@ class EventSourceMappingOptions:
13017
13022
  "bisect_batch_on_error": "bisectBatchOnError",
13018
13023
  "enabled": "enabled",
13019
13024
  "event_source_arn": "eventSourceArn",
13025
+ "filter_encryption": "filterEncryption",
13020
13026
  "filters": "filters",
13021
13027
  "kafka_bootstrap_servers": "kafkaBootstrapServers",
13022
13028
  "kafka_consumer_group_id": "kafkaConsumerGroupId",
@@ -13044,6 +13050,7 @@ class EventSourceMappingProps(EventSourceMappingOptions):
13044
13050
  bisect_batch_on_error: typing.Optional[builtins.bool] = None,
13045
13051
  enabled: typing.Optional[builtins.bool] = None,
13046
13052
  event_source_arn: typing.Optional[builtins.str] = None,
13053
+ filter_encryption: typing.Optional[_IKey_5f11635f] = None,
13047
13054
  filters: typing.Optional[typing.Sequence[typing.Mapping[builtins.str, typing.Any]]] = None,
13048
13055
  kafka_bootstrap_servers: typing.Optional[typing.Sequence[builtins.str]] = None,
13049
13056
  kafka_consumer_group_id: typing.Optional[builtins.str] = None,
@@ -13068,6 +13075,7 @@ class EventSourceMappingProps(EventSourceMappingOptions):
13068
13075
  :param bisect_batch_on_error: If the function returns an error, split the batch in two and retry. Default: false
13069
13076
  :param enabled: Set to false to disable the event source upon creation. Default: true
13070
13077
  :param event_source_arn: The Amazon Resource Name (ARN) of the event source. Any record added to this stream can invoke the Lambda function. Default: - not set if using a self managed Kafka cluster, throws an error otherwise
13078
+ :param filter_encryption: Add Customer managed KMS key to encrypt Filter Criteria. Default: - none
13071
13079
  :param filters: Add filter criteria to Event Source. Default: - none
13072
13080
  :param kafka_bootstrap_servers: A list of host and port pairs that are the addresses of the Kafka brokers in a self managed "bootstrap" Kafka cluster that a Kafka client connects to initially to bootstrap itself. They are in the format ``abc.example.com:9096``. Default: - none
13073
13081
  :param kafka_consumer_group_id: The identifier for the Kafka consumer group to join. The consumer group ID must be unique among all your Kafka event sources. After creating a Kafka event source mapping with the consumer group ID specified, you cannot update this value. The value must have a lenght between 1 and 200 and full the pattern '[a-zA-Z0-9-/*:_+=.@-]*'. For more information, see `Customizable consumer group ID <https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#services-msk-consumer-group-id>`_. Default: - none
@@ -13093,11 +13101,13 @@ class EventSourceMappingProps(EventSourceMappingOptions):
13093
13101
  # The code below shows an example of how to instantiate this type.
13094
13102
  # The values are placeholders you should change.
13095
13103
  import aws_cdk as cdk
13104
+ from aws_cdk import aws_kms as kms
13096
13105
  from aws_cdk import aws_lambda as lambda_
13097
13106
 
13098
13107
  # event_source_dlq: lambda.IEventSourceDlq
13099
13108
  # filters: Any
13100
13109
  # function_: lambda.Function
13110
+ # key: kms.Key
13101
13111
  # source_access_configuration_type: lambda.SourceAccessConfigurationType
13102
13112
 
13103
13113
  event_source_mapping_props = lambda.EventSourceMappingProps(
@@ -13108,6 +13118,7 @@ class EventSourceMappingProps(EventSourceMappingOptions):
13108
13118
  bisect_batch_on_error=False,
13109
13119
  enabled=False,
13110
13120
  event_source_arn="eventSourceArn",
13121
+ filter_encryption=key,
13111
13122
  filters=[{
13112
13123
  "filters_key": filters
13113
13124
  }],
@@ -13137,6 +13148,7 @@ class EventSourceMappingProps(EventSourceMappingOptions):
13137
13148
  check_type(argname="argument bisect_batch_on_error", value=bisect_batch_on_error, expected_type=type_hints["bisect_batch_on_error"])
13138
13149
  check_type(argname="argument enabled", value=enabled, expected_type=type_hints["enabled"])
13139
13150
  check_type(argname="argument event_source_arn", value=event_source_arn, expected_type=type_hints["event_source_arn"])
13151
+ check_type(argname="argument filter_encryption", value=filter_encryption, expected_type=type_hints["filter_encryption"])
13140
13152
  check_type(argname="argument filters", value=filters, expected_type=type_hints["filters"])
13141
13153
  check_type(argname="argument kafka_bootstrap_servers", value=kafka_bootstrap_servers, expected_type=type_hints["kafka_bootstrap_servers"])
13142
13154
  check_type(argname="argument kafka_consumer_group_id", value=kafka_consumer_group_id, expected_type=type_hints["kafka_consumer_group_id"])
@@ -13165,6 +13177,8 @@ class EventSourceMappingProps(EventSourceMappingOptions):
13165
13177
  self._values["enabled"] = enabled
13166
13178
  if event_source_arn is not None:
13167
13179
  self._values["event_source_arn"] = event_source_arn
13180
+ if filter_encryption is not None:
13181
+ self._values["filter_encryption"] = filter_encryption
13168
13182
  if filters is not None:
13169
13183
  self._values["filters"] = filters
13170
13184
  if kafka_bootstrap_servers is not None:
@@ -13245,6 +13259,17 @@ class EventSourceMappingProps(EventSourceMappingOptions):
13245
13259
  result = self._values.get("event_source_arn")
13246
13260
  return typing.cast(typing.Optional[builtins.str], result)
13247
13261
 
13262
+ @builtins.property
13263
+ def filter_encryption(self) -> typing.Optional[_IKey_5f11635f]:
13264
+ '''Add Customer managed KMS key to encrypt Filter Criteria.
13265
+
13266
+ :default: - none
13267
+
13268
+ :see: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
13269
+ '''
13270
+ result = self._values.get("filter_encryption")
13271
+ return typing.cast(typing.Optional[_IKey_5f11635f], result)
13272
+
13248
13273
  @builtins.property
13249
13274
  def filters(
13250
13275
  self,
@@ -16770,6 +16795,7 @@ class IFunction(
16770
16795
  bisect_batch_on_error: typing.Optional[builtins.bool] = None,
16771
16796
  enabled: typing.Optional[builtins.bool] = None,
16772
16797
  event_source_arn: typing.Optional[builtins.str] = None,
16798
+ filter_encryption: typing.Optional[_IKey_5f11635f] = None,
16773
16799
  filters: typing.Optional[typing.Sequence[typing.Mapping[builtins.str, typing.Any]]] = None,
16774
16800
  kafka_bootstrap_servers: typing.Optional[typing.Sequence[builtins.str]] = None,
16775
16801
  kafka_consumer_group_id: typing.Optional[builtins.str] = None,
@@ -16794,6 +16820,7 @@ class IFunction(
16794
16820
  :param bisect_batch_on_error: If the function returns an error, split the batch in two and retry. Default: false
16795
16821
  :param enabled: Set to false to disable the event source upon creation. Default: true
16796
16822
  :param event_source_arn: The Amazon Resource Name (ARN) of the event source. Any record added to this stream can invoke the Lambda function. Default: - not set if using a self managed Kafka cluster, throws an error otherwise
16823
+ :param filter_encryption: Add Customer managed KMS key to encrypt Filter Criteria. Default: - none
16797
16824
  :param filters: Add filter criteria to Event Source. Default: - none
16798
16825
  :param kafka_bootstrap_servers: A list of host and port pairs that are the addresses of the Kafka brokers in a self managed "bootstrap" Kafka cluster that a Kafka client connects to initially to bootstrap itself. They are in the format ``abc.example.com:9096``. Default: - none
16799
16826
  :param kafka_consumer_group_id: The identifier for the Kafka consumer group to join. The consumer group ID must be unique among all your Kafka event sources. After creating a Kafka event source mapping with the consumer group ID specified, you cannot update this value. The value must have a lenght between 1 and 200 and full the pattern '[a-zA-Z0-9-/*:_+=.@-]*'. For more information, see `Customizable consumer group ID <https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#services-msk-consumer-group-id>`_. Default: - none
@@ -17186,6 +17213,7 @@ class _IFunctionProxy(
17186
17213
  bisect_batch_on_error: typing.Optional[builtins.bool] = None,
17187
17214
  enabled: typing.Optional[builtins.bool] = None,
17188
17215
  event_source_arn: typing.Optional[builtins.str] = None,
17216
+ filter_encryption: typing.Optional[_IKey_5f11635f] = None,
17189
17217
  filters: typing.Optional[typing.Sequence[typing.Mapping[builtins.str, typing.Any]]] = None,
17190
17218
  kafka_bootstrap_servers: typing.Optional[typing.Sequence[builtins.str]] = None,
17191
17219
  kafka_consumer_group_id: typing.Optional[builtins.str] = None,
@@ -17210,6 +17238,7 @@ class _IFunctionProxy(
17210
17238
  :param bisect_batch_on_error: If the function returns an error, split the batch in two and retry. Default: false
17211
17239
  :param enabled: Set to false to disable the event source upon creation. Default: true
17212
17240
  :param event_source_arn: The Amazon Resource Name (ARN) of the event source. Any record added to this stream can invoke the Lambda function. Default: - not set if using a self managed Kafka cluster, throws an error otherwise
17241
+ :param filter_encryption: Add Customer managed KMS key to encrypt Filter Criteria. Default: - none
17213
17242
  :param filters: Add filter criteria to Event Source. Default: - none
17214
17243
  :param kafka_bootstrap_servers: A list of host and port pairs that are the addresses of the Kafka brokers in a self managed "bootstrap" Kafka cluster that a Kafka client connects to initially to bootstrap itself. They are in the format ``abc.example.com:9096``. Default: - none
17215
17244
  :param kafka_consumer_group_id: The identifier for the Kafka consumer group to join. The consumer group ID must be unique among all your Kafka event sources. After creating a Kafka event source mapping with the consumer group ID specified, you cannot update this value. The value must have a lenght between 1 and 200 and full the pattern '[a-zA-Z0-9-/*:_+=.@-]*'. For more information, see `Customizable consumer group ID <https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#services-msk-consumer-group-id>`_. Default: - none
@@ -17235,6 +17264,7 @@ class _IFunctionProxy(
17235
17264
  bisect_batch_on_error=bisect_batch_on_error,
17236
17265
  enabled=enabled,
17237
17266
  event_source_arn=event_source_arn,
17267
+ filter_encryption=filter_encryption,
17238
17268
  filters=filters,
17239
17269
  kafka_bootstrap_servers=kafka_bootstrap_servers,
17240
17270
  kafka_consumer_group_id=kafka_consumer_group_id,
@@ -21612,8 +21642,8 @@ class StartingPosition(enum.Enum):
21612
21642
 
21613
21643
  Example::
21614
21644
 
21615
- from aws_cdk.aws_secretsmanager import Secret
21616
21645
  from aws_cdk.aws_lambda_event_sources import ManagedKafkaEventSource
21646
+ from aws_cdk.aws_kms import Key
21617
21647
 
21618
21648
  # my_function: lambda.Function
21619
21649
 
@@ -21624,15 +21654,18 @@ class StartingPosition(enum.Enum):
21624
21654
  # The Kafka topic you want to subscribe to
21625
21655
  topic = "some-cool-topic"
21626
21656
 
21627
- # The secret that allows access to your MSK cluster
21628
- # You still have to make sure that it is associated with your cluster as described in the documentation
21629
- secret = Secret(self, "Secret", secret_name="AmazonMSK_KafkaSecret")
21657
+ # Your self managed KMS key
21658
+ my_key = Key.from_key_arn(self, "SourceBucketEncryptionKey", "arn:aws:kms:us-east-1:123456789012:key/<key-id>")
21630
21659
  my_function.add_event_source(ManagedKafkaEventSource(
21631
21660
  cluster_arn=cluster_arn,
21632
21661
  topic=topic,
21633
- secret=secret,
21634
- batch_size=100, # default
21635
- starting_position=lambda_.StartingPosition.TRIM_HORIZON
21662
+ starting_position=lambda_.StartingPosition.TRIM_HORIZON,
21663
+ filters=[
21664
+ lambda_.FilterCriteria.filter({
21665
+ "string_equals": lambda_.FilterRule.is_equal("test")
21666
+ })
21667
+ ],
21668
+ filter_encryption=my_key
21636
21669
  ))
21637
21670
  '''
21638
21671
 
@@ -24280,11 +24313,13 @@ class EventSourceMapping(
24280
24313
  # The code below shows an example of how to instantiate this type.
24281
24314
  # The values are placeholders you should change.
24282
24315
  import aws_cdk as cdk
24316
+ from aws_cdk import aws_kms as kms
24283
24317
  from aws_cdk import aws_lambda as lambda_
24284
24318
 
24285
24319
  # event_source_dlq: lambda.IEventSourceDlq
24286
24320
  # filters: Any
24287
24321
  # function_: lambda.Function
24322
+ # key: kms.Key
24288
24323
  # source_access_configuration_type: lambda.SourceAccessConfigurationType
24289
24324
 
24290
24325
  event_source_mapping = lambda_.EventSourceMapping(self, "MyEventSourceMapping",
@@ -24295,6 +24330,7 @@ class EventSourceMapping(
24295
24330
  bisect_batch_on_error=False,
24296
24331
  enabled=False,
24297
24332
  event_source_arn="eventSourceArn",
24333
+ filter_encryption=key,
24298
24334
  filters=[{
24299
24335
  "filters_key": filters
24300
24336
  }],
@@ -24329,6 +24365,7 @@ class EventSourceMapping(
24329
24365
  bisect_batch_on_error: typing.Optional[builtins.bool] = None,
24330
24366
  enabled: typing.Optional[builtins.bool] = None,
24331
24367
  event_source_arn: typing.Optional[builtins.str] = None,
24368
+ filter_encryption: typing.Optional[_IKey_5f11635f] = None,
24332
24369
  filters: typing.Optional[typing.Sequence[typing.Mapping[builtins.str, typing.Any]]] = None,
24333
24370
  kafka_bootstrap_servers: typing.Optional[typing.Sequence[builtins.str]] = None,
24334
24371
  kafka_consumer_group_id: typing.Optional[builtins.str] = None,
@@ -24354,6 +24391,7 @@ class EventSourceMapping(
24354
24391
  :param bisect_batch_on_error: If the function returns an error, split the batch in two and retry. Default: false
24355
24392
  :param enabled: Set to false to disable the event source upon creation. Default: true
24356
24393
  :param event_source_arn: The Amazon Resource Name (ARN) of the event source. Any record added to this stream can invoke the Lambda function. Default: - not set if using a self managed Kafka cluster, throws an error otherwise
24394
+ :param filter_encryption: Add Customer managed KMS key to encrypt Filter Criteria. Default: - none
24357
24395
  :param filters: Add filter criteria to Event Source. Default: - none
24358
24396
  :param kafka_bootstrap_servers: A list of host and port pairs that are the addresses of the Kafka brokers in a self managed "bootstrap" Kafka cluster that a Kafka client connects to initially to bootstrap itself. They are in the format ``abc.example.com:9096``. Default: - none
24359
24397
  :param kafka_consumer_group_id: The identifier for the Kafka consumer group to join. The consumer group ID must be unique among all your Kafka event sources. After creating a Kafka event source mapping with the consumer group ID specified, you cannot update this value. The value must have a lenght between 1 and 200 and full the pattern '[a-zA-Z0-9-/*:_+=.@-]*'. For more information, see `Customizable consumer group ID <https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#services-msk-consumer-group-id>`_. Default: - none
@@ -24381,6 +24419,7 @@ class EventSourceMapping(
24381
24419
  bisect_batch_on_error=bisect_batch_on_error,
24382
24420
  enabled=enabled,
24383
24421
  event_source_arn=event_source_arn,
24422
+ filter_encryption=filter_encryption,
24384
24423
  filters=filters,
24385
24424
  kafka_bootstrap_servers=kafka_bootstrap_servers,
24386
24425
  kafka_consumer_group_id=kafka_consumer_group_id,
@@ -24499,6 +24538,7 @@ class FunctionBase(
24499
24538
  bisect_batch_on_error: typing.Optional[builtins.bool] = None,
24500
24539
  enabled: typing.Optional[builtins.bool] = None,
24501
24540
  event_source_arn: typing.Optional[builtins.str] = None,
24541
+ filter_encryption: typing.Optional[_IKey_5f11635f] = None,
24502
24542
  filters: typing.Optional[typing.Sequence[typing.Mapping[builtins.str, typing.Any]]] = None,
24503
24543
  kafka_bootstrap_servers: typing.Optional[typing.Sequence[builtins.str]] = None,
24504
24544
  kafka_consumer_group_id: typing.Optional[builtins.str] = None,
@@ -24523,6 +24563,7 @@ class FunctionBase(
24523
24563
  :param bisect_batch_on_error: If the function returns an error, split the batch in two and retry. Default: false
24524
24564
  :param enabled: Set to false to disable the event source upon creation. Default: true
24525
24565
  :param event_source_arn: The Amazon Resource Name (ARN) of the event source. Any record added to this stream can invoke the Lambda function. Default: - not set if using a self managed Kafka cluster, throws an error otherwise
24566
+ :param filter_encryption: Add Customer managed KMS key to encrypt Filter Criteria. Default: - none
24526
24567
  :param filters: Add filter criteria to Event Source. Default: - none
24527
24568
  :param kafka_bootstrap_servers: A list of host and port pairs that are the addresses of the Kafka brokers in a self managed "bootstrap" Kafka cluster that a Kafka client connects to initially to bootstrap itself. They are in the format ``abc.example.com:9096``. Default: - none
24528
24569
  :param kafka_consumer_group_id: The identifier for the Kafka consumer group to join. The consumer group ID must be unique among all your Kafka event sources. After creating a Kafka event source mapping with the consumer group ID specified, you cannot update this value. The value must have a lenght between 1 and 200 and full the pattern '[a-zA-Z0-9-/*:_+=.@-]*'. For more information, see `Customizable consumer group ID <https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#services-msk-consumer-group-id>`_. Default: - none
@@ -24548,6 +24589,7 @@ class FunctionBase(
24548
24589
  bisect_batch_on_error=bisect_batch_on_error,
24549
24590
  enabled=enabled,
24550
24591
  event_source_arn=event_source_arn,
24592
+ filter_encryption=filter_encryption,
24551
24593
  filters=filters,
24552
24594
  kafka_bootstrap_servers=kafka_bootstrap_servers,
24553
24595
  kafka_consumer_group_id=kafka_consumer_group_id,
@@ -27861,6 +27903,7 @@ def _typecheckingstub__2fc9432254acf5a7dbe3c68dcedbda61de1f0e804a81d20ae79e04857
27861
27903
  event_source_arn: typing.Optional[builtins.str] = None,
27862
27904
  filter_criteria: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union[CfnEventSourceMapping.FilterCriteriaProperty, typing.Dict[builtins.str, typing.Any]]]] = None,
27863
27905
  function_response_types: typing.Optional[typing.Sequence[builtins.str]] = None,
27906
+ kms_key_arn: typing.Optional[builtins.str] = None,
27864
27907
  maximum_batching_window_in_seconds: typing.Optional[jsii.Number] = None,
27865
27908
  maximum_record_age_in_seconds: typing.Optional[jsii.Number] = None,
27866
27909
  maximum_retry_attempts: typing.Optional[jsii.Number] = None,
@@ -27950,6 +27993,12 @@ def _typecheckingstub__d464545d76bb56469faf58591d3fb0044c464a1cdb5b122bf47e0b3ea
27950
27993
  """Type checking stubs"""
27951
27994
  pass
27952
27995
 
27996
+ def _typecheckingstub__5110117b05ec57a413615f5bf30afd8bbafb2be839685cf0e158a1b4de420fbc(
27997
+ value: typing.Optional[builtins.str],
27998
+ ) -> None:
27999
+ """Type checking stubs"""
28000
+ pass
28001
+
27953
28002
  def _typecheckingstub__e0ab317a438123c62fee46e89709c7bb879475c514910f3928a4fa4a397f556a(
27954
28003
  value: typing.Optional[jsii.Number],
27955
28004
  ) -> None:
@@ -28120,6 +28169,7 @@ def _typecheckingstub__28f15573fb2525439f034f01287568e3c4a4d28fda953b3059f294655
28120
28169
  event_source_arn: typing.Optional[builtins.str] = None,
28121
28170
  filter_criteria: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union[CfnEventSourceMapping.FilterCriteriaProperty, typing.Dict[builtins.str, typing.Any]]]] = None,
28122
28171
  function_response_types: typing.Optional[typing.Sequence[builtins.str]] = None,
28172
+ kms_key_arn: typing.Optional[builtins.str] = None,
28123
28173
  maximum_batching_window_in_seconds: typing.Optional[jsii.Number] = None,
28124
28174
  maximum_record_age_in_seconds: typing.Optional[jsii.Number] = None,
28125
28175
  maximum_retry_attempts: typing.Optional[jsii.Number] = None,
@@ -29178,6 +29228,7 @@ def _typecheckingstub__7442d2bd60e56a826eab54e95fa6a6ebc8961285a26558c7189840a12
29178
29228
  bisect_batch_on_error: typing.Optional[builtins.bool] = None,
29179
29229
  enabled: typing.Optional[builtins.bool] = None,
29180
29230
  event_source_arn: typing.Optional[builtins.str] = None,
29231
+ filter_encryption: typing.Optional[_IKey_5f11635f] = None,
29181
29232
  filters: typing.Optional[typing.Sequence[typing.Mapping[builtins.str, typing.Any]]] = None,
29182
29233
  kafka_bootstrap_servers: typing.Optional[typing.Sequence[builtins.str]] = None,
29183
29234
  kafka_consumer_group_id: typing.Optional[builtins.str] = None,
@@ -29204,6 +29255,7 @@ def _typecheckingstub__e74d0bc5516fc715f7302bdf199df23dddf769e98771f0bac2ff026a4
29204
29255
  bisect_batch_on_error: typing.Optional[builtins.bool] = None,
29205
29256
  enabled: typing.Optional[builtins.bool] = None,
29206
29257
  event_source_arn: typing.Optional[builtins.str] = None,
29258
+ filter_encryption: typing.Optional[_IKey_5f11635f] = None,
29207
29259
  filters: typing.Optional[typing.Sequence[typing.Mapping[builtins.str, typing.Any]]] = None,
29208
29260
  kafka_bootstrap_servers: typing.Optional[typing.Sequence[builtins.str]] = None,
29209
29261
  kafka_consumer_group_id: typing.Optional[builtins.str] = None,
@@ -29480,6 +29532,7 @@ def _typecheckingstub__726375d512fd3c0da30be8d20d1c4016974ba77359e6bac8eb3569126
29480
29532
  bisect_batch_on_error: typing.Optional[builtins.bool] = None,
29481
29533
  enabled: typing.Optional[builtins.bool] = None,
29482
29534
  event_source_arn: typing.Optional[builtins.str] = None,
29535
+ filter_encryption: typing.Optional[_IKey_5f11635f] = None,
29483
29536
  filters: typing.Optional[typing.Sequence[typing.Mapping[builtins.str, typing.Any]]] = None,
29484
29537
  kafka_bootstrap_servers: typing.Optional[typing.Sequence[builtins.str]] = None,
29485
29538
  kafka_consumer_group_id: typing.Optional[builtins.str] = None,
@@ -30155,6 +30208,7 @@ def _typecheckingstub__b0460bc5250777612d2b42ec799737ce019fcdc03fe86c6540ab2ecec
30155
30208
  bisect_batch_on_error: typing.Optional[builtins.bool] = None,
30156
30209
  enabled: typing.Optional[builtins.bool] = None,
30157
30210
  event_source_arn: typing.Optional[builtins.str] = None,
30211
+ filter_encryption: typing.Optional[_IKey_5f11635f] = None,
30158
30212
  filters: typing.Optional[typing.Sequence[typing.Mapping[builtins.str, typing.Any]]] = None,
30159
30213
  kafka_bootstrap_servers: typing.Optional[typing.Sequence[builtins.str]] = None,
30160
30214
  kafka_consumer_group_id: typing.Optional[builtins.str] = None,
@@ -30208,6 +30262,7 @@ def _typecheckingstub__bfc312bd9bc4e64c5ae8419715155a56676bb9fe40870f57ffa4f3030
30208
30262
  bisect_batch_on_error: typing.Optional[builtins.bool] = None,
30209
30263
  enabled: typing.Optional[builtins.bool] = None,
30210
30264
  event_source_arn: typing.Optional[builtins.str] = None,
30265
+ filter_encryption: typing.Optional[_IKey_5f11635f] = None,
30211
30266
  filters: typing.Optional[typing.Sequence[typing.Mapping[builtins.str, typing.Any]]] = None,
30212
30267
  kafka_bootstrap_servers: typing.Optional[typing.Sequence[builtins.str]] = None,
30213
30268
  kafka_consumer_group_id: typing.Optional[builtins.str] = None,