aws-cdk-lib 2.151.1__py3-none-any.whl → 2.153.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.

@@ -324,6 +324,36 @@ my_function.add_event_source(ManagedKafkaEventSource(
324
324
  ))
325
325
  ```
326
326
 
327
+ 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.
328
+
329
+ ```python
330
+ from aws_cdk.aws_lambda_event_sources import ManagedKafkaEventSource
331
+ from aws_cdk.aws_kms import Key
332
+
333
+ # my_function: lambda.Function
334
+
335
+
336
+ # Your MSK cluster arn
337
+ cluster_arn = "arn:aws:kafka:us-east-1:0123456789019:cluster/SalesCluster/abcd1234-abcd-cafe-abab-9876543210ab-4"
338
+
339
+ # The Kafka topic you want to subscribe to
340
+ topic = "some-cool-topic"
341
+
342
+ # Your self managed KMS key
343
+ my_key = Key.from_key_arn(self, "SourceBucketEncryptionKey", "arn:aws:kms:us-east-1:123456789012:key/<key-id>")
344
+ my_function.add_event_source(ManagedKafkaEventSource(
345
+ cluster_arn=cluster_arn,
346
+ topic=topic,
347
+ starting_position=lambda_.StartingPosition.TRIM_HORIZON,
348
+ filters=[
349
+ lambda_.FilterCriteria.filter({
350
+ "string_equals": lambda_.FilterRule.is_equal("test")
351
+ })
352
+ ],
353
+ filter_encryption=my_key
354
+ ))
355
+ ```
356
+
327
357
  You can also specify an S3 bucket as an "on failure" destination:
328
358
 
329
359
  ```python
@@ -391,6 +421,7 @@ from ..aws_ec2 import (
391
421
  SubnetSelection as _SubnetSelection_e57d76df,
392
422
  )
393
423
  from ..aws_kinesis import IStream as _IStream_4e2457d2
424
+ from ..aws_kms import IKey as _IKey_5f11635f
394
425
  from ..aws_lambda import (
395
426
  DlqDestinationConfig as _DlqDestinationConfig_5fe54cfa,
396
427
  EventSourceMappingOptions as _EventSourceMappingOptions_b3f2bb85,
@@ -677,6 +708,7 @@ class BaseStreamEventSourceProps:
677
708
  "max_batching_window": "maxBatchingWindow",
678
709
  "topic": "topic",
679
710
  "consumer_group_id": "consumerGroupId",
711
+ "filter_encryption": "filterEncryption",
680
712
  "filters": "filters",
681
713
  "on_failure": "onFailure",
682
714
  "secret": "secret",
@@ -692,6 +724,7 @@ class KafkaEventSourceProps(BaseStreamEventSourceProps):
692
724
  max_batching_window: typing.Optional[_Duration_4839e8c3] = None,
693
725
  topic: builtins.str,
694
726
  consumer_group_id: typing.Optional[builtins.str] = None,
727
+ filter_encryption: typing.Optional[_IKey_5f11635f] = None,
695
728
  filters: typing.Optional[typing.Sequence[typing.Mapping[builtins.str, typing.Any]]] = None,
696
729
  on_failure: typing.Optional[_IEventSourceDlq_5e2c6ad9] = None,
697
730
  secret: typing.Optional[_ISecret_6e020e6a] = None,
@@ -704,6 +737,7 @@ class KafkaEventSourceProps(BaseStreamEventSourceProps):
704
737
  :param max_batching_window: The maximum amount of time to gather records before invoking the function. Maximum of Duration.minutes(5). Default: - Duration.seconds(0) for Kinesis, DynamoDB, and SQS event sources, Duration.millis(500) for MSK, self-managed Kafka, and Amazon MQ.
705
738
  :param topic: The Kafka topic to subscribe to.
706
739
  :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. The value must have a lenght between 1 and 200 and full the pattern '[a-zA-Z0-9-/*:_+=.@-]*'. Default: - none
740
+ :param filter_encryption: Add Customer managed KMS key to encrypt Filter Criteria. Default: - none
707
741
  :param filters: Add filter criteria to Event Source. Default: - none
708
742
  :param on_failure: Add an on Failure Destination for this Kafka event. SNS/SQS/S3 are supported Default: - discarded records are ignored
709
743
  :param secret: The secret with the Kafka credentials, see https://docs.aws.amazon.com/msk/latest/developerguide/msk-password.html for details This field is required if your Kafka brokers are accessed over the Internet. Default: none
@@ -715,12 +749,14 @@ class KafkaEventSourceProps(BaseStreamEventSourceProps):
715
749
  # The code below shows an example of how to instantiate this type.
716
750
  # The values are placeholders you should change.
717
751
  import aws_cdk as cdk
752
+ from aws_cdk import aws_kms as kms
718
753
  from aws_cdk import aws_lambda as lambda_
719
754
  from aws_cdk import aws_lambda_event_sources as lambda_event_sources
720
755
  from aws_cdk import aws_secretsmanager as secretsmanager
721
756
 
722
757
  # event_source_dlq: lambda.IEventSourceDlq
723
758
  # filters: Any
759
+ # key: kms.Key
724
760
  # secret: secretsmanager.Secret
725
761
 
726
762
  kafka_event_source_props = lambda_event_sources.KafkaEventSourceProps(
@@ -731,6 +767,7 @@ class KafkaEventSourceProps(BaseStreamEventSourceProps):
731
767
  batch_size=123,
732
768
  consumer_group_id="consumerGroupId",
733
769
  enabled=False,
770
+ filter_encryption=key,
734
771
  filters=[{
735
772
  "filters_key": filters
736
773
  }],
@@ -747,6 +784,7 @@ class KafkaEventSourceProps(BaseStreamEventSourceProps):
747
784
  check_type(argname="argument max_batching_window", value=max_batching_window, expected_type=type_hints["max_batching_window"])
748
785
  check_type(argname="argument topic", value=topic, expected_type=type_hints["topic"])
749
786
  check_type(argname="argument consumer_group_id", value=consumer_group_id, expected_type=type_hints["consumer_group_id"])
787
+ check_type(argname="argument filter_encryption", value=filter_encryption, expected_type=type_hints["filter_encryption"])
750
788
  check_type(argname="argument filters", value=filters, expected_type=type_hints["filters"])
751
789
  check_type(argname="argument on_failure", value=on_failure, expected_type=type_hints["on_failure"])
752
790
  check_type(argname="argument secret", value=secret, expected_type=type_hints["secret"])
@@ -762,6 +800,8 @@ class KafkaEventSourceProps(BaseStreamEventSourceProps):
762
800
  self._values["max_batching_window"] = max_batching_window
763
801
  if consumer_group_id is not None:
764
802
  self._values["consumer_group_id"] = consumer_group_id
803
+ if filter_encryption is not None:
804
+ self._values["filter_encryption"] = filter_encryption
765
805
  if filters is not None:
766
806
  self._values["filters"] = filters
767
807
  if on_failure is not None:
@@ -838,6 +878,17 @@ class KafkaEventSourceProps(BaseStreamEventSourceProps):
838
878
  result = self._values.get("consumer_group_id")
839
879
  return typing.cast(typing.Optional[builtins.str], result)
840
880
 
881
+ @builtins.property
882
+ def filter_encryption(self) -> typing.Optional[_IKey_5f11635f]:
883
+ '''Add Customer managed KMS key to encrypt Filter Criteria.
884
+
885
+ :default: - none
886
+
887
+ :see: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
888
+ '''
889
+ result = self._values.get("filter_encryption")
890
+ return typing.cast(typing.Optional[_IKey_5f11635f], result)
891
+
841
892
  @builtins.property
842
893
  def filters(
843
894
  self,
@@ -893,6 +944,7 @@ class KafkaEventSourceProps(BaseStreamEventSourceProps):
893
944
  "max_batching_window": "maxBatchingWindow",
894
945
  "topic": "topic",
895
946
  "consumer_group_id": "consumerGroupId",
947
+ "filter_encryption": "filterEncryption",
896
948
  "filters": "filters",
897
949
  "on_failure": "onFailure",
898
950
  "secret": "secret",
@@ -909,6 +961,7 @@ class ManagedKafkaEventSourceProps(KafkaEventSourceProps):
909
961
  max_batching_window: typing.Optional[_Duration_4839e8c3] = None,
910
962
  topic: builtins.str,
911
963
  consumer_group_id: typing.Optional[builtins.str] = None,
964
+ filter_encryption: typing.Optional[_IKey_5f11635f] = None,
912
965
  filters: typing.Optional[typing.Sequence[typing.Mapping[builtins.str, typing.Any]]] = None,
913
966
  on_failure: typing.Optional[_IEventSourceDlq_5e2c6ad9] = None,
914
967
  secret: typing.Optional[_ISecret_6e020e6a] = None,
@@ -922,6 +975,7 @@ class ManagedKafkaEventSourceProps(KafkaEventSourceProps):
922
975
  :param max_batching_window: The maximum amount of time to gather records before invoking the function. Maximum of Duration.minutes(5). Default: - Duration.seconds(0) for Kinesis, DynamoDB, and SQS event sources, Duration.millis(500) for MSK, self-managed Kafka, and Amazon MQ.
923
976
  :param topic: The Kafka topic to subscribe to.
924
977
  :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. The value must have a lenght between 1 and 200 and full the pattern '[a-zA-Z0-9-/*:_+=.@-]*'. Default: - none
978
+ :param filter_encryption: Add Customer managed KMS key to encrypt Filter Criteria. Default: - none
925
979
  :param filters: Add filter criteria to Event Source. Default: - none
926
980
  :param on_failure: Add an on Failure Destination for this Kafka event. SNS/SQS/S3 are supported Default: - discarded records are ignored
927
981
  :param secret: The secret with the Kafka credentials, see https://docs.aws.amazon.com/msk/latest/developerguide/msk-password.html for details This field is required if your Kafka brokers are accessed over the Internet. Default: none
@@ -962,6 +1016,7 @@ class ManagedKafkaEventSourceProps(KafkaEventSourceProps):
962
1016
  check_type(argname="argument max_batching_window", value=max_batching_window, expected_type=type_hints["max_batching_window"])
963
1017
  check_type(argname="argument topic", value=topic, expected_type=type_hints["topic"])
964
1018
  check_type(argname="argument consumer_group_id", value=consumer_group_id, expected_type=type_hints["consumer_group_id"])
1019
+ check_type(argname="argument filter_encryption", value=filter_encryption, expected_type=type_hints["filter_encryption"])
965
1020
  check_type(argname="argument filters", value=filters, expected_type=type_hints["filters"])
966
1021
  check_type(argname="argument on_failure", value=on_failure, expected_type=type_hints["on_failure"])
967
1022
  check_type(argname="argument secret", value=secret, expected_type=type_hints["secret"])
@@ -979,6 +1034,8 @@ class ManagedKafkaEventSourceProps(KafkaEventSourceProps):
979
1034
  self._values["max_batching_window"] = max_batching_window
980
1035
  if consumer_group_id is not None:
981
1036
  self._values["consumer_group_id"] = consumer_group_id
1037
+ if filter_encryption is not None:
1038
+ self._values["filter_encryption"] = filter_encryption
982
1039
  if filters is not None:
983
1040
  self._values["filters"] = filters
984
1041
  if on_failure is not None:
@@ -1055,6 +1112,17 @@ class ManagedKafkaEventSourceProps(KafkaEventSourceProps):
1055
1112
  result = self._values.get("consumer_group_id")
1056
1113
  return typing.cast(typing.Optional[builtins.str], result)
1057
1114
 
1115
+ @builtins.property
1116
+ def filter_encryption(self) -> typing.Optional[_IKey_5f11635f]:
1117
+ '''Add Customer managed KMS key to encrypt Filter Criteria.
1118
+
1119
+ :default: - none
1120
+
1121
+ :see: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
1122
+ '''
1123
+ result = self._values.get("filter_encryption")
1124
+ return typing.cast(typing.Optional[_IKey_5f11635f], result)
1125
+
1058
1126
  @builtins.property
1059
1127
  def filters(
1060
1128
  self,
@@ -1364,6 +1432,7 @@ class S3OnFailureDestination(
1364
1432
  "max_batching_window": "maxBatchingWindow",
1365
1433
  "topic": "topic",
1366
1434
  "consumer_group_id": "consumerGroupId",
1435
+ "filter_encryption": "filterEncryption",
1367
1436
  "filters": "filters",
1368
1437
  "on_failure": "onFailure",
1369
1438
  "secret": "secret",
@@ -1385,6 +1454,7 @@ class SelfManagedKafkaEventSourceProps(KafkaEventSourceProps):
1385
1454
  max_batching_window: typing.Optional[_Duration_4839e8c3] = None,
1386
1455
  topic: builtins.str,
1387
1456
  consumer_group_id: typing.Optional[builtins.str] = None,
1457
+ filter_encryption: typing.Optional[_IKey_5f11635f] = None,
1388
1458
  filters: typing.Optional[typing.Sequence[typing.Mapping[builtins.str, typing.Any]]] = None,
1389
1459
  on_failure: typing.Optional[_IEventSourceDlq_5e2c6ad9] = None,
1390
1460
  secret: typing.Optional[_ISecret_6e020e6a] = None,
@@ -1405,6 +1475,7 @@ class SelfManagedKafkaEventSourceProps(KafkaEventSourceProps):
1405
1475
  :param max_batching_window: The maximum amount of time to gather records before invoking the function. Maximum of Duration.minutes(5). Default: - Duration.seconds(0) for Kinesis, DynamoDB, and SQS event sources, Duration.millis(500) for MSK, self-managed Kafka, and Amazon MQ.
1406
1476
  :param topic: The Kafka topic to subscribe to.
1407
1477
  :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. The value must have a lenght between 1 and 200 and full the pattern '[a-zA-Z0-9-/*:_+=.@-]*'. Default: - none
1478
+ :param filter_encryption: Add Customer managed KMS key to encrypt Filter Criteria. Default: - none
1408
1479
  :param filters: Add filter criteria to Event Source. Default: - none
1409
1480
  :param on_failure: Add an on Failure Destination for this Kafka event. SNS/SQS/S3 are supported Default: - discarded records are ignored
1410
1481
  :param secret: The secret with the Kafka credentials, see https://docs.aws.amazon.com/msk/latest/developerguide/msk-password.html for details This field is required if your Kafka brokers are accessed over the Internet. Default: none
@@ -1455,6 +1526,7 @@ class SelfManagedKafkaEventSourceProps(KafkaEventSourceProps):
1455
1526
  check_type(argname="argument max_batching_window", value=max_batching_window, expected_type=type_hints["max_batching_window"])
1456
1527
  check_type(argname="argument topic", value=topic, expected_type=type_hints["topic"])
1457
1528
  check_type(argname="argument consumer_group_id", value=consumer_group_id, expected_type=type_hints["consumer_group_id"])
1529
+ check_type(argname="argument filter_encryption", value=filter_encryption, expected_type=type_hints["filter_encryption"])
1458
1530
  check_type(argname="argument filters", value=filters, expected_type=type_hints["filters"])
1459
1531
  check_type(argname="argument on_failure", value=on_failure, expected_type=type_hints["on_failure"])
1460
1532
  check_type(argname="argument secret", value=secret, expected_type=type_hints["secret"])
@@ -1477,6 +1549,8 @@ class SelfManagedKafkaEventSourceProps(KafkaEventSourceProps):
1477
1549
  self._values["max_batching_window"] = max_batching_window
1478
1550
  if consumer_group_id is not None:
1479
1551
  self._values["consumer_group_id"] = consumer_group_id
1552
+ if filter_encryption is not None:
1553
+ self._values["filter_encryption"] = filter_encryption
1480
1554
  if filters is not None:
1481
1555
  self._values["filters"] = filters
1482
1556
  if on_failure is not None:
@@ -1563,6 +1637,17 @@ class SelfManagedKafkaEventSourceProps(KafkaEventSourceProps):
1563
1637
  result = self._values.get("consumer_group_id")
1564
1638
  return typing.cast(typing.Optional[builtins.str], result)
1565
1639
 
1640
+ @builtins.property
1641
+ def filter_encryption(self) -> typing.Optional[_IKey_5f11635f]:
1642
+ '''Add Customer managed KMS key to encrypt Filter Criteria.
1643
+
1644
+ :default: - none
1645
+
1646
+ :see: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
1647
+ '''
1648
+ result = self._values.get("filter_encryption")
1649
+ return typing.cast(typing.Optional[_IKey_5f11635f], result)
1650
+
1566
1651
  @builtins.property
1567
1652
  def filters(
1568
1653
  self,
@@ -1960,6 +2045,7 @@ class SqsEventSource(
1960
2045
  *,
1961
2046
  batch_size: typing.Optional[jsii.Number] = None,
1962
2047
  enabled: typing.Optional[builtins.bool] = None,
2048
+ filter_encryption: typing.Optional[_IKey_5f11635f] = None,
1963
2049
  filters: typing.Optional[typing.Sequence[typing.Mapping[builtins.str, typing.Any]]] = None,
1964
2050
  max_batching_window: typing.Optional[_Duration_4839e8c3] = None,
1965
2051
  max_concurrency: typing.Optional[jsii.Number] = None,
@@ -1969,6 +2055,7 @@ class SqsEventSource(
1969
2055
  :param queue: -
1970
2056
  :param batch_size: The largest number of records that AWS Lambda will retrieve from your event source at the time of invoking your function. Your function receives an event with all the retrieved records. Valid Range: Minimum value of 1. Maximum value of 10. If ``maxBatchingWindow`` is configured, this value can go up to 10,000. Default: 10
1971
2057
  :param enabled: If the SQS event source mapping should be enabled. Default: true
2058
+ :param filter_encryption: Add Customer managed KMS key to encrypt Filter Criteria. Default: - none
1972
2059
  :param filters: Add filter criteria option. Default: - None
1973
2060
  :param max_batching_window: The maximum amount of time to gather records before invoking the function. Valid Range: Minimum value of 0 minutes. Maximum value of 5 minutes. Default: - no batching window. The lambda function will be invoked immediately with the records that are available.
1974
2061
  :param max_concurrency: The maximum concurrency setting limits the number of concurrent instances of the function that an Amazon SQS event source can invoke. Default: - No specific limit.
@@ -1980,6 +2067,7 @@ class SqsEventSource(
1980
2067
  props = SqsEventSourceProps(
1981
2068
  batch_size=batch_size,
1982
2069
  enabled=enabled,
2070
+ filter_encryption=filter_encryption,
1983
2071
  filters=filters,
1984
2072
  max_batching_window=max_batching_window,
1985
2073
  max_concurrency=max_concurrency,
@@ -2023,6 +2111,7 @@ class SqsEventSource(
2023
2111
  name_mapping={
2024
2112
  "batch_size": "batchSize",
2025
2113
  "enabled": "enabled",
2114
+ "filter_encryption": "filterEncryption",
2026
2115
  "filters": "filters",
2027
2116
  "max_batching_window": "maxBatchingWindow",
2028
2117
  "max_concurrency": "maxConcurrency",
@@ -2035,6 +2124,7 @@ class SqsEventSourceProps:
2035
2124
  *,
2036
2125
  batch_size: typing.Optional[jsii.Number] = None,
2037
2126
  enabled: typing.Optional[builtins.bool] = None,
2127
+ filter_encryption: typing.Optional[_IKey_5f11635f] = None,
2038
2128
  filters: typing.Optional[typing.Sequence[typing.Mapping[builtins.str, typing.Any]]] = None,
2039
2129
  max_batching_window: typing.Optional[_Duration_4839e8c3] = None,
2040
2130
  max_concurrency: typing.Optional[jsii.Number] = None,
@@ -2043,6 +2133,7 @@ class SqsEventSourceProps:
2043
2133
  '''
2044
2134
  :param batch_size: The largest number of records that AWS Lambda will retrieve from your event source at the time of invoking your function. Your function receives an event with all the retrieved records. Valid Range: Minimum value of 1. Maximum value of 10. If ``maxBatchingWindow`` is configured, this value can go up to 10,000. Default: 10
2045
2135
  :param enabled: If the SQS event source mapping should be enabled. Default: true
2136
+ :param filter_encryption: Add Customer managed KMS key to encrypt Filter Criteria. Default: - none
2046
2137
  :param filters: Add filter criteria option. Default: - None
2047
2138
  :param max_batching_window: The maximum amount of time to gather records before invoking the function. Valid Range: Minimum value of 0 minutes. Maximum value of 5 minutes. Default: - no batching window. The lambda function will be invoked immediately with the records that are available.
2048
2139
  :param max_concurrency: The maximum concurrency setting limits the number of concurrent instances of the function that an Amazon SQS event source can invoke. Default: - No specific limit.
@@ -2070,6 +2161,7 @@ class SqsEventSourceProps:
2070
2161
  type_hints = typing.get_type_hints(_typecheckingstub__15f8ac7c8dd3ede272e50988fdcd091f07e9c5d7ef95ab596dc66b4c940652b4)
2071
2162
  check_type(argname="argument batch_size", value=batch_size, expected_type=type_hints["batch_size"])
2072
2163
  check_type(argname="argument enabled", value=enabled, expected_type=type_hints["enabled"])
2164
+ check_type(argname="argument filter_encryption", value=filter_encryption, expected_type=type_hints["filter_encryption"])
2073
2165
  check_type(argname="argument filters", value=filters, expected_type=type_hints["filters"])
2074
2166
  check_type(argname="argument max_batching_window", value=max_batching_window, expected_type=type_hints["max_batching_window"])
2075
2167
  check_type(argname="argument max_concurrency", value=max_concurrency, expected_type=type_hints["max_concurrency"])
@@ -2079,6 +2171,8 @@ class SqsEventSourceProps:
2079
2171
  self._values["batch_size"] = batch_size
2080
2172
  if enabled is not None:
2081
2173
  self._values["enabled"] = enabled
2174
+ if filter_encryption is not None:
2175
+ self._values["filter_encryption"] = filter_encryption
2082
2176
  if filters is not None:
2083
2177
  self._values["filters"] = filters
2084
2178
  if max_batching_window is not None:
@@ -2112,6 +2206,17 @@ class SqsEventSourceProps:
2112
2206
  result = self._values.get("enabled")
2113
2207
  return typing.cast(typing.Optional[builtins.bool], result)
2114
2208
 
2209
+ @builtins.property
2210
+ def filter_encryption(self) -> typing.Optional[_IKey_5f11635f]:
2211
+ '''Add Customer managed KMS key to encrypt Filter Criteria.
2212
+
2213
+ :default: - none
2214
+
2215
+ :see: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
2216
+ '''
2217
+ result = self._values.get("filter_encryption")
2218
+ return typing.cast(typing.Optional[_IKey_5f11635f], result)
2219
+
2115
2220
  @builtins.property
2116
2221
  def filters(
2117
2222
  self,
@@ -2183,6 +2288,7 @@ class StreamEventSource(
2183
2288
  self,
2184
2289
  *,
2185
2290
  bisect_batch_on_error: typing.Optional[builtins.bool] = None,
2291
+ filter_encryption: typing.Optional[_IKey_5f11635f] = None,
2186
2292
  filters: typing.Optional[typing.Sequence[typing.Mapping[builtins.str, typing.Any]]] = None,
2187
2293
  max_record_age: typing.Optional[_Duration_4839e8c3] = None,
2188
2294
  on_failure: typing.Optional[_IEventSourceDlq_5e2c6ad9] = None,
@@ -2197,6 +2303,7 @@ class StreamEventSource(
2197
2303
  ) -> None:
2198
2304
  '''
2199
2305
  :param bisect_batch_on_error: If the function returns an error, split the batch in two and retry. Default: false
2306
+ :param filter_encryption: Add Customer managed KMS key to encrypt Filter Criteria. Default: - none
2200
2307
  :param filters: Add filter criteria option. Default: - None
2201
2308
  :param max_record_age: The maximum age of a record that Lambda sends to a function for processing. Valid Range: - Minimum value of 60 seconds - Maximum value of 7 days The default value is -1, which sets the maximum age to infinite. When the value is set to infinite, Lambda never discards old records. Record are valid until it expires in the event source. Default: -1
2202
2309
  :param on_failure: An Amazon SQS queue or Amazon SNS topic destination for discarded records. Default: - discarded records are ignored
@@ -2211,6 +2318,7 @@ class StreamEventSource(
2211
2318
  '''
2212
2319
  props = StreamEventSourceProps(
2213
2320
  bisect_batch_on_error=bisect_batch_on_error,
2321
+ filter_encryption=filter_encryption,
2214
2322
  filters=filters,
2215
2323
  max_record_age=max_record_age,
2216
2324
  on_failure=on_failure,
@@ -2243,6 +2351,7 @@ class StreamEventSource(
2243
2351
  bisect_batch_on_error: typing.Optional[builtins.bool] = None,
2244
2352
  enabled: typing.Optional[builtins.bool] = None,
2245
2353
  event_source_arn: typing.Optional[builtins.str] = None,
2354
+ filter_encryption: typing.Optional[_IKey_5f11635f] = None,
2246
2355
  filters: typing.Optional[typing.Sequence[typing.Mapping[builtins.str, typing.Any]]] = None,
2247
2356
  kafka_bootstrap_servers: typing.Optional[typing.Sequence[builtins.str]] = None,
2248
2357
  kafka_consumer_group_id: typing.Optional[builtins.str] = None,
@@ -2265,6 +2374,7 @@ class StreamEventSource(
2265
2374
  :param bisect_batch_on_error: If the function returns an error, split the batch in two and retry. Default: false
2266
2375
  :param enabled: Set to false to disable the event source upon creation. Default: true
2267
2376
  :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
2377
+ :param filter_encryption: Add Customer managed KMS key to encrypt Filter Criteria. Default: - none
2268
2378
  :param filters: Add filter criteria to Event Source. Default: - none
2269
2379
  :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
2270
2380
  :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
@@ -2287,6 +2397,7 @@ class StreamEventSource(
2287
2397
  bisect_batch_on_error=bisect_batch_on_error,
2288
2398
  enabled=enabled,
2289
2399
  event_source_arn=event_source_arn,
2400
+ filter_encryption=filter_encryption,
2290
2401
  filters=filters,
2291
2402
  kafka_bootstrap_servers=kafka_bootstrap_servers,
2292
2403
  kafka_consumer_group_id=kafka_consumer_group_id,
@@ -2338,6 +2449,7 @@ typing.cast(typing.Any, StreamEventSource).__jsii_proxy_class__ = lambda : _Stre
2338
2449
  "enabled": "enabled",
2339
2450
  "max_batching_window": "maxBatchingWindow",
2340
2451
  "bisect_batch_on_error": "bisectBatchOnError",
2452
+ "filter_encryption": "filterEncryption",
2341
2453
  "filters": "filters",
2342
2454
  "max_record_age": "maxRecordAge",
2343
2455
  "on_failure": "onFailure",
@@ -2356,6 +2468,7 @@ class StreamEventSourceProps(BaseStreamEventSourceProps):
2356
2468
  enabled: typing.Optional[builtins.bool] = None,
2357
2469
  max_batching_window: typing.Optional[_Duration_4839e8c3] = None,
2358
2470
  bisect_batch_on_error: typing.Optional[builtins.bool] = None,
2471
+ filter_encryption: typing.Optional[_IKey_5f11635f] = None,
2359
2472
  filters: typing.Optional[typing.Sequence[typing.Mapping[builtins.str, typing.Any]]] = None,
2360
2473
  max_record_age: typing.Optional[_Duration_4839e8c3] = None,
2361
2474
  on_failure: typing.Optional[_IEventSourceDlq_5e2c6ad9] = None,
@@ -2371,6 +2484,7 @@ class StreamEventSourceProps(BaseStreamEventSourceProps):
2371
2484
  :param enabled: If the stream event source mapping should be enabled. Default: true
2372
2485
  :param max_batching_window: The maximum amount of time to gather records before invoking the function. Maximum of Duration.minutes(5). Default: - Duration.seconds(0) for Kinesis, DynamoDB, and SQS event sources, Duration.millis(500) for MSK, self-managed Kafka, and Amazon MQ.
2373
2486
  :param bisect_batch_on_error: If the function returns an error, split the batch in two and retry. Default: false
2487
+ :param filter_encryption: Add Customer managed KMS key to encrypt Filter Criteria. Default: - none
2374
2488
  :param filters: Add filter criteria option. Default: - None
2375
2489
  :param max_record_age: The maximum age of a record that Lambda sends to a function for processing. Valid Range: - Minimum value of 60 seconds - Maximum value of 7 days The default value is -1, which sets the maximum age to infinite. When the value is set to infinite, Lambda never discards old records. Record are valid until it expires in the event source. Default: -1
2376
2490
  :param on_failure: An Amazon SQS queue or Amazon SNS topic destination for discarded records. Default: - discarded records are ignored
@@ -2386,11 +2500,13 @@ class StreamEventSourceProps(BaseStreamEventSourceProps):
2386
2500
  # The code below shows an example of how to instantiate this type.
2387
2501
  # The values are placeholders you should change.
2388
2502
  import aws_cdk as cdk
2503
+ from aws_cdk import aws_kms as kms
2389
2504
  from aws_cdk import aws_lambda as lambda_
2390
2505
  from aws_cdk import aws_lambda_event_sources as lambda_event_sources
2391
2506
 
2392
2507
  # event_source_dlq: lambda.IEventSourceDlq
2393
2508
  # filters: Any
2509
+ # key: kms.Key
2394
2510
 
2395
2511
  stream_event_source_props = lambda_event_sources.StreamEventSourceProps(
2396
2512
  starting_position=lambda_.StartingPosition.TRIM_HORIZON,
@@ -2399,6 +2515,7 @@ class StreamEventSourceProps(BaseStreamEventSourceProps):
2399
2515
  batch_size=123,
2400
2516
  bisect_batch_on_error=False,
2401
2517
  enabled=False,
2518
+ filter_encryption=key,
2402
2519
  filters=[{
2403
2520
  "filters_key": filters
2404
2521
  }],
@@ -2418,6 +2535,7 @@ class StreamEventSourceProps(BaseStreamEventSourceProps):
2418
2535
  check_type(argname="argument enabled", value=enabled, expected_type=type_hints["enabled"])
2419
2536
  check_type(argname="argument max_batching_window", value=max_batching_window, expected_type=type_hints["max_batching_window"])
2420
2537
  check_type(argname="argument bisect_batch_on_error", value=bisect_batch_on_error, expected_type=type_hints["bisect_batch_on_error"])
2538
+ check_type(argname="argument filter_encryption", value=filter_encryption, expected_type=type_hints["filter_encryption"])
2421
2539
  check_type(argname="argument filters", value=filters, expected_type=type_hints["filters"])
2422
2540
  check_type(argname="argument max_record_age", value=max_record_age, expected_type=type_hints["max_record_age"])
2423
2541
  check_type(argname="argument on_failure", value=on_failure, expected_type=type_hints["on_failure"])
@@ -2436,6 +2554,8 @@ class StreamEventSourceProps(BaseStreamEventSourceProps):
2436
2554
  self._values["max_batching_window"] = max_batching_window
2437
2555
  if bisect_batch_on_error is not None:
2438
2556
  self._values["bisect_batch_on_error"] = bisect_batch_on_error
2557
+ if filter_encryption is not None:
2558
+ self._values["filter_encryption"] = filter_encryption
2439
2559
  if filters is not None:
2440
2560
  self._values["filters"] = filters
2441
2561
  if max_record_age is not None:
@@ -2509,6 +2629,17 @@ class StreamEventSourceProps(BaseStreamEventSourceProps):
2509
2629
  result = self._values.get("bisect_batch_on_error")
2510
2630
  return typing.cast(typing.Optional[builtins.bool], result)
2511
2631
 
2632
+ @builtins.property
2633
+ def filter_encryption(self) -> typing.Optional[_IKey_5f11635f]:
2634
+ '''Add Customer managed KMS key to encrypt Filter Criteria.
2635
+
2636
+ :default: - none
2637
+
2638
+ :see: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
2639
+ '''
2640
+ result = self._values.get("filter_encryption")
2641
+ return typing.cast(typing.Optional[_IKey_5f11635f], result)
2642
+
2512
2643
  @builtins.property
2513
2644
  def filters(
2514
2645
  self,
@@ -2640,6 +2771,7 @@ class DynamoEventSource(
2640
2771
  table: _ITable_504fd401,
2641
2772
  *,
2642
2773
  bisect_batch_on_error: typing.Optional[builtins.bool] = None,
2774
+ filter_encryption: typing.Optional[_IKey_5f11635f] = None,
2643
2775
  filters: typing.Optional[typing.Sequence[typing.Mapping[builtins.str, typing.Any]]] = None,
2644
2776
  max_record_age: typing.Optional[_Duration_4839e8c3] = None,
2645
2777
  on_failure: typing.Optional[_IEventSourceDlq_5e2c6ad9] = None,
@@ -2655,6 +2787,7 @@ class DynamoEventSource(
2655
2787
  '''
2656
2788
  :param table: -
2657
2789
  :param bisect_batch_on_error: If the function returns an error, split the batch in two and retry. Default: false
2790
+ :param filter_encryption: Add Customer managed KMS key to encrypt Filter Criteria. Default: - none
2658
2791
  :param filters: Add filter criteria option. Default: - None
2659
2792
  :param max_record_age: The maximum age of a record that Lambda sends to a function for processing. Valid Range: - Minimum value of 60 seconds - Maximum value of 7 days The default value is -1, which sets the maximum age to infinite. When the value is set to infinite, Lambda never discards old records. Record are valid until it expires in the event source. Default: -1
2660
2793
  :param on_failure: An Amazon SQS queue or Amazon SNS topic destination for discarded records. Default: - discarded records are ignored
@@ -2672,6 +2805,7 @@ class DynamoEventSource(
2672
2805
  check_type(argname="argument table", value=table, expected_type=type_hints["table"])
2673
2806
  props = DynamoEventSourceProps(
2674
2807
  bisect_batch_on_error=bisect_batch_on_error,
2808
+ filter_encryption=filter_encryption,
2675
2809
  filters=filters,
2676
2810
  max_record_age=max_record_age,
2677
2811
  on_failure=on_failure,
@@ -2720,6 +2854,7 @@ class DynamoEventSource(
2720
2854
  "enabled": "enabled",
2721
2855
  "max_batching_window": "maxBatchingWindow",
2722
2856
  "bisect_batch_on_error": "bisectBatchOnError",
2857
+ "filter_encryption": "filterEncryption",
2723
2858
  "filters": "filters",
2724
2859
  "max_record_age": "maxRecordAge",
2725
2860
  "on_failure": "onFailure",
@@ -2738,6 +2873,7 @@ class DynamoEventSourceProps(StreamEventSourceProps):
2738
2873
  enabled: typing.Optional[builtins.bool] = None,
2739
2874
  max_batching_window: typing.Optional[_Duration_4839e8c3] = None,
2740
2875
  bisect_batch_on_error: typing.Optional[builtins.bool] = None,
2876
+ filter_encryption: typing.Optional[_IKey_5f11635f] = None,
2741
2877
  filters: typing.Optional[typing.Sequence[typing.Mapping[builtins.str, typing.Any]]] = None,
2742
2878
  max_record_age: typing.Optional[_Duration_4839e8c3] = None,
2743
2879
  on_failure: typing.Optional[_IEventSourceDlq_5e2c6ad9] = None,
@@ -2752,6 +2888,7 @@ class DynamoEventSourceProps(StreamEventSourceProps):
2752
2888
  :param enabled: If the stream event source mapping should be enabled. Default: true
2753
2889
  :param max_batching_window: The maximum amount of time to gather records before invoking the function. Maximum of Duration.minutes(5). Default: - Duration.seconds(0) for Kinesis, DynamoDB, and SQS event sources, Duration.millis(500) for MSK, self-managed Kafka, and Amazon MQ.
2754
2890
  :param bisect_batch_on_error: If the function returns an error, split the batch in two and retry. Default: false
2891
+ :param filter_encryption: Add Customer managed KMS key to encrypt Filter Criteria. Default: - none
2755
2892
  :param filters: Add filter criteria option. Default: - None
2756
2893
  :param max_record_age: The maximum age of a record that Lambda sends to a function for processing. Valid Range: - Minimum value of 60 seconds - Maximum value of 7 days The default value is -1, which sets the maximum age to infinite. When the value is set to infinite, Lambda never discards old records. Record are valid until it expires in the event source. Default: -1
2757
2894
  :param on_failure: An Amazon SQS queue or Amazon SNS topic destination for discarded records. Default: - discarded records are ignored
@@ -2788,6 +2925,7 @@ class DynamoEventSourceProps(StreamEventSourceProps):
2788
2925
  check_type(argname="argument enabled", value=enabled, expected_type=type_hints["enabled"])
2789
2926
  check_type(argname="argument max_batching_window", value=max_batching_window, expected_type=type_hints["max_batching_window"])
2790
2927
  check_type(argname="argument bisect_batch_on_error", value=bisect_batch_on_error, expected_type=type_hints["bisect_batch_on_error"])
2928
+ check_type(argname="argument filter_encryption", value=filter_encryption, expected_type=type_hints["filter_encryption"])
2791
2929
  check_type(argname="argument filters", value=filters, expected_type=type_hints["filters"])
2792
2930
  check_type(argname="argument max_record_age", value=max_record_age, expected_type=type_hints["max_record_age"])
2793
2931
  check_type(argname="argument on_failure", value=on_failure, expected_type=type_hints["on_failure"])
@@ -2806,6 +2944,8 @@ class DynamoEventSourceProps(StreamEventSourceProps):
2806
2944
  self._values["max_batching_window"] = max_batching_window
2807
2945
  if bisect_batch_on_error is not None:
2808
2946
  self._values["bisect_batch_on_error"] = bisect_batch_on_error
2947
+ if filter_encryption is not None:
2948
+ self._values["filter_encryption"] = filter_encryption
2809
2949
  if filters is not None:
2810
2950
  self._values["filters"] = filters
2811
2951
  if max_record_age is not None:
@@ -2879,6 +3019,17 @@ class DynamoEventSourceProps(StreamEventSourceProps):
2879
3019
  result = self._values.get("bisect_batch_on_error")
2880
3020
  return typing.cast(typing.Optional[builtins.bool], result)
2881
3021
 
3022
+ @builtins.property
3023
+ def filter_encryption(self) -> typing.Optional[_IKey_5f11635f]:
3024
+ '''Add Customer managed KMS key to encrypt Filter Criteria.
3025
+
3026
+ :default: - none
3027
+
3028
+ :see: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
3029
+ '''
3030
+ result = self._values.get("filter_encryption")
3031
+ return typing.cast(typing.Optional[_IKey_5f11635f], result)
3032
+
2882
3033
  @builtins.property
2883
3034
  def filters(
2884
3035
  self,
@@ -3006,6 +3157,7 @@ class KinesisEventSource(
3006
3157
  *,
3007
3158
  starting_position_timestamp: typing.Optional[jsii.Number] = None,
3008
3159
  bisect_batch_on_error: typing.Optional[builtins.bool] = None,
3160
+ filter_encryption: typing.Optional[_IKey_5f11635f] = None,
3009
3161
  filters: typing.Optional[typing.Sequence[typing.Mapping[builtins.str, typing.Any]]] = None,
3010
3162
  max_record_age: typing.Optional[_Duration_4839e8c3] = None,
3011
3163
  on_failure: typing.Optional[_IEventSourceDlq_5e2c6ad9] = None,
@@ -3022,6 +3174,7 @@ class KinesisEventSource(
3022
3174
  :param stream: -
3023
3175
  :param starting_position_timestamp: The time from which to start reading, in Unix time seconds. Default: - no timestamp
3024
3176
  :param bisect_batch_on_error: If the function returns an error, split the batch in two and retry. Default: false
3177
+ :param filter_encryption: Add Customer managed KMS key to encrypt Filter Criteria. Default: - none
3025
3178
  :param filters: Add filter criteria option. Default: - None
3026
3179
  :param max_record_age: The maximum age of a record that Lambda sends to a function for processing. Valid Range: - Minimum value of 60 seconds - Maximum value of 7 days The default value is -1, which sets the maximum age to infinite. When the value is set to infinite, Lambda never discards old records. Record are valid until it expires in the event source. Default: -1
3027
3180
  :param on_failure: An Amazon SQS queue or Amazon SNS topic destination for discarded records. Default: - discarded records are ignored
@@ -3040,6 +3193,7 @@ class KinesisEventSource(
3040
3193
  props = KinesisEventSourceProps(
3041
3194
  starting_position_timestamp=starting_position_timestamp,
3042
3195
  bisect_batch_on_error=bisect_batch_on_error,
3196
+ filter_encryption=filter_encryption,
3043
3197
  filters=filters,
3044
3198
  max_record_age=max_record_age,
3045
3199
  on_failure=on_failure,
@@ -3093,6 +3247,7 @@ class KinesisEventSource(
3093
3247
  "enabled": "enabled",
3094
3248
  "max_batching_window": "maxBatchingWindow",
3095
3249
  "bisect_batch_on_error": "bisectBatchOnError",
3250
+ "filter_encryption": "filterEncryption",
3096
3251
  "filters": "filters",
3097
3252
  "max_record_age": "maxRecordAge",
3098
3253
  "on_failure": "onFailure",
@@ -3112,6 +3267,7 @@ class KinesisEventSourceProps(StreamEventSourceProps):
3112
3267
  enabled: typing.Optional[builtins.bool] = None,
3113
3268
  max_batching_window: typing.Optional[_Duration_4839e8c3] = None,
3114
3269
  bisect_batch_on_error: typing.Optional[builtins.bool] = None,
3270
+ filter_encryption: typing.Optional[_IKey_5f11635f] = None,
3115
3271
  filters: typing.Optional[typing.Sequence[typing.Mapping[builtins.str, typing.Any]]] = None,
3116
3272
  max_record_age: typing.Optional[_Duration_4839e8c3] = None,
3117
3273
  on_failure: typing.Optional[_IEventSourceDlq_5e2c6ad9] = None,
@@ -3127,6 +3283,7 @@ class KinesisEventSourceProps(StreamEventSourceProps):
3127
3283
  :param enabled: If the stream event source mapping should be enabled. Default: true
3128
3284
  :param max_batching_window: The maximum amount of time to gather records before invoking the function. Maximum of Duration.minutes(5). Default: - Duration.seconds(0) for Kinesis, DynamoDB, and SQS event sources, Duration.millis(500) for MSK, self-managed Kafka, and Amazon MQ.
3129
3285
  :param bisect_batch_on_error: If the function returns an error, split the batch in two and retry. Default: false
3286
+ :param filter_encryption: Add Customer managed KMS key to encrypt Filter Criteria. Default: - none
3130
3287
  :param filters: Add filter criteria option. Default: - None
3131
3288
  :param max_record_age: The maximum age of a record that Lambda sends to a function for processing. Valid Range: - Minimum value of 60 seconds - Maximum value of 7 days The default value is -1, which sets the maximum age to infinite. When the value is set to infinite, Lambda never discards old records. Record are valid until it expires in the event source. Default: -1
3132
3289
  :param on_failure: An Amazon SQS queue or Amazon SNS topic destination for discarded records. Default: - discarded records are ignored
@@ -3159,6 +3316,7 @@ class KinesisEventSourceProps(StreamEventSourceProps):
3159
3316
  check_type(argname="argument enabled", value=enabled, expected_type=type_hints["enabled"])
3160
3317
  check_type(argname="argument max_batching_window", value=max_batching_window, expected_type=type_hints["max_batching_window"])
3161
3318
  check_type(argname="argument bisect_batch_on_error", value=bisect_batch_on_error, expected_type=type_hints["bisect_batch_on_error"])
3319
+ check_type(argname="argument filter_encryption", value=filter_encryption, expected_type=type_hints["filter_encryption"])
3162
3320
  check_type(argname="argument filters", value=filters, expected_type=type_hints["filters"])
3163
3321
  check_type(argname="argument max_record_age", value=max_record_age, expected_type=type_hints["max_record_age"])
3164
3322
  check_type(argname="argument on_failure", value=on_failure, expected_type=type_hints["on_failure"])
@@ -3178,6 +3336,8 @@ class KinesisEventSourceProps(StreamEventSourceProps):
3178
3336
  self._values["max_batching_window"] = max_batching_window
3179
3337
  if bisect_batch_on_error is not None:
3180
3338
  self._values["bisect_batch_on_error"] = bisect_batch_on_error
3339
+ if filter_encryption is not None:
3340
+ self._values["filter_encryption"] = filter_encryption
3181
3341
  if filters is not None:
3182
3342
  self._values["filters"] = filters
3183
3343
  if max_record_age is not None:
@@ -3253,6 +3413,17 @@ class KinesisEventSourceProps(StreamEventSourceProps):
3253
3413
  result = self._values.get("bisect_batch_on_error")
3254
3414
  return typing.cast(typing.Optional[builtins.bool], result)
3255
3415
 
3416
+ @builtins.property
3417
+ def filter_encryption(self) -> typing.Optional[_IKey_5f11635f]:
3418
+ '''Add Customer managed KMS key to encrypt Filter Criteria.
3419
+
3420
+ :default: - none
3421
+
3422
+ :see: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
3423
+ '''
3424
+ result = self._values.get("filter_encryption")
3425
+ return typing.cast(typing.Optional[_IKey_5f11635f], result)
3426
+
3256
3427
  @builtins.property
3257
3428
  def filters(
3258
3429
  self,
@@ -3400,6 +3571,7 @@ class ManagedKafkaEventSource(
3400
3571
  cluster_arn: builtins.str,
3401
3572
  topic: builtins.str,
3402
3573
  consumer_group_id: typing.Optional[builtins.str] = None,
3574
+ filter_encryption: typing.Optional[_IKey_5f11635f] = None,
3403
3575
  filters: typing.Optional[typing.Sequence[typing.Mapping[builtins.str, typing.Any]]] = None,
3404
3576
  on_failure: typing.Optional[_IEventSourceDlq_5e2c6ad9] = None,
3405
3577
  secret: typing.Optional[_ISecret_6e020e6a] = None,
@@ -3412,6 +3584,7 @@ class ManagedKafkaEventSource(
3412
3584
  :param cluster_arn: An MSK cluster construct.
3413
3585
  :param topic: The Kafka topic to subscribe to.
3414
3586
  :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. The value must have a lenght between 1 and 200 and full the pattern '[a-zA-Z0-9-/*:_+=.@-]*'. Default: - none
3587
+ :param filter_encryption: Add Customer managed KMS key to encrypt Filter Criteria. Default: - none
3415
3588
  :param filters: Add filter criteria to Event Source. Default: - none
3416
3589
  :param on_failure: Add an on Failure Destination for this Kafka event. SNS/SQS/S3 are supported Default: - discarded records are ignored
3417
3590
  :param secret: The secret with the Kafka credentials, see https://docs.aws.amazon.com/msk/latest/developerguide/msk-password.html for details This field is required if your Kafka brokers are accessed over the Internet. Default: none
@@ -3424,6 +3597,7 @@ class ManagedKafkaEventSource(
3424
3597
  cluster_arn=cluster_arn,
3425
3598
  topic=topic,
3426
3599
  consumer_group_id=consumer_group_id,
3600
+ filter_encryption=filter_encryption,
3427
3601
  filters=filters,
3428
3602
  on_failure=on_failure,
3429
3603
  secret=secret,
@@ -3508,6 +3682,7 @@ class SelfManagedKafkaEventSource(
3508
3682
  vpc_subnets: typing.Optional[typing.Union[_SubnetSelection_e57d76df, typing.Dict[builtins.str, typing.Any]]] = None,
3509
3683
  topic: builtins.str,
3510
3684
  consumer_group_id: typing.Optional[builtins.str] = None,
3685
+ filter_encryption: typing.Optional[_IKey_5f11635f] = None,
3511
3686
  filters: typing.Optional[typing.Sequence[typing.Mapping[builtins.str, typing.Any]]] = None,
3512
3687
  on_failure: typing.Optional[_IEventSourceDlq_5e2c6ad9] = None,
3513
3688
  secret: typing.Optional[_ISecret_6e020e6a] = None,
@@ -3525,6 +3700,7 @@ class SelfManagedKafkaEventSource(
3525
3700
  :param vpc_subnets: If your Kafka brokers are only reachable via VPC, provide the subnets selection here. Default: - none, required if setting vpc
3526
3701
  :param topic: The Kafka topic to subscribe to.
3527
3702
  :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. The value must have a lenght between 1 and 200 and full the pattern '[a-zA-Z0-9-/*:_+=.@-]*'. Default: - none
3703
+ :param filter_encryption: Add Customer managed KMS key to encrypt Filter Criteria. Default: - none
3528
3704
  :param filters: Add filter criteria to Event Source. Default: - none
3529
3705
  :param on_failure: Add an on Failure Destination for this Kafka event. SNS/SQS/S3 are supported Default: - discarded records are ignored
3530
3706
  :param secret: The secret with the Kafka credentials, see https://docs.aws.amazon.com/msk/latest/developerguide/msk-password.html for details This field is required if your Kafka brokers are accessed over the Internet. Default: none
@@ -3542,6 +3718,7 @@ class SelfManagedKafkaEventSource(
3542
3718
  vpc_subnets=vpc_subnets,
3543
3719
  topic=topic,
3544
3720
  consumer_group_id=consumer_group_id,
3721
+ filter_encryption=filter_encryption,
3545
3722
  filters=filters,
3546
3723
  on_failure=on_failure,
3547
3724
  secret=secret,
@@ -3636,6 +3813,7 @@ def _typecheckingstub__980041697091a50415a7444df02a046d910ddd83f1229789d80780bf7
3636
3813
  max_batching_window: typing.Optional[_Duration_4839e8c3] = None,
3637
3814
  topic: builtins.str,
3638
3815
  consumer_group_id: typing.Optional[builtins.str] = None,
3816
+ filter_encryption: typing.Optional[_IKey_5f11635f] = None,
3639
3817
  filters: typing.Optional[typing.Sequence[typing.Mapping[builtins.str, typing.Any]]] = None,
3640
3818
  on_failure: typing.Optional[_IEventSourceDlq_5e2c6ad9] = None,
3641
3819
  secret: typing.Optional[_ISecret_6e020e6a] = None,
@@ -3651,6 +3829,7 @@ def _typecheckingstub__e930f585c1bae37174885c54f0f224909bfb0a75d9f1b652bbcf33461
3651
3829
  max_batching_window: typing.Optional[_Duration_4839e8c3] = None,
3652
3830
  topic: builtins.str,
3653
3831
  consumer_group_id: typing.Optional[builtins.str] = None,
3832
+ filter_encryption: typing.Optional[_IKey_5f11635f] = None,
3654
3833
  filters: typing.Optional[typing.Sequence[typing.Mapping[builtins.str, typing.Any]]] = None,
3655
3834
  on_failure: typing.Optional[_IEventSourceDlq_5e2c6ad9] = None,
3656
3835
  secret: typing.Optional[_ISecret_6e020e6a] = None,
@@ -3718,6 +3897,7 @@ def _typecheckingstub__0100a45aa91b9c2103378e2ba54dd41b054f1d6a50733797256d6971b
3718
3897
  max_batching_window: typing.Optional[_Duration_4839e8c3] = None,
3719
3898
  topic: builtins.str,
3720
3899
  consumer_group_id: typing.Optional[builtins.str] = None,
3900
+ filter_encryption: typing.Optional[_IKey_5f11635f] = None,
3721
3901
  filters: typing.Optional[typing.Sequence[typing.Mapping[builtins.str, typing.Any]]] = None,
3722
3902
  on_failure: typing.Optional[_IEventSourceDlq_5e2c6ad9] = None,
3723
3903
  secret: typing.Optional[_ISecret_6e020e6a] = None,
@@ -3787,6 +3967,7 @@ def _typecheckingstub__bf54c2a4adfa05b385a456a89f23dd0699f8e61461cae79f7a40b0a82
3787
3967
  *,
3788
3968
  batch_size: typing.Optional[jsii.Number] = None,
3789
3969
  enabled: typing.Optional[builtins.bool] = None,
3970
+ filter_encryption: typing.Optional[_IKey_5f11635f] = None,
3790
3971
  filters: typing.Optional[typing.Sequence[typing.Mapping[builtins.str, typing.Any]]] = None,
3791
3972
  max_batching_window: typing.Optional[_Duration_4839e8c3] = None,
3792
3973
  max_concurrency: typing.Optional[jsii.Number] = None,
@@ -3805,6 +3986,7 @@ def _typecheckingstub__15f8ac7c8dd3ede272e50988fdcd091f07e9c5d7ef95ab596dc66b4c9
3805
3986
  *,
3806
3987
  batch_size: typing.Optional[jsii.Number] = None,
3807
3988
  enabled: typing.Optional[builtins.bool] = None,
3989
+ filter_encryption: typing.Optional[_IKey_5f11635f] = None,
3808
3990
  filters: typing.Optional[typing.Sequence[typing.Mapping[builtins.str, typing.Any]]] = None,
3809
3991
  max_batching_window: typing.Optional[_Duration_4839e8c3] = None,
3810
3992
  max_concurrency: typing.Optional[jsii.Number] = None,
@@ -3826,6 +4008,7 @@ def _typecheckingstub__f846cf48a1cd8d8120ed4973fabeee827928eff2de72d372506124b7d
3826
4008
  enabled: typing.Optional[builtins.bool] = None,
3827
4009
  max_batching_window: typing.Optional[_Duration_4839e8c3] = None,
3828
4010
  bisect_batch_on_error: typing.Optional[builtins.bool] = None,
4011
+ filter_encryption: typing.Optional[_IKey_5f11635f] = None,
3829
4012
  filters: typing.Optional[typing.Sequence[typing.Mapping[builtins.str, typing.Any]]] = None,
3830
4013
  max_record_age: typing.Optional[_Duration_4839e8c3] = None,
3831
4014
  on_failure: typing.Optional[_IEventSourceDlq_5e2c6ad9] = None,
@@ -3841,6 +4024,7 @@ def _typecheckingstub__826ee32f5239c7c242a7200ffc24778bee01c1101c3cc939fed4a8615
3841
4024
  table: _ITable_504fd401,
3842
4025
  *,
3843
4026
  bisect_batch_on_error: typing.Optional[builtins.bool] = None,
4027
+ filter_encryption: typing.Optional[_IKey_5f11635f] = None,
3844
4028
  filters: typing.Optional[typing.Sequence[typing.Mapping[builtins.str, typing.Any]]] = None,
3845
4029
  max_record_age: typing.Optional[_Duration_4839e8c3] = None,
3846
4030
  on_failure: typing.Optional[_IEventSourceDlq_5e2c6ad9] = None,
@@ -3869,6 +4053,7 @@ def _typecheckingstub__ec371d5e4612e8923bbdcc024d90e26915d64be2dc40151f22fc41139
3869
4053
  enabled: typing.Optional[builtins.bool] = None,
3870
4054
  max_batching_window: typing.Optional[_Duration_4839e8c3] = None,
3871
4055
  bisect_batch_on_error: typing.Optional[builtins.bool] = None,
4056
+ filter_encryption: typing.Optional[_IKey_5f11635f] = None,
3872
4057
  filters: typing.Optional[typing.Sequence[typing.Mapping[builtins.str, typing.Any]]] = None,
3873
4058
  max_record_age: typing.Optional[_Duration_4839e8c3] = None,
3874
4059
  on_failure: typing.Optional[_IEventSourceDlq_5e2c6ad9] = None,
@@ -3885,6 +4070,7 @@ def _typecheckingstub__9f81acc98c12b4967363bdd43130a7e674a566679a7b200f5ccd6a0ae
3885
4070
  *,
3886
4071
  starting_position_timestamp: typing.Optional[jsii.Number] = None,
3887
4072
  bisect_batch_on_error: typing.Optional[builtins.bool] = None,
4073
+ filter_encryption: typing.Optional[_IKey_5f11635f] = None,
3888
4074
  filters: typing.Optional[typing.Sequence[typing.Mapping[builtins.str, typing.Any]]] = None,
3889
4075
  max_record_age: typing.Optional[_Duration_4839e8c3] = None,
3890
4076
  on_failure: typing.Optional[_IEventSourceDlq_5e2c6ad9] = None,
@@ -3913,6 +4099,7 @@ def _typecheckingstub__a0e5c31953f1ef382a7863484f36982000428c40cc94325c4f41de1e3
3913
4099
  enabled: typing.Optional[builtins.bool] = None,
3914
4100
  max_batching_window: typing.Optional[_Duration_4839e8c3] = None,
3915
4101
  bisect_batch_on_error: typing.Optional[builtins.bool] = None,
4102
+ filter_encryption: typing.Optional[_IKey_5f11635f] = None,
3916
4103
  filters: typing.Optional[typing.Sequence[typing.Mapping[builtins.str, typing.Any]]] = None,
3917
4104
  max_record_age: typing.Optional[_Duration_4839e8c3] = None,
3918
4105
  on_failure: typing.Optional[_IEventSourceDlq_5e2c6ad9] = None,