aws-cdk-lib 2.151.0__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.

aws_cdk/_jsii/__init__.py CHANGED
@@ -19,7 +19,7 @@ import aws_cdk.asset_node_proxy_agent_v6._jsii
19
19
  import constructs._jsii
20
20
 
21
21
  __jsii_assembly__ = jsii.JSIIAssembly.load(
22
- "aws-cdk-lib", "2.151.0", __name__[0:-6], "aws-cdk-lib@2.151.0.jsii.tgz"
22
+ "aws-cdk-lib", "2.152.0", __name__[0:-6], "aws-cdk-lib@2.152.0.jsii.tgz"
23
23
  )
24
24
 
25
25
  __all__ = [
@@ -358,6 +358,7 @@ class EdgeFunction(
358
358
  bisect_batch_on_error: typing.Optional[builtins.bool] = None,
359
359
  enabled: typing.Optional[builtins.bool] = None,
360
360
  event_source_arn: typing.Optional[builtins.str] = None,
361
+ filter_encryption: typing.Optional[_IKey_5f11635f] = None,
361
362
  filters: typing.Optional[typing.Sequence[typing.Mapping[builtins.str, typing.Any]]] = None,
362
363
  kafka_bootstrap_servers: typing.Optional[typing.Sequence[builtins.str]] = None,
363
364
  kafka_consumer_group_id: typing.Optional[builtins.str] = None,
@@ -382,6 +383,7 @@ class EdgeFunction(
382
383
  :param bisect_batch_on_error: If the function returns an error, split the batch in two and retry. Default: false
383
384
  :param enabled: Set to false to disable the event source upon creation. Default: true
384
385
  :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
386
+ :param filter_encryption: Add Customer managed KMS key to encrypt Filter Criteria. Default: - none
385
387
  :param filters: Add filter criteria to Event Source. Default: - none
386
388
  :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
387
389
  :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
@@ -407,6 +409,7 @@ class EdgeFunction(
407
409
  bisect_batch_on_error=bisect_batch_on_error,
408
410
  enabled=enabled,
409
411
  event_source_arn=event_source_arn,
412
+ filter_encryption=filter_encryption,
410
413
  filters=filters,
411
414
  kafka_bootstrap_servers=kafka_bootstrap_servers,
412
415
  kafka_consumer_group_id=kafka_consumer_group_id,
@@ -1974,6 +1977,7 @@ def _typecheckingstub__e3a2f6769309cd3c52da869813738e2d4a94d233e574ada7ebba1654d
1974
1977
  bisect_batch_on_error: typing.Optional[builtins.bool] = None,
1975
1978
  enabled: typing.Optional[builtins.bool] = None,
1976
1979
  event_source_arn: typing.Optional[builtins.str] = None,
1980
+ filter_encryption: typing.Optional[_IKey_5f11635f] = None,
1977
1981
  filters: typing.Optional[typing.Sequence[typing.Mapping[builtins.str, typing.Any]]] = None,
1978
1982
  kafka_bootstrap_servers: typing.Optional[typing.Sequence[builtins.str]] = None,
1979
1983
  kafka_consumer_group_id: typing.Optional[builtins.str] = None,
@@ -9062,20 +9062,22 @@ class StreamViewType(enum.Enum):
9062
9062
 
9063
9063
  Example::
9064
9064
 
9065
- import aws_cdk as cdk
9066
- import aws_cdk.aws_kinesis as kinesis
9067
-
9065
+ import aws_cdk.aws_lambda_event_sources as eventsources
9066
+ import aws_cdk.aws_dynamodb as dynamodb
9068
9067
 
9069
- app = cdk.App()
9070
- stack = cdk.Stack(app, "Stack", env=cdk.Environment(region="us-west-2"))
9068
+ # fn: lambda.Function
9071
9069
 
9072
- global_table = dynamodb.TableV2(self, "GlobalTable",
9073
- partition_key=dynamodb.Attribute(name="id", type=dynamodb.AttributeType.STRING),
9074
- dynamo_stream=dynamodb.StreamViewType.OLD_IMAGE,
9075
- # tables in us-west-2, us-east-1, and us-east-2 all have dynamo stream type of OLD_IMAGES
9076
- replicas=[dynamodb.ReplicaTableProps(region="us-east-1"), dynamodb.ReplicaTableProps(region="us-east-2")
9077
- ]
9070
+ table = dynamodb.Table(self, "Table",
9071
+ partition_key=dynamodb.Attribute(
9072
+ name="id",
9073
+ type=dynamodb.AttributeType.STRING
9074
+ ),
9075
+ stream=dynamodb.StreamViewType.NEW_IMAGE
9078
9076
  )
9077
+ fn.add_event_source(eventsources.DynamoEventSource(table,
9078
+ starting_position=lambda_.StartingPosition.LATEST,
9079
+ filters=[lambda_.FilterCriteria.filter({"event_name": lambda_.FilterRule.is_equal("INSERT")})]
9080
+ ))
9079
9081
  '''
9080
9082
 
9081
9083
  NEW_IMAGE = "NEW_IMAGE"
@@ -12043,30 +12045,27 @@ class TableProps(TableOptions):
12043
12045
 
12044
12046
  Example::
12045
12047
 
12046
- import aws_cdk as cdk
12047
- import aws_cdk.aws_s3 as s3
12048
-
12049
- # bucket: s3.IBucket
12048
+ import aws_cdk.aws_lambda_event_sources as eventsources
12049
+ import aws_cdk.aws_dynamodb as dynamodb
12050
+ from aws_cdk.aws_kms import Key
12050
12051
 
12052
+ # fn: lambda.Function
12051
12053
 
12052
- app = cdk.App()
12053
- stack = cdk.Stack(app, "Stack")
12054
-
12055
- dynamodb.Table(stack, "Table",
12054
+ table = dynamodb.Table(self, "Table",
12056
12055
  partition_key=dynamodb.Attribute(
12057
12056
  name="id",
12058
12057
  type=dynamodb.AttributeType.STRING
12059
12058
  ),
12060
- import_source=dynamodb.ImportSourceSpecification(
12061
- compression_type=dynamodb.InputCompressionType.GZIP,
12062
- input_format=dynamodb.InputFormat.csv(
12063
- delimiter=",",
12064
- header_list=["id", "name"]
12065
- ),
12066
- bucket=bucket,
12067
- key_prefix="prefix"
12068
- )
12059
+ stream=dynamodb.StreamViewType.NEW_IMAGE
12069
12060
  )
12061
+ # Your self managed KMS key
12062
+ my_key = Key.from_key_arn(self, "SourceBucketEncryptionKey", "arn:aws:kms:us-east-1:123456789012:key/<key-id>")
12063
+
12064
+ fn.add_event_source(eventsources.DynamoEventSource(table,
12065
+ starting_position=lambda_.StartingPosition.LATEST,
12066
+ filters=[lambda_.FilterCriteria.filter({"event_name": lambda_.FilterRule.is_equal("INSERT")})],
12067
+ filter_encryption=my_key
12068
+ ))
12070
12069
  '''
12071
12070
  if isinstance(partition_key, dict):
12072
12071
  partition_key = Attribute(**partition_key)
@@ -14176,30 +14175,27 @@ class Table(
14176
14175
 
14177
14176
  Example::
14178
14177
 
14179
- import aws_cdk as cdk
14180
- import aws_cdk.aws_s3 as s3
14181
-
14182
- # bucket: s3.IBucket
14178
+ import aws_cdk.aws_lambda_event_sources as eventsources
14179
+ import aws_cdk.aws_dynamodb as dynamodb
14180
+ from aws_cdk.aws_kms import Key
14183
14181
 
14182
+ # fn: lambda.Function
14184
14183
 
14185
- app = cdk.App()
14186
- stack = cdk.Stack(app, "Stack")
14187
-
14188
- dynamodb.Table(stack, "Table",
14184
+ table = dynamodb.Table(self, "Table",
14189
14185
  partition_key=dynamodb.Attribute(
14190
14186
  name="id",
14191
14187
  type=dynamodb.AttributeType.STRING
14192
14188
  ),
14193
- import_source=dynamodb.ImportSourceSpecification(
14194
- compression_type=dynamodb.InputCompressionType.GZIP,
14195
- input_format=dynamodb.InputFormat.csv(
14196
- delimiter=",",
14197
- header_list=["id", "name"]
14198
- ),
14199
- bucket=bucket,
14200
- key_prefix="prefix"
14201
- )
14189
+ stream=dynamodb.StreamViewType.NEW_IMAGE
14202
14190
  )
14191
+ # Your self managed KMS key
14192
+ my_key = Key.from_key_arn(self, "SourceBucketEncryptionKey", "arn:aws:kms:us-east-1:123456789012:key/<key-id>")
14193
+
14194
+ fn.add_event_source(eventsources.DynamoEventSource(table,
14195
+ starting_position=lambda_.StartingPosition.LATEST,
14196
+ filters=[lambda_.FilterCriteria.filter({"event_name": lambda_.FilterRule.is_equal("INSERT")})],
14197
+ filter_encryption=my_key
14198
+ ))
14203
14199
  '''
14204
14200
 
14205
14201
  def __init__(
@@ -517,7 +517,7 @@ To grant a principal permission to run your `TaskDefinition`, you can use the `T
517
517
  # role: iam.IGrantable
518
518
 
519
519
  task_def = ecs.TaskDefinition(self, "TaskDef",
520
- cpu="256",
520
+ cpu="512",
521
521
  memory_mi_b="512",
522
522
  compatibility=ecs.Compatibility.EC2_AND_FARGATE
523
523
  )