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

Files changed (69) hide show
  1. aws_cdk/__init__.py +70 -71
  2. aws_cdk/_jsii/__init__.py +1 -1
  3. aws_cdk/_jsii/{aws-cdk-lib@2.201.0.jsii.tgz → aws-cdk-lib@2.203.0.jsii.tgz} +0 -0
  4. aws_cdk/aws_accessanalyzer/__init__.py +310 -4
  5. aws_cdk/aws_aiops/__init__.py +964 -0
  6. aws_cdk/aws_amplify/__init__.py +127 -0
  7. aws_cdk/aws_arczonalshift/__init__.py +8 -8
  8. aws_cdk/aws_athena/__init__.py +12 -11
  9. aws_cdk/aws_b2bi/__init__.py +782 -3
  10. aws_cdk/aws_backup/__init__.py +22 -0
  11. aws_cdk/aws_batch/__init__.py +53 -1
  12. aws_cdk/aws_bedrock/__init__.py +123 -9
  13. aws_cdk/aws_cleanrooms/__init__.py +157 -154
  14. aws_cdk/aws_cloudformation/__init__.py +28 -28
  15. aws_cdk/aws_cloudfront/__init__.py +92 -57
  16. aws_cdk/aws_cloudfront/experimental/__init__.py +42 -3
  17. aws_cdk/aws_cloudwatch/__init__.py +228 -2
  18. aws_cdk/aws_connect/__init__.py +120 -8
  19. aws_cdk/aws_connectcampaignsv2/__init__.py +25 -4
  20. aws_cdk/aws_customerprofiles/__init__.py +150 -30
  21. aws_cdk/aws_datazone/__init__.py +23 -4
  22. aws_cdk/aws_deadline/__init__.py +4 -4
  23. aws_cdk/aws_dsql/__init__.py +148 -0
  24. aws_cdk/aws_ec2/__init__.py +321 -19
  25. aws_cdk/aws_ecr/__init__.py +3 -3
  26. aws_cdk/aws_ecs/__init__.py +48 -13
  27. aws_cdk/aws_efs/__init__.py +17 -6
  28. aws_cdk/aws_eks/__init__.py +180 -158
  29. aws_cdk/aws_elasticloadbalancingv2/__init__.py +4 -2
  30. aws_cdk/aws_emrserverless/__init__.py +118 -0
  31. aws_cdk/aws_fsx/__init__.py +891 -0
  32. aws_cdk/aws_glue/__init__.py +58 -24
  33. aws_cdk/aws_iam/__init__.py +11 -11
  34. aws_cdk/aws_inspectorv2/__init__.py +442 -3
  35. aws_cdk/aws_kendra/__init__.py +10 -5
  36. aws_cdk/aws_kms/__init__.py +24 -12
  37. aws_cdk/aws_lambda/__init__.py +938 -36
  38. aws_cdk/aws_lambda_event_sources/__init__.py +638 -1
  39. aws_cdk/aws_lambda_nodejs/__init__.py +37 -3
  40. aws_cdk/aws_lex/__init__.py +703 -0
  41. aws_cdk/aws_logs/__init__.py +144 -0
  42. aws_cdk/aws_mediatailor/__init__.py +399 -0
  43. aws_cdk/aws_mpa/__init__.py +1475 -0
  44. aws_cdk/aws_msk/__init__.py +21 -2
  45. aws_cdk/aws_mwaa/__init__.py +45 -2
  46. aws_cdk/aws_networkfirewall/__init__.py +4 -2
  47. aws_cdk/aws_networkmanager/__init__.py +51 -3
  48. aws_cdk/aws_opsworkscm/__init__.py +44 -2
  49. aws_cdk/aws_rds/__init__.py +175 -42
  50. aws_cdk/aws_redshiftserverless/__init__.py +632 -0
  51. aws_cdk/aws_route53resolver/__init__.py +58 -10
  52. aws_cdk/aws_s3/__init__.py +19 -1
  53. aws_cdk/aws_s3tables/__init__.py +230 -0
  54. aws_cdk/aws_sagemaker/__init__.py +14 -10
  55. aws_cdk/aws_securityhub/__init__.py +2887 -56
  56. aws_cdk/aws_synthetics/__init__.py +21 -0
  57. aws_cdk/aws_vpclattice/__init__.py +6 -4
  58. aws_cdk/aws_wafv2/__init__.py +849 -18
  59. aws_cdk/aws_workspacesinstances/__init__.py +3243 -0
  60. aws_cdk/cloud_assembly_schema/__init__.py +200 -4
  61. aws_cdk/cx_api/__init__.py +29 -14
  62. aws_cdk/pipelines/__init__.py +178 -41
  63. aws_cdk/triggers/__init__.py +41 -4
  64. {aws_cdk_lib-2.201.0.dist-info → aws_cdk_lib-2.203.0.dist-info}/METADATA +3 -3
  65. {aws_cdk_lib-2.201.0.dist-info → aws_cdk_lib-2.203.0.dist-info}/RECORD +69 -66
  66. {aws_cdk_lib-2.201.0.dist-info → aws_cdk_lib-2.203.0.dist-info}/LICENSE +0 -0
  67. {aws_cdk_lib-2.201.0.dist-info → aws_cdk_lib-2.203.0.dist-info}/NOTICE +0 -0
  68. {aws_cdk_lib-2.201.0.dist-info → aws_cdk_lib-2.203.0.dist-info}/WHEEL +0 -0
  69. {aws_cdk_lib-2.201.0.dist-info → aws_cdk_lib-2.203.0.dist-info}/top_level.txt +0 -0
@@ -292,6 +292,23 @@ const fn = new lambda.Function(this, 'MyFunctionWithFFTrue', {
292
292
  cdk.Tags.of(fn).add('env', 'dev'); // the tag is also added to the log group
293
293
  ```
294
294
 
295
+ ### Log removal policy
296
+
297
+ When using the deprecated `logRetention` property for creating a LogGroup, you can configure log removal policy:
298
+
299
+ ```python
300
+ import aws_cdk.aws_logs as logs
301
+
302
+
303
+ fn = lambda_.Function(self, "MyFunctionWithFFTrue",
304
+ runtime=lambda_.Runtime.NODEJS_LATEST,
305
+ handler="handler.main",
306
+ code=lambda_.Code.from_asset("lambda"),
307
+ log_retention=logs.RetentionDays.INFINITE,
308
+ log_removal_policy=RemovalPolicy.RETAIN
309
+ )
310
+ ```
311
+
295
312
  ## Resource-based Policies
296
313
 
297
314
  AWS Lambda supports resource-based policies for controlling access to Lambda
@@ -4414,6 +4431,8 @@ class CfnEventInvokeConfig(
4414
4431
  ) -> None:
4415
4432
  '''A configuration object that specifies the destination of an event after Lambda processes it.
4416
4433
 
4434
+ For more information, see `Adding a destination <https://docs.aws.amazon.com/lambda/latest/dg/invocation-async-retain-records.html#invocation-async-destinations>`_ .
4435
+
4417
4436
  :param on_failure: The destination configuration for failed invocations. .. epigraph:: When using an Amazon SQS queue as a destination, FIFO queues cannot be used.
4418
4437
  :param on_success: The destination configuration for successful invocations. .. epigraph:: When using an Amazon SQS queue as a destination, FIFO queues cannot be used.
4419
4438
 
@@ -4495,7 +4514,7 @@ class CfnEventInvokeConfig(
4495
4514
  def __init__(self, *, destination: builtins.str) -> None:
4496
4515
  '''A destination for events that failed processing.
4497
4516
 
4498
- See `Capturing records of Lambda asynchronous invocations <https://docs.aws.amazon.com/lambda/latest/dg/invocation-async-retain-records.html>`_ for more information.
4517
+ For more information, see `Adding a destination <https://docs.aws.amazon.com/lambda/latest/dg/invocation-async-retain-records.html#invocation-async-destinations>`_ .
4499
4518
 
4500
4519
  :param destination: The Amazon Resource Name (ARN) of the destination resource. To retain records of unsuccessful `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, Amazon S3 bucket, Lambda function, or Amazon EventBridge event bus as the destination. To retain records of failed invocations from `Kinesis <https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html>`_ , `DynamoDB <https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html>`_ , `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.
4501
4520
 
@@ -4554,6 +4573,9 @@ class CfnEventInvokeConfig(
4554
4573
  '''A destination for events that were processed successfully.
4555
4574
 
4556
4575
  To retain records of successful `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.
4576
+ .. epigraph::
4577
+
4578
+ ``OnSuccess`` is not supported in ``CreateEventSourceMapping`` or ``UpdateEventSourceMapping`` requests.
4557
4579
 
4558
4580
  :param destination: The Amazon Resource Name (ARN) of the destination resource.
4559
4581
 
@@ -5475,7 +5497,7 @@ class CfnEventSourceMapping(
5475
5497
  '''Specific configuration settings for an Amazon Managed Streaming for Apache Kafka (Amazon MSK) event source.
5476
5498
 
5477
5499
  :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>`_ .
5478
- :param schema_registry_config:
5500
+ :param schema_registry_config: Specific configuration settings for a Kafka schema registry.
5479
5501
 
5480
5502
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-amazonmanagedkafkaeventsourceconfig.html
5481
5503
  :exampleMetadata: fixture=_generated
@@ -5526,7 +5548,8 @@ class CfnEventSourceMapping(
5526
5548
  def schema_registry_config(
5527
5549
  self,
5528
5550
  ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnEventSourceMapping.SchemaRegistryConfigProperty"]]:
5529
- '''
5551
+ '''Specific configuration settings for a Kafka schema registry.
5552
+
5530
5553
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-amazonmanagedkafkaeventsourceconfig.html#cfn-lambda-eventsourcemapping-amazonmanagedkafkaeventsourceconfig-schemaregistryconfig
5531
5554
  '''
5532
5555
  result = self._values.get("schema_registry_config")
@@ -5556,6 +5579,8 @@ class CfnEventSourceMapping(
5556
5579
  ) -> None:
5557
5580
  '''A configuration object that specifies the destination of an event after Lambda processes it.
5558
5581
 
5582
+ For more information, see `Adding a destination <https://docs.aws.amazon.com/lambda/latest/dg/invocation-async-retain-records.html#invocation-async-destinations>`_ .
5583
+
5559
5584
  :param on_failure: The destination configuration for failed invocations.
5560
5585
 
5561
5586
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-destinationconfig.html
@@ -5934,7 +5959,7 @@ class CfnEventSourceMapping(
5934
5959
  ) -> None:
5935
5960
  '''A destination for events that failed processing.
5936
5961
 
5937
- See `Capturing records of Lambda asynchronous invocations <https://docs.aws.amazon.com/lambda/latest/dg/invocation-async-retain-records.html>`_ for more information.
5962
+ For more information, see `Adding a destination <https://docs.aws.amazon.com/lambda/latest/dg/invocation-async-retain-records.html#invocation-async-destinations>`_ .
5938
5963
 
5939
5964
  :param destination: The Amazon Resource Name (ARN) of the destination resource. To retain records of unsuccessful `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, Amazon S3 bucket, Lambda function, or Amazon EventBridge event bus as the destination. To retain records of failed invocations from `Kinesis <https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html>`_ , `DynamoDB <https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html>`_ , `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.
5940
5965
 
@@ -6124,7 +6149,12 @@ class CfnEventSourceMapping(
6124
6149
  type: typing.Optional[builtins.str] = None,
6125
6150
  uri: typing.Optional[builtins.str] = None,
6126
6151
  ) -> None:
6127
- '''
6152
+ '''Specific access configuration settings that tell Lambda how to authenticate with your schema registry.
6153
+
6154
+ If you're working with an AWS Glue schema registry, don't provide authentication details in this object. Instead, ensure that your execution role has the required permissions for Lambda to access your cluster.
6155
+
6156
+ If you're working with a Confluent schema registry, choose the authentication method in the ``Type`` field, and provide the AWS Secrets Manager secret ARN in the ``URI`` field.
6157
+
6128
6158
  :param type: The type of authentication Lambda uses to access your schema registry.
6129
6159
  :param uri: The URI of the secret (Secrets Manager secret ARN) to authenticate with your schema registry.
6130
6160
 
@@ -6200,10 +6230,11 @@ class CfnEventSourceMapping(
6200
6230
  schema_registry_uri: typing.Optional[builtins.str] = None,
6201
6231
  schema_validation_configs: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Sequence[typing.Union[_IResolvable_da3f097b, typing.Union["CfnEventSourceMapping.SchemaValidationConfigProperty", typing.Dict[builtins.str, typing.Any]]]]]] = None,
6202
6232
  ) -> None:
6203
- '''
6233
+ '''Specific configuration settings for a Kafka schema registry.
6234
+
6204
6235
  :param access_configs: An array of access configuration objects that tell Lambda how to authenticate with your schema registry.
6205
- :param event_record_format: The record format that Lambda delivers to your function after schema validation.
6206
- :param schema_registry_uri: The URI for your schema registry. The correct URI format depends on the type of schema registry you're using.
6236
+ :param event_record_format: The record format that Lambda delivers to your function after schema validation. - Choose ``JSON`` to have Lambda deliver the record to your function as a standard JSON object. - Choose ``SOURCE`` to have Lambda deliver the record to your function in its original source format. Lambda removes all schema metadata, such as the schema ID, before sending the record to your function.
6237
+ :param schema_registry_uri: The URI for your schema registry. The correct URI format depends on the type of schema registry you're using. - For AWS Glue schema registries, use the ARN of the registry. - For Confluent schema registries, use the URL of the registry.
6207
6238
  :param schema_validation_configs: An array of schema validation configuration objects, which tell Lambda the message attributes you want to validate and filter using your schema registry.
6208
6239
 
6209
6240
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-schemaregistryconfig.html
@@ -6258,6 +6289,9 @@ class CfnEventSourceMapping(
6258
6289
  def event_record_format(self) -> typing.Optional[builtins.str]:
6259
6290
  '''The record format that Lambda delivers to your function after schema validation.
6260
6291
 
6292
+ - Choose ``JSON`` to have Lambda deliver the record to your function as a standard JSON object.
6293
+ - Choose ``SOURCE`` to have Lambda deliver the record to your function in its original source format. Lambda removes all schema metadata, such as the schema ID, before sending the record to your function.
6294
+
6261
6295
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-schemaregistryconfig.html#cfn-lambda-eventsourcemapping-schemaregistryconfig-eventrecordformat
6262
6296
  '''
6263
6297
  result = self._values.get("event_record_format")
@@ -6265,9 +6299,10 @@ class CfnEventSourceMapping(
6265
6299
 
6266
6300
  @builtins.property
6267
6301
  def schema_registry_uri(self) -> typing.Optional[builtins.str]:
6268
- '''The URI for your schema registry.
6302
+ '''The URI for your schema registry. The correct URI format depends on the type of schema registry you're using.
6269
6303
 
6270
- The correct URI format depends on the type of schema registry you're using.
6304
+ - For AWS Glue schema registries, use the ARN of the registry.
6305
+ - For Confluent schema registries, use the URL of the registry.
6271
6306
 
6272
6307
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-schemaregistryconfig.html#cfn-lambda-eventsourcemapping-schemaregistryconfig-schemaregistryuri
6273
6308
  '''
@@ -6303,8 +6338,9 @@ class CfnEventSourceMapping(
6303
6338
  )
6304
6339
  class SchemaValidationConfigProperty:
6305
6340
  def __init__(self, *, attribute: typing.Optional[builtins.str] = None) -> None:
6306
- '''
6307
- :param attribute: The attribute you want your schema registry to validate and filter for.
6341
+ '''Specific schema validation configuration settings that tell Lambda the message attributes you want to validate and filter using your schema registry.
6342
+
6343
+ :param attribute: The attributes you want your schema registry to validate and filter for. If you selected ``JSON`` as the ``EventRecordFormat`` , Lambda also deserializes the selected message attributes.
6308
6344
 
6309
6345
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-schemavalidationconfig.html
6310
6346
  :exampleMetadata: fixture=_generated
@@ -6328,7 +6364,9 @@ class CfnEventSourceMapping(
6328
6364
 
6329
6365
  @builtins.property
6330
6366
  def attribute(self) -> typing.Optional[builtins.str]:
6331
- '''The attribute you want your schema registry to validate and filter for.
6367
+ '''The attributes you want your schema registry to validate and filter for.
6368
+
6369
+ If you selected ``JSON`` as the ``EventRecordFormat`` , Lambda also deserializes the selected message attributes.
6332
6370
 
6333
6371
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-schemavalidationconfig.html#cfn-lambda-eventsourcemapping-schemavalidationconfig-attribute
6334
6372
  '''
@@ -6423,7 +6461,7 @@ class CfnEventSourceMapping(
6423
6461
  '''Specific configuration settings for a self-managed Apache Kafka event source.
6424
6462
 
6425
6463
  :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-kafka-process.html#services-smaa-topic-add>`_ .
6426
- :param schema_registry_config:
6464
+ :param schema_registry_config: Specific configuration settings for a Kafka schema registry.
6427
6465
 
6428
6466
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-selfmanagedkafkaeventsourceconfig.html
6429
6467
  :exampleMetadata: fixture=_generated
@@ -6474,7 +6512,8 @@ class CfnEventSourceMapping(
6474
6512
  def schema_registry_config(
6475
6513
  self,
6476
6514
  ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnEventSourceMapping.SchemaRegistryConfigProperty"]]:
6477
- '''
6515
+ '''Specific configuration settings for a Kafka schema registry.
6516
+
6478
6517
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-selfmanagedkafkaeventsourceconfig.html#cfn-lambda-eventsourcemapping-selfmanagedkafkaeventsourceconfig-schemaregistryconfig
6479
6518
  '''
6480
6519
  result = self._values.get("schema_registry_config")
@@ -11831,6 +11870,9 @@ class Code(metaclass=jsii.JSIIAbstractClass, jsii_type="aws-cdk-lib.aws_lambda.C
11831
11870
  ) -> "S3Code":
11832
11871
  '''Lambda handler code as an S3 object.
11833
11872
 
11873
+ Note: If ``objectVersion`` is not defined, the lambda will not be updated automatically if the code in the bucket is updated.
11874
+ This is because CDK/Cloudformation does not track changes on the source S3 Bucket. It is recommended to either use S3Code.fromAsset() instead or set objectVersion.
11875
+
11834
11876
  :param bucket: The S3 bucket.
11835
11877
  :param key: The object key.
11836
11878
  :param object_version: Optional S3 object version.
@@ -11854,6 +11896,9 @@ class Code(metaclass=jsii.JSIIAbstractClass, jsii_type="aws-cdk-lib.aws_lambda.C
11854
11896
  ) -> "S3CodeV2":
11855
11897
  '''Lambda handler code as an S3 object.
11856
11898
 
11899
+ Note: If ``options.objectVersion`` is not defined, the lambda will not be updated automatically if the code in the bucket is updated.
11900
+ This is because CDK/Cloudformation does not track changes on the source S3 Bucket. It is recommended to either use S3Code.fromAsset() instead or set objectVersion.
11901
+
11857
11902
  :param bucket: The S3 bucket.
11858
11903
  :param key: The object key.
11859
11904
  :param object_version: Optional S3 object version.
@@ -13868,6 +13913,78 @@ class EventInvokeConfigProps(EventInvokeConfigOptions):
13868
13913
  )
13869
13914
 
13870
13915
 
13916
+ class EventRecordFormat(
13917
+ metaclass=jsii.JSIIMeta,
13918
+ jsii_type="aws-cdk-lib.aws_lambda.EventRecordFormat",
13919
+ ):
13920
+ '''The format target function should recieve record in.
13921
+
13922
+ :exampleMetadata: infused
13923
+
13924
+ Example::
13925
+
13926
+ from aws_cdk.aws_lambda_event_sources import ManagedKafkaEventSource, ConfluentSchemaRegistry
13927
+ from aws_cdk.aws_secretsmanager import Secret
13928
+
13929
+ # Your MSK cluster arn
13930
+ # cluster_arn: str
13931
+
13932
+ # my_function: lambda.Function
13933
+
13934
+
13935
+ # The Kafka topic you want to subscribe to
13936
+ topic = "some-cool-topic"
13937
+
13938
+ secret = Secret(self, "Secret", secret_name="AmazonMSK_KafkaSecret")
13939
+ my_function.add_event_source(ManagedKafkaEventSource(
13940
+ cluster_arn=cluster_arn,
13941
+ topic=topic,
13942
+ starting_position=lambda_.StartingPosition.TRIM_HORIZON,
13943
+ provisioned_poller_config=ProvisionedPollerConfig(
13944
+ minimum_pollers=1,
13945
+ maximum_pollers=3
13946
+ ),
13947
+ schema_registry_config=ConfluentSchemaRegistry(
13948
+ schema_registry_uri="https://example.com",
13949
+ event_record_format=lambda_.EventRecordFormat.JSON,
13950
+ authentication_type=lambda_.KafkaSchemaRegistryAccessConfigType.BASIC_AUTH,
13951
+ secret=secret,
13952
+ schema_validation_configs=[lambda.KafkaSchemaValidationConfig(attribute=lambda_.KafkaSchemaValidationAttribute.KEY)]
13953
+ )
13954
+ ))
13955
+ '''
13956
+
13957
+ @jsii.member(jsii_name="of")
13958
+ @builtins.classmethod
13959
+ def of(cls, name: builtins.str) -> "EventRecordFormat":
13960
+ '''A custom event record format.
13961
+
13962
+ :param name: -
13963
+ '''
13964
+ if __debug__:
13965
+ type_hints = typing.get_type_hints(_typecheckingstub__913b83169547e1e27e0d17d4e5a189f10545dca54ca45db7a5dc40a7d5cc2999)
13966
+ check_type(argname="argument name", value=name, expected_type=type_hints["name"])
13967
+ return typing.cast("EventRecordFormat", jsii.sinvoke(cls, "of", [name]))
13968
+
13969
+ @jsii.python.classproperty
13970
+ @jsii.member(jsii_name="JSON")
13971
+ def JSON(cls) -> "EventRecordFormat":
13972
+ '''The target function will recieve records as json objects.'''
13973
+ return typing.cast("EventRecordFormat", jsii.sget(cls, "JSON"))
13974
+
13975
+ @jsii.python.classproperty
13976
+ @jsii.member(jsii_name="SOURCE")
13977
+ def SOURCE(cls) -> "EventRecordFormat":
13978
+ '''The target function will recieve records in same format as the schema source.'''
13979
+ return typing.cast("EventRecordFormat", jsii.sget(cls, "SOURCE"))
13980
+
13981
+ @builtins.property
13982
+ @jsii.member(jsii_name="value")
13983
+ def value(self) -> builtins.str:
13984
+ '''The enum to use in ``SchemaRegistryConfig.EventRecordFormat`` property in CloudFormation.'''
13985
+ return typing.cast(builtins.str, jsii.get(self, "value"))
13986
+
13987
+
13871
13988
  @jsii.data_type(
13872
13989
  jsii_type="aws-cdk-lib.aws_lambda.EventSourceMappingOptions",
13873
13990
  jsii_struct_bases=[],
@@ -13890,6 +14007,7 @@ class EventInvokeConfigProps(EventInvokeConfigOptions):
13890
14007
  "provisioned_poller_config": "provisionedPollerConfig",
13891
14008
  "report_batch_item_failures": "reportBatchItemFailures",
13892
14009
  "retry_attempts": "retryAttempts",
14010
+ "schema_registry_config": "schemaRegistryConfig",
13893
14011
  "source_access_configurations": "sourceAccessConfigurations",
13894
14012
  "starting_position": "startingPosition",
13895
14013
  "starting_position_timestamp": "startingPositionTimestamp",
@@ -13919,6 +14037,7 @@ class EventSourceMappingOptions:
13919
14037
  provisioned_poller_config: typing.Optional[typing.Union["ProvisionedPollerConfig", typing.Dict[builtins.str, typing.Any]]] = None,
13920
14038
  report_batch_item_failures: typing.Optional[builtins.bool] = None,
13921
14039
  retry_attempts: typing.Optional[jsii.Number] = None,
14040
+ schema_registry_config: typing.Optional["ISchemaRegistry"] = None,
13922
14041
  source_access_configurations: typing.Optional[typing.Sequence[typing.Union["SourceAccessConfiguration", typing.Dict[builtins.str, typing.Any]]]] = None,
13923
14042
  starting_position: typing.Optional["StartingPosition"] = None,
13924
14043
  starting_position_timestamp: typing.Optional[jsii.Number] = None,
@@ -13944,6 +14063,7 @@ class EventSourceMappingOptions:
13944
14063
  :param provisioned_poller_config: Configuration for provisioned pollers that read from the event source. When specified, allows control over the minimum and maximum number of pollers that can be provisioned to process events from the source. Default: - no provisioned pollers
13945
14064
  :param report_batch_item_failures: Allow functions to return partially successful responses for a batch of records. Default: false
13946
14065
  :param retry_attempts: The maximum number of times to retry when the function returns an error. Set to ``undefined`` if you want lambda to keep retrying infinitely or until the record expires. Valid Range: - Minimum value of 0 - Maximum value of 10000 Default: - infinite or until the record expires.
14066
+ :param schema_registry_config: Specific configuration settings for a Kafka schema registry. Default: - none
13947
14067
  :param source_access_configurations: Specific settings like the authentication protocol or the VPC components to secure access to your event source. Default: - none
13948
14068
  :param starting_position: The position in the DynamoDB, Kinesis or MSK stream where AWS Lambda should start reading. Default: - no starting position
13949
14069
  :param starting_position_timestamp: The time from which to start reading, in Unix time seconds. Default: - no timestamp
@@ -13963,6 +14083,7 @@ class EventSourceMappingOptions:
13963
14083
  # event_source_dlq: lambda.IEventSourceDlq
13964
14084
  # filters: Any
13965
14085
  # key: kms.Key
14086
+ # schema_registry: lambda.ISchemaRegistry
13966
14087
  # source_access_configuration_type: lambda.SourceAccessConfigurationType
13967
14088
 
13968
14089
  event_source_mapping_options = lambda.EventSourceMappingOptions(
@@ -13991,6 +14112,7 @@ class EventSourceMappingOptions:
13991
14112
  ),
13992
14113
  report_batch_item_failures=False,
13993
14114
  retry_attempts=123,
14115
+ schema_registry_config=schema_registry,
13994
14116
  source_access_configurations=[lambda.SourceAccessConfiguration(
13995
14117
  type=source_access_configuration_type,
13996
14118
  uri="uri"
@@ -14025,6 +14147,7 @@ class EventSourceMappingOptions:
14025
14147
  check_type(argname="argument provisioned_poller_config", value=provisioned_poller_config, expected_type=type_hints["provisioned_poller_config"])
14026
14148
  check_type(argname="argument report_batch_item_failures", value=report_batch_item_failures, expected_type=type_hints["report_batch_item_failures"])
14027
14149
  check_type(argname="argument retry_attempts", value=retry_attempts, expected_type=type_hints["retry_attempts"])
14150
+ check_type(argname="argument schema_registry_config", value=schema_registry_config, expected_type=type_hints["schema_registry_config"])
14028
14151
  check_type(argname="argument source_access_configurations", value=source_access_configurations, expected_type=type_hints["source_access_configurations"])
14029
14152
  check_type(argname="argument starting_position", value=starting_position, expected_type=type_hints["starting_position"])
14030
14153
  check_type(argname="argument starting_position_timestamp", value=starting_position_timestamp, expected_type=type_hints["starting_position_timestamp"])
@@ -14067,6 +14190,8 @@ class EventSourceMappingOptions:
14067
14190
  self._values["report_batch_item_failures"] = report_batch_item_failures
14068
14191
  if retry_attempts is not None:
14069
14192
  self._values["retry_attempts"] = retry_attempts
14193
+ if schema_registry_config is not None:
14194
+ self._values["schema_registry_config"] = schema_registry_config
14070
14195
  if source_access_configurations is not None:
14071
14196
  self._values["source_access_configurations"] = source_access_configurations
14072
14197
  if starting_position is not None:
@@ -14294,6 +14419,15 @@ class EventSourceMappingOptions:
14294
14419
  result = self._values.get("retry_attempts")
14295
14420
  return typing.cast(typing.Optional[jsii.Number], result)
14296
14421
 
14422
+ @builtins.property
14423
+ def schema_registry_config(self) -> typing.Optional["ISchemaRegistry"]:
14424
+ '''Specific configuration settings for a Kafka schema registry.
14425
+
14426
+ :default: - none
14427
+ '''
14428
+ result = self._values.get("schema_registry_config")
14429
+ return typing.cast(typing.Optional["ISchemaRegistry"], result)
14430
+
14297
14431
  @builtins.property
14298
14432
  def source_access_configurations(
14299
14433
  self,
@@ -14387,6 +14521,7 @@ class EventSourceMappingOptions:
14387
14521
  "provisioned_poller_config": "provisionedPollerConfig",
14388
14522
  "report_batch_item_failures": "reportBatchItemFailures",
14389
14523
  "retry_attempts": "retryAttempts",
14524
+ "schema_registry_config": "schemaRegistryConfig",
14390
14525
  "source_access_configurations": "sourceAccessConfigurations",
14391
14526
  "starting_position": "startingPosition",
14392
14527
  "starting_position_timestamp": "startingPositionTimestamp",
@@ -14417,6 +14552,7 @@ class EventSourceMappingProps(EventSourceMappingOptions):
14417
14552
  provisioned_poller_config: typing.Optional[typing.Union["ProvisionedPollerConfig", typing.Dict[builtins.str, typing.Any]]] = None,
14418
14553
  report_batch_item_failures: typing.Optional[builtins.bool] = None,
14419
14554
  retry_attempts: typing.Optional[jsii.Number] = None,
14555
+ schema_registry_config: typing.Optional["ISchemaRegistry"] = None,
14420
14556
  source_access_configurations: typing.Optional[typing.Sequence[typing.Union["SourceAccessConfiguration", typing.Dict[builtins.str, typing.Any]]]] = None,
14421
14557
  starting_position: typing.Optional["StartingPosition"] = None,
14422
14558
  starting_position_timestamp: typing.Optional[jsii.Number] = None,
@@ -14444,6 +14580,7 @@ class EventSourceMappingProps(EventSourceMappingOptions):
14444
14580
  :param provisioned_poller_config: Configuration for provisioned pollers that read from the event source. When specified, allows control over the minimum and maximum number of pollers that can be provisioned to process events from the source. Default: - no provisioned pollers
14445
14581
  :param report_batch_item_failures: Allow functions to return partially successful responses for a batch of records. Default: false
14446
14582
  :param retry_attempts: The maximum number of times to retry when the function returns an error. Set to ``undefined`` if you want lambda to keep retrying infinitely or until the record expires. Valid Range: - Minimum value of 0 - Maximum value of 10000 Default: - infinite or until the record expires.
14583
+ :param schema_registry_config: Specific configuration settings for a Kafka schema registry. Default: - none
14447
14584
  :param source_access_configurations: Specific settings like the authentication protocol or the VPC components to secure access to your event source. Default: - none
14448
14585
  :param starting_position: The position in the DynamoDB, Kinesis or MSK stream where AWS Lambda should start reading. Default: - no starting position
14449
14586
  :param starting_position_timestamp: The time from which to start reading, in Unix time seconds. Default: - no timestamp
@@ -14465,6 +14602,7 @@ class EventSourceMappingProps(EventSourceMappingOptions):
14465
14602
  # filters: Any
14466
14603
  # function_: lambda.Function
14467
14604
  # key: kms.Key
14605
+ # schema_registry: lambda.ISchemaRegistry
14468
14606
  # source_access_configuration_type: lambda.SourceAccessConfigurationType
14469
14607
 
14470
14608
  event_source_mapping_props = lambda.EventSourceMappingProps(
@@ -14496,6 +14634,7 @@ class EventSourceMappingProps(EventSourceMappingOptions):
14496
14634
  ),
14497
14635
  report_batch_item_failures=False,
14498
14636
  retry_attempts=123,
14637
+ schema_registry_config=schema_registry,
14499
14638
  source_access_configurations=[lambda.SourceAccessConfiguration(
14500
14639
  type=source_access_configuration_type,
14501
14640
  uri="uri"
@@ -14530,6 +14669,7 @@ class EventSourceMappingProps(EventSourceMappingOptions):
14530
14669
  check_type(argname="argument provisioned_poller_config", value=provisioned_poller_config, expected_type=type_hints["provisioned_poller_config"])
14531
14670
  check_type(argname="argument report_batch_item_failures", value=report_batch_item_failures, expected_type=type_hints["report_batch_item_failures"])
14532
14671
  check_type(argname="argument retry_attempts", value=retry_attempts, expected_type=type_hints["retry_attempts"])
14672
+ check_type(argname="argument schema_registry_config", value=schema_registry_config, expected_type=type_hints["schema_registry_config"])
14533
14673
  check_type(argname="argument source_access_configurations", value=source_access_configurations, expected_type=type_hints["source_access_configurations"])
14534
14674
  check_type(argname="argument starting_position", value=starting_position, expected_type=type_hints["starting_position"])
14535
14675
  check_type(argname="argument starting_position_timestamp", value=starting_position_timestamp, expected_type=type_hints["starting_position_timestamp"])
@@ -14575,6 +14715,8 @@ class EventSourceMappingProps(EventSourceMappingOptions):
14575
14715
  self._values["report_batch_item_failures"] = report_batch_item_failures
14576
14716
  if retry_attempts is not None:
14577
14717
  self._values["retry_attempts"] = retry_attempts
14718
+ if schema_registry_config is not None:
14719
+ self._values["schema_registry_config"] = schema_registry_config
14578
14720
  if source_access_configurations is not None:
14579
14721
  self._values["source_access_configurations"] = source_access_configurations
14580
14722
  if starting_position is not None:
@@ -14802,6 +14944,15 @@ class EventSourceMappingProps(EventSourceMappingOptions):
14802
14944
  result = self._values.get("retry_attempts")
14803
14945
  return typing.cast(typing.Optional[jsii.Number], result)
14804
14946
 
14947
+ @builtins.property
14948
+ def schema_registry_config(self) -> typing.Optional["ISchemaRegistry"]:
14949
+ '''Specific configuration settings for a Kafka schema registry.
14950
+
14951
+ :default: - none
14952
+ '''
14953
+ result = self._values.get("schema_registry_config")
14954
+ return typing.cast(typing.Optional["ISchemaRegistry"], result)
14955
+
14805
14956
  @builtins.property
14806
14957
  def source_access_configurations(
14807
14958
  self,
@@ -15482,6 +15633,7 @@ class FunctionAttributes:
15482
15633
  "log_format": "logFormat",
15483
15634
  "logging_format": "loggingFormat",
15484
15635
  "log_group": "logGroup",
15636
+ "log_removal_policy": "logRemovalPolicy",
15485
15637
  "log_retention": "logRetention",
15486
15638
  "log_retention_retry_options": "logRetentionRetryOptions",
15487
15639
  "log_retention_role": "logRetentionRole",
@@ -15537,6 +15689,7 @@ class FunctionOptions(EventInvokeConfigOptions):
15537
15689
  log_format: typing.Optional[builtins.str] = None,
15538
15690
  logging_format: typing.Optional["LoggingFormat"] = None,
15539
15691
  log_group: typing.Optional[_ILogGroup_3c4fa718] = None,
15692
+ log_removal_policy: typing.Optional[_RemovalPolicy_9f93c814] = None,
15540
15693
  log_retention: typing.Optional[_RetentionDays_070f99f0] = None,
15541
15694
  log_retention_retry_options: typing.Optional[typing.Union["LogRetentionRetryOptions", typing.Dict[builtins.str, typing.Any]]] = None,
15542
15695
  log_retention_role: typing.Optional[_IRole_235f5d8e] = None,
@@ -15589,7 +15742,8 @@ class FunctionOptions(EventInvokeConfigOptions):
15589
15742
  :param log_format: (deprecated) Sets the logFormat for the function. Default: "Text"
15590
15743
  :param logging_format: Sets the loggingFormat for the function. Default: LoggingFormat.TEXT
15591
15744
  :param log_group: The log group the function sends logs to. By default, Lambda functions send logs to an automatically created default log group named /aws/lambda/<function name>. However you cannot change the properties of this auto-created log group using the AWS CDK, e.g. you cannot set a different log retention. Use the ``logGroup`` property to create a fully customizable LogGroup ahead of time, and instruct the Lambda function to send logs to it. Providing a user-controlled log group was rolled out to commercial regions on 2023-11-16. If you are deploying to another type of region, please check regional availability first. Default: ``/aws/lambda/${this.functionName}`` - default log group created by Lambda
15592
- :param log_retention: The number of days log events are kept in CloudWatch Logs. When updating this property, unsetting it doesn't remove the log retention policy. To remove the retention policy, set the value to ``INFINITE``. This is a legacy API and we strongly recommend you move away from it if you can. Instead create a fully customizable log group with ``logs.LogGroup`` and use the ``logGroup`` property to instruct the Lambda function to send logs to it. Migrating from ``logRetention`` to ``logGroup`` will cause the name of the log group to change. Users and code and referencing the name verbatim will have to adjust. In AWS CDK code, you can access the log group name directly from the LogGroup construct:: import * as logs from 'aws-cdk-lib/aws-logs'; declare const myLogGroup: logs.LogGroup; myLogGroup.logGroupName; Default: logs.RetentionDays.INFINITE
15745
+ :param log_removal_policy: (deprecated) Determine the removal policy of the log group that is auto-created by this construct. Normally you want to retain the log group so you can diagnose issues from logs even after a deployment that no longer includes the log group. In that case, use the normal date-based retention policy to age out your logs. Default: RemovalPolicy.Retain
15746
+ :param log_retention: (deprecated) The number of days log events are kept in CloudWatch Logs. When updating this property, unsetting it doesn't remove the log retention policy. To remove the retention policy, set the value to ``INFINITE``. This is a legacy API and we strongly recommend you move away from it if you can. Instead create a fully customizable log group with ``logs.LogGroup`` and use the ``logGroup`` property to instruct the Lambda function to send logs to it. Migrating from ``logRetention`` to ``logGroup`` will cause the name of the log group to change. Users and code and referencing the name verbatim will have to adjust. In AWS CDK code, you can access the log group name directly from the LogGroup construct:: import * as logs from 'aws-cdk-lib/aws-logs'; declare const myLogGroup: logs.LogGroup; myLogGroup.logGroupName; Default: logs.RetentionDays.INFINITE
15593
15747
  :param log_retention_retry_options: When log retention is specified, a custom resource attempts to create the CloudWatch log group. These options control the retry policy when interacting with CloudWatch APIs. This is a legacy API and we strongly recommend you migrate to ``logGroup`` if you can. ``logGroup`` allows you to create a fully customizable log group and instruct the Lambda function to send logs to it. Default: - Default AWS SDK retry options.
15594
15748
  :param log_retention_role: The IAM role for the Lambda function associated with the custom resource that sets the retention policy. This is a legacy API and we strongly recommend you migrate to ``logGroup`` if you can. ``logGroup`` allows you to create a fully customizable log group and instruct the Lambda function to send logs to it. Default: - A new role is created.
15595
15749
  :param memory_size: The amount of memory, in MB, that is allocated to your Lambda function. Lambda uses this value to proportionally allocate the amount of CPU power. For more information, see Resource Model in the AWS Lambda Developer Guide. Default: 128
@@ -15690,6 +15844,7 @@ class FunctionOptions(EventInvokeConfigOptions):
15690
15844
  log_format="logFormat",
15691
15845
  logging_format=lambda_.LoggingFormat.TEXT,
15692
15846
  log_group=log_group,
15847
+ log_removal_policy=cdk.RemovalPolicy.DESTROY,
15693
15848
  log_retention=logs.RetentionDays.ONE_DAY,
15694
15849
  log_retention_retry_options=lambda.LogRetentionRetryOptions(
15695
15850
  base=cdk.Duration.minutes(30),
@@ -15765,6 +15920,7 @@ class FunctionOptions(EventInvokeConfigOptions):
15765
15920
  check_type(argname="argument log_format", value=log_format, expected_type=type_hints["log_format"])
15766
15921
  check_type(argname="argument logging_format", value=logging_format, expected_type=type_hints["logging_format"])
15767
15922
  check_type(argname="argument log_group", value=log_group, expected_type=type_hints["log_group"])
15923
+ check_type(argname="argument log_removal_policy", value=log_removal_policy, expected_type=type_hints["log_removal_policy"])
15768
15924
  check_type(argname="argument log_retention", value=log_retention, expected_type=type_hints["log_retention"])
15769
15925
  check_type(argname="argument log_retention_retry_options", value=log_retention_retry_options, expected_type=type_hints["log_retention_retry_options"])
15770
15926
  check_type(argname="argument log_retention_role", value=log_retention_role, expected_type=type_hints["log_retention_role"])
@@ -15845,6 +16001,8 @@ class FunctionOptions(EventInvokeConfigOptions):
15845
16001
  self._values["logging_format"] = logging_format
15846
16002
  if log_group is not None:
15847
16003
  self._values["log_group"] = log_group
16004
+ if log_removal_policy is not None:
16005
+ self._values["log_removal_policy"] = log_removal_policy
15848
16006
  if log_retention is not None:
15849
16007
  self._values["log_retention"] = log_retention
15850
16008
  if log_retention_retry_options is not None:
@@ -16224,9 +16382,27 @@ class FunctionOptions(EventInvokeConfigOptions):
16224
16382
  result = self._values.get("log_group")
16225
16383
  return typing.cast(typing.Optional[_ILogGroup_3c4fa718], result)
16226
16384
 
16385
+ @builtins.property
16386
+ def log_removal_policy(self) -> typing.Optional[_RemovalPolicy_9f93c814]:
16387
+ '''(deprecated) Determine the removal policy of the log group that is auto-created by this construct.
16388
+
16389
+ Normally you want to retain the log group so you can diagnose issues
16390
+ from logs even after a deployment that no longer includes the log group.
16391
+ In that case, use the normal date-based retention policy to age out your
16392
+ logs.
16393
+
16394
+ :default: RemovalPolicy.Retain
16395
+
16396
+ :deprecated: use ``logGroup`` instead
16397
+
16398
+ :stability: deprecated
16399
+ '''
16400
+ result = self._values.get("log_removal_policy")
16401
+ return typing.cast(typing.Optional[_RemovalPolicy_9f93c814], result)
16402
+
16227
16403
  @builtins.property
16228
16404
  def log_retention(self) -> typing.Optional[_RetentionDays_070f99f0]:
16229
- '''The number of days log events are kept in CloudWatch Logs.
16405
+ '''(deprecated) The number of days log events are kept in CloudWatch Logs.
16230
16406
 
16231
16407
  When updating
16232
16408
  this property, unsetting it doesn't remove the log retention policy. To
@@ -16247,6 +16423,10 @@ class FunctionOptions(EventInvokeConfigOptions):
16247
16423
  my_log_group.log_group_name
16248
16424
 
16249
16425
  :default: logs.RetentionDays.INFINITE
16426
+
16427
+ :deprecated: use ``logGroup`` instead
16428
+
16429
+ :stability: deprecated
16250
16430
  '''
16251
16431
  result = self._values.get("log_retention")
16252
16432
  return typing.cast(typing.Optional[_RetentionDays_070f99f0], result)
@@ -16520,6 +16700,7 @@ class FunctionOptions(EventInvokeConfigOptions):
16520
16700
  "log_format": "logFormat",
16521
16701
  "logging_format": "loggingFormat",
16522
16702
  "log_group": "logGroup",
16703
+ "log_removal_policy": "logRemovalPolicy",
16523
16704
  "log_retention": "logRetention",
16524
16705
  "log_retention_retry_options": "logRetentionRetryOptions",
16525
16706
  "log_retention_role": "logRetentionRole",
@@ -16578,6 +16759,7 @@ class FunctionProps(FunctionOptions):
16578
16759
  log_format: typing.Optional[builtins.str] = None,
16579
16760
  logging_format: typing.Optional["LoggingFormat"] = None,
16580
16761
  log_group: typing.Optional[_ILogGroup_3c4fa718] = None,
16762
+ log_removal_policy: typing.Optional[_RemovalPolicy_9f93c814] = None,
16581
16763
  log_retention: typing.Optional[_RetentionDays_070f99f0] = None,
16582
16764
  log_retention_retry_options: typing.Optional[typing.Union["LogRetentionRetryOptions", typing.Dict[builtins.str, typing.Any]]] = None,
16583
16765
  log_retention_role: typing.Optional[_IRole_235f5d8e] = None,
@@ -16632,7 +16814,8 @@ class FunctionProps(FunctionOptions):
16632
16814
  :param log_format: (deprecated) Sets the logFormat for the function. Default: "Text"
16633
16815
  :param logging_format: Sets the loggingFormat for the function. Default: LoggingFormat.TEXT
16634
16816
  :param log_group: The log group the function sends logs to. By default, Lambda functions send logs to an automatically created default log group named /aws/lambda/<function name>. However you cannot change the properties of this auto-created log group using the AWS CDK, e.g. you cannot set a different log retention. Use the ``logGroup`` property to create a fully customizable LogGroup ahead of time, and instruct the Lambda function to send logs to it. Providing a user-controlled log group was rolled out to commercial regions on 2023-11-16. If you are deploying to another type of region, please check regional availability first. Default: ``/aws/lambda/${this.functionName}`` - default log group created by Lambda
16635
- :param log_retention: The number of days log events are kept in CloudWatch Logs. When updating this property, unsetting it doesn't remove the log retention policy. To remove the retention policy, set the value to ``INFINITE``. This is a legacy API and we strongly recommend you move away from it if you can. Instead create a fully customizable log group with ``logs.LogGroup`` and use the ``logGroup`` property to instruct the Lambda function to send logs to it. Migrating from ``logRetention`` to ``logGroup`` will cause the name of the log group to change. Users and code and referencing the name verbatim will have to adjust. In AWS CDK code, you can access the log group name directly from the LogGroup construct:: import * as logs from 'aws-cdk-lib/aws-logs'; declare const myLogGroup: logs.LogGroup; myLogGroup.logGroupName; Default: logs.RetentionDays.INFINITE
16817
+ :param log_removal_policy: (deprecated) Determine the removal policy of the log group that is auto-created by this construct. Normally you want to retain the log group so you can diagnose issues from logs even after a deployment that no longer includes the log group. In that case, use the normal date-based retention policy to age out your logs. Default: RemovalPolicy.Retain
16818
+ :param log_retention: (deprecated) The number of days log events are kept in CloudWatch Logs. When updating this property, unsetting it doesn't remove the log retention policy. To remove the retention policy, set the value to ``INFINITE``. This is a legacy API and we strongly recommend you move away from it if you can. Instead create a fully customizable log group with ``logs.LogGroup`` and use the ``logGroup`` property to instruct the Lambda function to send logs to it. Migrating from ``logRetention`` to ``logGroup`` will cause the name of the log group to change. Users and code and referencing the name verbatim will have to adjust. In AWS CDK code, you can access the log group name directly from the LogGroup construct:: import * as logs from 'aws-cdk-lib/aws-logs'; declare const myLogGroup: logs.LogGroup; myLogGroup.logGroupName; Default: logs.RetentionDays.INFINITE
16636
16819
  :param log_retention_retry_options: When log retention is specified, a custom resource attempts to create the CloudWatch log group. These options control the retry policy when interacting with CloudWatch APIs. This is a legacy API and we strongly recommend you migrate to ``logGroup`` if you can. ``logGroup`` allows you to create a fully customizable log group and instruct the Lambda function to send logs to it. Default: - Default AWS SDK retry options.
16637
16820
  :param log_retention_role: The IAM role for the Lambda function associated with the custom resource that sets the retention policy. This is a legacy API and we strongly recommend you migrate to ``logGroup`` if you can. ``logGroup`` allows you to create a fully customizable log group and instruct the Lambda function to send logs to it. Default: - A new role is created.
16638
16821
  :param memory_size: The amount of memory, in MB, that is allocated to your Lambda function. Lambda uses this value to proportionally allocate the amount of CPU power. For more information, see Resource Model in the AWS Lambda Developer Guide. Default: 128
@@ -16722,6 +16905,7 @@ class FunctionProps(FunctionOptions):
16722
16905
  check_type(argname="argument log_format", value=log_format, expected_type=type_hints["log_format"])
16723
16906
  check_type(argname="argument logging_format", value=logging_format, expected_type=type_hints["logging_format"])
16724
16907
  check_type(argname="argument log_group", value=log_group, expected_type=type_hints["log_group"])
16908
+ check_type(argname="argument log_removal_policy", value=log_removal_policy, expected_type=type_hints["log_removal_policy"])
16725
16909
  check_type(argname="argument log_retention", value=log_retention, expected_type=type_hints["log_retention"])
16726
16910
  check_type(argname="argument log_retention_retry_options", value=log_retention_retry_options, expected_type=type_hints["log_retention_retry_options"])
16727
16911
  check_type(argname="argument log_retention_role", value=log_retention_role, expected_type=type_hints["log_retention_role"])
@@ -16809,6 +16993,8 @@ class FunctionProps(FunctionOptions):
16809
16993
  self._values["logging_format"] = logging_format
16810
16994
  if log_group is not None:
16811
16995
  self._values["log_group"] = log_group
16996
+ if log_removal_policy is not None:
16997
+ self._values["log_removal_policy"] = log_removal_policy
16812
16998
  if log_retention is not None:
16813
16999
  self._values["log_retention"] = log_retention
16814
17000
  if log_retention_retry_options is not None:
@@ -17188,9 +17374,27 @@ class FunctionProps(FunctionOptions):
17188
17374
  result = self._values.get("log_group")
17189
17375
  return typing.cast(typing.Optional[_ILogGroup_3c4fa718], result)
17190
17376
 
17377
+ @builtins.property
17378
+ def log_removal_policy(self) -> typing.Optional[_RemovalPolicy_9f93c814]:
17379
+ '''(deprecated) Determine the removal policy of the log group that is auto-created by this construct.
17380
+
17381
+ Normally you want to retain the log group so you can diagnose issues
17382
+ from logs even after a deployment that no longer includes the log group.
17383
+ In that case, use the normal date-based retention policy to age out your
17384
+ logs.
17385
+
17386
+ :default: RemovalPolicy.Retain
17387
+
17388
+ :deprecated: use ``logGroup`` instead
17389
+
17390
+ :stability: deprecated
17391
+ '''
17392
+ result = self._values.get("log_removal_policy")
17393
+ return typing.cast(typing.Optional[_RemovalPolicy_9f93c814], result)
17394
+
17191
17395
  @builtins.property
17192
17396
  def log_retention(self) -> typing.Optional[_RetentionDays_070f99f0]:
17193
- '''The number of days log events are kept in CloudWatch Logs.
17397
+ '''(deprecated) The number of days log events are kept in CloudWatch Logs.
17194
17398
 
17195
17399
  When updating
17196
17400
  this property, unsetting it doesn't remove the log retention policy. To
@@ -17211,6 +17415,10 @@ class FunctionProps(FunctionOptions):
17211
17415
  my_log_group.log_group_name
17212
17416
 
17213
17417
  :default: logs.RetentionDays.INFINITE
17418
+
17419
+ :deprecated: use ``logGroup`` instead
17420
+
17421
+ :stability: deprecated
17214
17422
  '''
17215
17423
  result = self._values.get("log_retention")
17216
17424
  return typing.cast(typing.Optional[_RetentionDays_070f99f0], result)
@@ -18291,6 +18499,7 @@ class IFunction(
18291
18499
  provisioned_poller_config: typing.Optional[typing.Union["ProvisionedPollerConfig", typing.Dict[builtins.str, typing.Any]]] = None,
18292
18500
  report_batch_item_failures: typing.Optional[builtins.bool] = None,
18293
18501
  retry_attempts: typing.Optional[jsii.Number] = None,
18502
+ schema_registry_config: typing.Optional["ISchemaRegistry"] = None,
18294
18503
  source_access_configurations: typing.Optional[typing.Sequence[typing.Union["SourceAccessConfiguration", typing.Dict[builtins.str, typing.Any]]]] = None,
18295
18504
  starting_position: typing.Optional["StartingPosition"] = None,
18296
18505
  starting_position_timestamp: typing.Optional[jsii.Number] = None,
@@ -18318,6 +18527,7 @@ class IFunction(
18318
18527
  :param provisioned_poller_config: Configuration for provisioned pollers that read from the event source. When specified, allows control over the minimum and maximum number of pollers that can be provisioned to process events from the source. Default: - no provisioned pollers
18319
18528
  :param report_batch_item_failures: Allow functions to return partially successful responses for a batch of records. Default: false
18320
18529
  :param retry_attempts: The maximum number of times to retry when the function returns an error. Set to ``undefined`` if you want lambda to keep retrying infinitely or until the record expires. Valid Range: - Minimum value of 0 - Maximum value of 10000 Default: - infinite or until the record expires.
18530
+ :param schema_registry_config: Specific configuration settings for a Kafka schema registry. Default: - none
18321
18531
  :param source_access_configurations: Specific settings like the authentication protocol or the VPC components to secure access to your event source. Default: - none
18322
18532
  :param starting_position: The position in the DynamoDB, Kinesis or MSK stream where AWS Lambda should start reading. Default: - no starting position
18323
18533
  :param starting_position_timestamp: The time from which to start reading, in Unix time seconds. Default: - no timestamp
@@ -18733,6 +18943,7 @@ class _IFunctionProxy(
18733
18943
  provisioned_poller_config: typing.Optional[typing.Union["ProvisionedPollerConfig", typing.Dict[builtins.str, typing.Any]]] = None,
18734
18944
  report_batch_item_failures: typing.Optional[builtins.bool] = None,
18735
18945
  retry_attempts: typing.Optional[jsii.Number] = None,
18946
+ schema_registry_config: typing.Optional["ISchemaRegistry"] = None,
18736
18947
  source_access_configurations: typing.Optional[typing.Sequence[typing.Union["SourceAccessConfiguration", typing.Dict[builtins.str, typing.Any]]]] = None,
18737
18948
  starting_position: typing.Optional["StartingPosition"] = None,
18738
18949
  starting_position_timestamp: typing.Optional[jsii.Number] = None,
@@ -18760,6 +18971,7 @@ class _IFunctionProxy(
18760
18971
  :param provisioned_poller_config: Configuration for provisioned pollers that read from the event source. When specified, allows control over the minimum and maximum number of pollers that can be provisioned to process events from the source. Default: - no provisioned pollers
18761
18972
  :param report_batch_item_failures: Allow functions to return partially successful responses for a batch of records. Default: false
18762
18973
  :param retry_attempts: The maximum number of times to retry when the function returns an error. Set to ``undefined`` if you want lambda to keep retrying infinitely or until the record expires. Valid Range: - Minimum value of 0 - Maximum value of 10000 Default: - infinite or until the record expires.
18974
+ :param schema_registry_config: Specific configuration settings for a Kafka schema registry. Default: - none
18763
18975
  :param source_access_configurations: Specific settings like the authentication protocol or the VPC components to secure access to your event source. Default: - none
18764
18976
  :param starting_position: The position in the DynamoDB, Kinesis or MSK stream where AWS Lambda should start reading. Default: - no starting position
18765
18977
  :param starting_position_timestamp: The time from which to start reading, in Unix time seconds. Default: - no timestamp
@@ -18788,6 +19000,7 @@ class _IFunctionProxy(
18788
19000
  provisioned_poller_config=provisioned_poller_config,
18789
19001
  report_batch_item_failures=report_batch_item_failures,
18790
19002
  retry_attempts=retry_attempts,
19003
+ schema_registry_config=schema_registry_config,
18791
19004
  source_access_configurations=source_access_configurations,
18792
19005
  starting_position=starting_position,
18793
19006
  starting_position_timestamp=starting_position_timestamp,
@@ -19527,6 +19740,50 @@ class _IScalableFunctionAttributeProxy(
19527
19740
  typing.cast(typing.Any, IScalableFunctionAttribute).__jsii_proxy_class__ = lambda : _IScalableFunctionAttributeProxy
19528
19741
 
19529
19742
 
19743
+ @jsii.interface(jsii_type="aws-cdk-lib.aws_lambda.ISchemaRegistry")
19744
+ class ISchemaRegistry(typing_extensions.Protocol):
19745
+ '''A schema registry for an event source.'''
19746
+
19747
+ @jsii.member(jsii_name="bind")
19748
+ def bind(
19749
+ self,
19750
+ target: IEventSourceMapping,
19751
+ target_handler: IFunction,
19752
+ ) -> "KafkaSchemaRegistryConfig":
19753
+ '''Returns the schema registry config of the event source.
19754
+
19755
+ :param target: -
19756
+ :param target_handler: -
19757
+ '''
19758
+ ...
19759
+
19760
+
19761
+ class _ISchemaRegistryProxy:
19762
+ '''A schema registry for an event source.'''
19763
+
19764
+ __jsii_type__: typing.ClassVar[str] = "aws-cdk-lib.aws_lambda.ISchemaRegistry"
19765
+
19766
+ @jsii.member(jsii_name="bind")
19767
+ def bind(
19768
+ self,
19769
+ target: IEventSourceMapping,
19770
+ target_handler: IFunction,
19771
+ ) -> "KafkaSchemaRegistryConfig":
19772
+ '''Returns the schema registry config of the event source.
19773
+
19774
+ :param target: -
19775
+ :param target_handler: -
19776
+ '''
19777
+ if __debug__:
19778
+ type_hints = typing.get_type_hints(_typecheckingstub__0c68a1588ffc2bca6786310b7681f323e4368d6bf66e13c5fbdc7ef0ad571a22)
19779
+ check_type(argname="argument target", value=target, expected_type=type_hints["target"])
19780
+ check_type(argname="argument target_handler", value=target_handler, expected_type=type_hints["target_handler"])
19781
+ return typing.cast("KafkaSchemaRegistryConfig", jsii.invoke(self, "bind", [target, target_handler]))
19782
+
19783
+ # Adding a "__jsii_proxy_class__(): typing.Type" function to the interface
19784
+ typing.cast(typing.Any, ISchemaRegistry).__jsii_proxy_class__ = lambda : _ISchemaRegistryProxy
19785
+
19786
+
19530
19787
  @jsii.interface(jsii_type="aws-cdk-lib.aws_lambda.IVersion")
19531
19788
  class IVersion(IFunction, typing_extensions.Protocol):
19532
19789
  @builtins.property
@@ -19745,6 +20002,408 @@ class InvokeMode(enum.Enum):
19745
20002
  '''
19746
20003
 
19747
20004
 
20005
+ @jsii.data_type(
20006
+ jsii_type="aws-cdk-lib.aws_lambda.KafkaSchemaRegistryAccessConfig",
20007
+ jsii_struct_bases=[],
20008
+ name_mapping={"type": "type", "uri": "uri"},
20009
+ )
20010
+ class KafkaSchemaRegistryAccessConfig:
20011
+ def __init__(
20012
+ self,
20013
+ *,
20014
+ type: "KafkaSchemaRegistryAccessConfigType",
20015
+ uri: builtins.str,
20016
+ ) -> None:
20017
+ '''Specific access configuration settings that tell Lambda how to authenticate with your schema registry.
20018
+
20019
+ If you're working with an AWS Glue schema registry, don't provide authentication details in this object. Instead, ensure that your execution role has the required permissions for Lambda to access your cluster.
20020
+
20021
+ If you're working with a Confluent schema registry, choose the authentication method in the Type field, and provide the AWS Secrets Manager secret ARN in the URI field.
20022
+
20023
+ :param type: The type of authentication Lambda uses to access your schema registry.
20024
+ :param uri: The URI of the secret (Secrets Manager secret ARN) to authenticate with your schema registry.
20025
+
20026
+ :exampleMetadata: fixture=_generated
20027
+
20028
+ Example::
20029
+
20030
+ # The code below shows an example of how to instantiate this type.
20031
+ # The values are placeholders you should change.
20032
+ from aws_cdk import aws_lambda as lambda_
20033
+
20034
+ # kafka_schema_registry_access_config_type: lambda.KafkaSchemaRegistryAccessConfigType
20035
+
20036
+ kafka_schema_registry_access_config = lambda.KafkaSchemaRegistryAccessConfig(
20037
+ type=kafka_schema_registry_access_config_type,
20038
+ uri="uri"
20039
+ )
20040
+ '''
20041
+ if __debug__:
20042
+ type_hints = typing.get_type_hints(_typecheckingstub__a9ed7f710fdd20a96eb8eeb709bbea9f1e52b3ca20bed4ca85cf8341031090d2)
20043
+ check_type(argname="argument type", value=type, expected_type=type_hints["type"])
20044
+ check_type(argname="argument uri", value=uri, expected_type=type_hints["uri"])
20045
+ self._values: typing.Dict[builtins.str, typing.Any] = {
20046
+ "type": type,
20047
+ "uri": uri,
20048
+ }
20049
+
20050
+ @builtins.property
20051
+ def type(self) -> "KafkaSchemaRegistryAccessConfigType":
20052
+ '''The type of authentication Lambda uses to access your schema registry.'''
20053
+ result = self._values.get("type")
20054
+ assert result is not None, "Required property 'type' is missing"
20055
+ return typing.cast("KafkaSchemaRegistryAccessConfigType", result)
20056
+
20057
+ @builtins.property
20058
+ def uri(self) -> builtins.str:
20059
+ '''The URI of the secret (Secrets Manager secret ARN) to authenticate with your schema registry.
20060
+
20061
+ :see: KafkaSchemaRegistryAccessConfigType
20062
+ '''
20063
+ result = self._values.get("uri")
20064
+ assert result is not None, "Required property 'uri' is missing"
20065
+ return typing.cast(builtins.str, result)
20066
+
20067
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
20068
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
20069
+
20070
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
20071
+ return not (rhs == self)
20072
+
20073
+ def __repr__(self) -> str:
20074
+ return "KafkaSchemaRegistryAccessConfig(%s)" % ", ".join(
20075
+ k + "=" + repr(v) for k, v in self._values.items()
20076
+ )
20077
+
20078
+
20079
+ class KafkaSchemaRegistryAccessConfigType(
20080
+ metaclass=jsii.JSIIMeta,
20081
+ jsii_type="aws-cdk-lib.aws_lambda.KafkaSchemaRegistryAccessConfigType",
20082
+ ):
20083
+ '''The type of authentication protocol for your schema registry.
20084
+
20085
+ :exampleMetadata: infused
20086
+
20087
+ Example::
20088
+
20089
+ from aws_cdk.aws_lambda_event_sources import ManagedKafkaEventSource, ConfluentSchemaRegistry
20090
+ from aws_cdk.aws_secretsmanager import Secret
20091
+
20092
+ # Your MSK cluster arn
20093
+ # cluster_arn: str
20094
+
20095
+ # my_function: lambda.Function
20096
+
20097
+
20098
+ # The Kafka topic you want to subscribe to
20099
+ topic = "some-cool-topic"
20100
+
20101
+ secret = Secret(self, "Secret", secret_name="AmazonMSK_KafkaSecret")
20102
+ my_function.add_event_source(ManagedKafkaEventSource(
20103
+ cluster_arn=cluster_arn,
20104
+ topic=topic,
20105
+ starting_position=lambda_.StartingPosition.TRIM_HORIZON,
20106
+ provisioned_poller_config=ProvisionedPollerConfig(
20107
+ minimum_pollers=1,
20108
+ maximum_pollers=3
20109
+ ),
20110
+ schema_registry_config=ConfluentSchemaRegistry(
20111
+ schema_registry_uri="https://example.com",
20112
+ event_record_format=lambda_.EventRecordFormat.JSON,
20113
+ authentication_type=lambda_.KafkaSchemaRegistryAccessConfigType.BASIC_AUTH,
20114
+ secret=secret,
20115
+ schema_validation_configs=[lambda.KafkaSchemaValidationConfig(attribute=lambda_.KafkaSchemaValidationAttribute.KEY)]
20116
+ )
20117
+ ))
20118
+ '''
20119
+
20120
+ @jsii.member(jsii_name="of")
20121
+ @builtins.classmethod
20122
+ def of(cls, name: builtins.str) -> "KafkaSchemaRegistryAccessConfigType":
20123
+ '''A custom source access configuration property for schema registry.
20124
+
20125
+ :param name: -
20126
+ '''
20127
+ if __debug__:
20128
+ type_hints = typing.get_type_hints(_typecheckingstub__4bc6850ec99a0d35e26da78049f4174bb567964e6b20083c7a1e29e3f120f831)
20129
+ check_type(argname="argument name", value=name, expected_type=type_hints["name"])
20130
+ return typing.cast("KafkaSchemaRegistryAccessConfigType", jsii.sinvoke(cls, "of", [name]))
20131
+
20132
+ @jsii.python.classproperty
20133
+ @jsii.member(jsii_name="BASIC_AUTH")
20134
+ def BASIC_AUTH(cls) -> "KafkaSchemaRegistryAccessConfigType":
20135
+ '''The Secrets Manager secret that stores your broker credentials.'''
20136
+ return typing.cast("KafkaSchemaRegistryAccessConfigType", jsii.sget(cls, "BASIC_AUTH"))
20137
+
20138
+ @jsii.python.classproperty
20139
+ @jsii.member(jsii_name="CLIENT_CERTIFICATE_TLS_AUTH")
20140
+ def CLIENT_CERTIFICATE_TLS_AUTH(cls) -> "KafkaSchemaRegistryAccessConfigType":
20141
+ '''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 schema registry.'''
20142
+ return typing.cast("KafkaSchemaRegistryAccessConfigType", jsii.sget(cls, "CLIENT_CERTIFICATE_TLS_AUTH"))
20143
+
20144
+ @jsii.python.classproperty
20145
+ @jsii.member(jsii_name="SERVER_ROOT_CA_CERTIFICATE")
20146
+ def SERVER_ROOT_CA_CERTIFICATE(cls) -> "KafkaSchemaRegistryAccessConfigType":
20147
+ '''The Secrets Manager ARN of your secret key containing the root CA certificate (X.509 PEM) used for TLS encryption of your schema registry.'''
20148
+ return typing.cast("KafkaSchemaRegistryAccessConfigType", jsii.sget(cls, "SERVER_ROOT_CA_CERTIFICATE"))
20149
+
20150
+ @builtins.property
20151
+ @jsii.member(jsii_name="type")
20152
+ def type(self) -> builtins.str:
20153
+ '''The key to use in ``SchemaRegistryConfig.AccessConfig.Type`` property in CloudFormation.'''
20154
+ return typing.cast(builtins.str, jsii.get(self, "type"))
20155
+
20156
+
20157
+ @jsii.data_type(
20158
+ jsii_type="aws-cdk-lib.aws_lambda.KafkaSchemaRegistryConfig",
20159
+ jsii_struct_bases=[],
20160
+ name_mapping={
20161
+ "event_record_format": "eventRecordFormat",
20162
+ "schema_registry_uri": "schemaRegistryUri",
20163
+ "schema_validation_configs": "schemaValidationConfigs",
20164
+ "access_configs": "accessConfigs",
20165
+ },
20166
+ )
20167
+ class KafkaSchemaRegistryConfig:
20168
+ def __init__(
20169
+ self,
20170
+ *,
20171
+ event_record_format: EventRecordFormat,
20172
+ schema_registry_uri: builtins.str,
20173
+ schema_validation_configs: typing.Sequence[typing.Union["KafkaSchemaValidationConfig", typing.Dict[builtins.str, typing.Any]]],
20174
+ access_configs: typing.Optional[typing.Sequence[typing.Union[KafkaSchemaRegistryAccessConfig, typing.Dict[builtins.str, typing.Any]]]] = None,
20175
+ ) -> None:
20176
+ '''(Amazon MSK and self-managed Apache Kafka only) Specific configuration settings for a Kafka schema registry.
20177
+
20178
+ :param event_record_format: The record format that Lambda delivers to your function after schema validation. - Choose JSON to have Lambda deliver the record to your function as a standard JSON object. - Choose SOURCE to have Lambda deliver the record to your function in its original source format. Lambda removes all schema metadata, such as the schema ID, before sending the record to your function. Default: - none
20179
+ :param schema_registry_uri: The URI for your schema registry. The correct URI format depends on the type of schema registry you're using. Default: - none
20180
+ :param schema_validation_configs: An array of schema validation configuration objects, which tell Lambda the message attributes you want to validate and filter using your schema registry. Default: - none
20181
+ :param access_configs: An array of access configuration objects that tell Lambda how to authenticate with your schema registry. Default: - none
20182
+
20183
+ :exampleMetadata: fixture=_generated
20184
+
20185
+ Example::
20186
+
20187
+ # The code below shows an example of how to instantiate this type.
20188
+ # The values are placeholders you should change.
20189
+ from aws_cdk import aws_lambda as lambda_
20190
+
20191
+ # event_record_format: lambda.EventRecordFormat
20192
+ # kafka_schema_registry_access_config_type: lambda.KafkaSchemaRegistryAccessConfigType
20193
+ # kafka_schema_validation_attribute: lambda.KafkaSchemaValidationAttribute
20194
+
20195
+ kafka_schema_registry_config = lambda.KafkaSchemaRegistryConfig(
20196
+ event_record_format=event_record_format,
20197
+ schema_registry_uri="schemaRegistryUri",
20198
+ schema_validation_configs=[lambda.KafkaSchemaValidationConfig(
20199
+ attribute=kafka_schema_validation_attribute
20200
+ )],
20201
+
20202
+ # the properties below are optional
20203
+ access_configs=[lambda.KafkaSchemaRegistryAccessConfig(
20204
+ type=kafka_schema_registry_access_config_type,
20205
+ uri="uri"
20206
+ )]
20207
+ )
20208
+ '''
20209
+ if __debug__:
20210
+ type_hints = typing.get_type_hints(_typecheckingstub__a3171876130664545cc7c6ac22856db59c006c52bb5f546cb11b18d515fef45e)
20211
+ check_type(argname="argument event_record_format", value=event_record_format, expected_type=type_hints["event_record_format"])
20212
+ check_type(argname="argument schema_registry_uri", value=schema_registry_uri, expected_type=type_hints["schema_registry_uri"])
20213
+ check_type(argname="argument schema_validation_configs", value=schema_validation_configs, expected_type=type_hints["schema_validation_configs"])
20214
+ check_type(argname="argument access_configs", value=access_configs, expected_type=type_hints["access_configs"])
20215
+ self._values: typing.Dict[builtins.str, typing.Any] = {
20216
+ "event_record_format": event_record_format,
20217
+ "schema_registry_uri": schema_registry_uri,
20218
+ "schema_validation_configs": schema_validation_configs,
20219
+ }
20220
+ if access_configs is not None:
20221
+ self._values["access_configs"] = access_configs
20222
+
20223
+ @builtins.property
20224
+ def event_record_format(self) -> EventRecordFormat:
20225
+ '''The record format that Lambda delivers to your function after schema validation.
20226
+
20227
+ - Choose JSON to have Lambda deliver the record to your function as a standard JSON object.
20228
+ - Choose SOURCE to have Lambda deliver the record to your function in its original source format. Lambda removes all schema metadata, such as the schema ID, before sending the record to your function.
20229
+
20230
+ :default: - none
20231
+ '''
20232
+ result = self._values.get("event_record_format")
20233
+ assert result is not None, "Required property 'event_record_format' is missing"
20234
+ return typing.cast(EventRecordFormat, result)
20235
+
20236
+ @builtins.property
20237
+ def schema_registry_uri(self) -> builtins.str:
20238
+ '''The URI for your schema registry.
20239
+
20240
+ The correct URI format depends on the type of schema registry you're using.
20241
+
20242
+ :default: - none
20243
+ '''
20244
+ result = self._values.get("schema_registry_uri")
20245
+ assert result is not None, "Required property 'schema_registry_uri' is missing"
20246
+ return typing.cast(builtins.str, result)
20247
+
20248
+ @builtins.property
20249
+ def schema_validation_configs(self) -> typing.List["KafkaSchemaValidationConfig"]:
20250
+ '''An array of schema validation configuration objects, which tell Lambda the message attributes you want to validate and filter using your schema registry.
20251
+
20252
+ :default: - none
20253
+ '''
20254
+ result = self._values.get("schema_validation_configs")
20255
+ assert result is not None, "Required property 'schema_validation_configs' is missing"
20256
+ return typing.cast(typing.List["KafkaSchemaValidationConfig"], result)
20257
+
20258
+ @builtins.property
20259
+ def access_configs(
20260
+ self,
20261
+ ) -> typing.Optional[typing.List[KafkaSchemaRegistryAccessConfig]]:
20262
+ '''An array of access configuration objects that tell Lambda how to authenticate with your schema registry.
20263
+
20264
+ :default: - none
20265
+ '''
20266
+ result = self._values.get("access_configs")
20267
+ return typing.cast(typing.Optional[typing.List[KafkaSchemaRegistryAccessConfig]], result)
20268
+
20269
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
20270
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
20271
+
20272
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
20273
+ return not (rhs == self)
20274
+
20275
+ def __repr__(self) -> str:
20276
+ return "KafkaSchemaRegistryConfig(%s)" % ", ".join(
20277
+ k + "=" + repr(v) for k, v in self._values.items()
20278
+ )
20279
+
20280
+
20281
+ class KafkaSchemaValidationAttribute(
20282
+ metaclass=jsii.JSIIMeta,
20283
+ jsii_type="aws-cdk-lib.aws_lambda.KafkaSchemaValidationAttribute",
20284
+ ):
20285
+ '''Specific schema validation configuration settings that tell Lambda the message attributes you want to validate and filter using your schema registry.
20286
+
20287
+ :exampleMetadata: infused
20288
+
20289
+ Example::
20290
+
20291
+ from aws_cdk.aws_lambda_event_sources import ManagedKafkaEventSource, ConfluentSchemaRegistry
20292
+ from aws_cdk.aws_secretsmanager import Secret
20293
+
20294
+ # Your MSK cluster arn
20295
+ # cluster_arn: str
20296
+
20297
+ # my_function: lambda.Function
20298
+
20299
+
20300
+ # The Kafka topic you want to subscribe to
20301
+ topic = "some-cool-topic"
20302
+
20303
+ secret = Secret(self, "Secret", secret_name="AmazonMSK_KafkaSecret")
20304
+ my_function.add_event_source(ManagedKafkaEventSource(
20305
+ cluster_arn=cluster_arn,
20306
+ topic=topic,
20307
+ starting_position=lambda_.StartingPosition.TRIM_HORIZON,
20308
+ provisioned_poller_config=ProvisionedPollerConfig(
20309
+ minimum_pollers=1,
20310
+ maximum_pollers=3
20311
+ ),
20312
+ schema_registry_config=ConfluentSchemaRegistry(
20313
+ schema_registry_uri="https://example.com",
20314
+ event_record_format=lambda_.EventRecordFormat.JSON,
20315
+ authentication_type=lambda_.KafkaSchemaRegistryAccessConfigType.BASIC_AUTH,
20316
+ secret=secret,
20317
+ schema_validation_configs=[lambda.KafkaSchemaValidationConfig(attribute=lambda_.KafkaSchemaValidationAttribute.KEY)]
20318
+ )
20319
+ ))
20320
+ '''
20321
+
20322
+ @jsii.member(jsii_name="of")
20323
+ @builtins.classmethod
20324
+ def of(cls, name: builtins.str) -> "KafkaSchemaValidationAttribute":
20325
+ '''A custom schema validation attribute property.
20326
+
20327
+ :param name: -
20328
+ '''
20329
+ if __debug__:
20330
+ type_hints = typing.get_type_hints(_typecheckingstub__90f583f1aa63ef4c8f67ca1d84697d67f4e81ae0ea5473533af46b85cc17e696)
20331
+ check_type(argname="argument name", value=name, expected_type=type_hints["name"])
20332
+ return typing.cast("KafkaSchemaValidationAttribute", jsii.sinvoke(cls, "of", [name]))
20333
+
20334
+ @jsii.python.classproperty
20335
+ @jsii.member(jsii_name="KEY")
20336
+ def KEY(cls) -> "KafkaSchemaValidationAttribute":
20337
+ '''De-serialize the key field of the parload to target function.'''
20338
+ return typing.cast("KafkaSchemaValidationAttribute", jsii.sget(cls, "KEY"))
20339
+
20340
+ @jsii.python.classproperty
20341
+ @jsii.member(jsii_name="VALUE")
20342
+ def VALUE(cls) -> "KafkaSchemaValidationAttribute":
20343
+ '''De-serialize the value field of the parload to target function.'''
20344
+ return typing.cast("KafkaSchemaValidationAttribute", jsii.sget(cls, "VALUE"))
20345
+
20346
+ @builtins.property
20347
+ @jsii.member(jsii_name="value")
20348
+ def value(self) -> builtins.str:
20349
+ '''The enum to use in ``SchemaRegistryConfig.SchemaValidationConfigs.Attribute`` property in CloudFormation.'''
20350
+ return typing.cast(builtins.str, jsii.get(self, "value"))
20351
+
20352
+
20353
+ @jsii.data_type(
20354
+ jsii_type="aws-cdk-lib.aws_lambda.KafkaSchemaValidationConfig",
20355
+ jsii_struct_bases=[],
20356
+ name_mapping={"attribute": "attribute"},
20357
+ )
20358
+ class KafkaSchemaValidationConfig:
20359
+ def __init__(self, *, attribute: KafkaSchemaValidationAttribute) -> None:
20360
+ '''Specific schema validation configuration settings that tell Lambda the message attributes you want to validate and filter using your schema registry.
20361
+
20362
+ :param attribute: The attributes you want your schema registry to validate and filter for. If you selected JSON as the EventRecordFormat, Lambda also deserializes the selected message attributes.
20363
+
20364
+ :exampleMetadata: fixture=_generated
20365
+
20366
+ Example::
20367
+
20368
+ # The code below shows an example of how to instantiate this type.
20369
+ # The values are placeholders you should change.
20370
+ from aws_cdk import aws_lambda as lambda_
20371
+
20372
+ # kafka_schema_validation_attribute: lambda.KafkaSchemaValidationAttribute
20373
+
20374
+ kafka_schema_validation_config = lambda.KafkaSchemaValidationConfig(
20375
+ attribute=kafka_schema_validation_attribute
20376
+ )
20377
+ '''
20378
+ if __debug__:
20379
+ type_hints = typing.get_type_hints(_typecheckingstub__89fd450fee20fb5d81fd39157485acaae3ba70536153566208b1778d213a1ae8)
20380
+ check_type(argname="argument attribute", value=attribute, expected_type=type_hints["attribute"])
20381
+ self._values: typing.Dict[builtins.str, typing.Any] = {
20382
+ "attribute": attribute,
20383
+ }
20384
+
20385
+ @builtins.property
20386
+ def attribute(self) -> KafkaSchemaValidationAttribute:
20387
+ '''The attributes you want your schema registry to validate and filter for.
20388
+
20389
+ If you selected JSON as the EventRecordFormat, Lambda also deserializes the selected message attributes.
20390
+ '''
20391
+ result = self._values.get("attribute")
20392
+ assert result is not None, "Required property 'attribute' is missing"
20393
+ return typing.cast(KafkaSchemaValidationAttribute, result)
20394
+
20395
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
20396
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
20397
+
20398
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
20399
+ return not (rhs == self)
20400
+
20401
+ def __repr__(self) -> str:
20402
+ return "KafkaSchemaValidationConfig(%s)" % ", ".join(
20403
+ k + "=" + repr(v) for k, v in self._values.items()
20404
+ )
20405
+
20406
+
19748
20407
  class LambdaInsightsVersion(
19749
20408
  metaclass=jsii.JSIIAbstractClass,
19750
20409
  jsii_type="aws-cdk-lib.aws_lambda.LambdaInsightsVersion",
@@ -22314,6 +22973,88 @@ class S3CodeV2(
22314
22973
  return typing.cast(builtins.bool, jsii.get(self, "isInline"))
22315
22974
 
22316
22975
 
22976
+ @jsii.data_type(
22977
+ jsii_type="aws-cdk-lib.aws_lambda.SchemaRegistryProps",
22978
+ jsii_struct_bases=[],
22979
+ name_mapping={
22980
+ "event_record_format": "eventRecordFormat",
22981
+ "schema_validation_configs": "schemaValidationConfigs",
22982
+ },
22983
+ )
22984
+ class SchemaRegistryProps:
22985
+ def __init__(
22986
+ self,
22987
+ *,
22988
+ event_record_format: EventRecordFormat,
22989
+ schema_validation_configs: typing.Sequence[typing.Union[KafkaSchemaValidationConfig, typing.Dict[builtins.str, typing.Any]]],
22990
+ ) -> None:
22991
+ '''Properties for schema registry configuration.
22992
+
22993
+ :param event_record_format: The record format that Lambda delivers to your function after schema validation. - Choose JSON to have Lambda deliver the record to your function as a standard JSON object. - Choose SOURCE to have Lambda deliver the record to your function in its original source format. Lambda removes all schema metadata, such as the schema ID, before sending the record to your function. Default: - none
22994
+ :param schema_validation_configs: An array of schema validation configuration objects, which tell Lambda the message attributes you want to validate and filter using your schema registry. Default: - none
22995
+
22996
+ :exampleMetadata: fixture=_generated
22997
+
22998
+ Example::
22999
+
23000
+ # The code below shows an example of how to instantiate this type.
23001
+ # The values are placeholders you should change.
23002
+ from aws_cdk import aws_lambda as lambda_
23003
+
23004
+ # event_record_format: lambda.EventRecordFormat
23005
+ # kafka_schema_validation_attribute: lambda.KafkaSchemaValidationAttribute
23006
+
23007
+ schema_registry_props = lambda.SchemaRegistryProps(
23008
+ event_record_format=event_record_format,
23009
+ schema_validation_configs=[lambda.KafkaSchemaValidationConfig(
23010
+ attribute=kafka_schema_validation_attribute
23011
+ )]
23012
+ )
23013
+ '''
23014
+ if __debug__:
23015
+ type_hints = typing.get_type_hints(_typecheckingstub__0915a5e0439a722acf480d4010d03236559e242684c698d0a460dffc5709933b)
23016
+ check_type(argname="argument event_record_format", value=event_record_format, expected_type=type_hints["event_record_format"])
23017
+ check_type(argname="argument schema_validation_configs", value=schema_validation_configs, expected_type=type_hints["schema_validation_configs"])
23018
+ self._values: typing.Dict[builtins.str, typing.Any] = {
23019
+ "event_record_format": event_record_format,
23020
+ "schema_validation_configs": schema_validation_configs,
23021
+ }
23022
+
23023
+ @builtins.property
23024
+ def event_record_format(self) -> EventRecordFormat:
23025
+ '''The record format that Lambda delivers to your function after schema validation.
23026
+
23027
+ - Choose JSON to have Lambda deliver the record to your function as a standard JSON object.
23028
+ - Choose SOURCE to have Lambda deliver the record to your function in its original source format. Lambda removes all schema metadata, such as the schema ID, before sending the record to your function.
23029
+
23030
+ :default: - none
23031
+ '''
23032
+ result = self._values.get("event_record_format")
23033
+ assert result is not None, "Required property 'event_record_format' is missing"
23034
+ return typing.cast(EventRecordFormat, result)
23035
+
23036
+ @builtins.property
23037
+ def schema_validation_configs(self) -> typing.List[KafkaSchemaValidationConfig]:
23038
+ '''An array of schema validation configuration objects, which tell Lambda the message attributes you want to validate and filter using your schema registry.
23039
+
23040
+ :default: - none
23041
+ '''
23042
+ result = self._values.get("schema_validation_configs")
23043
+ assert result is not None, "Required property 'schema_validation_configs' is missing"
23044
+ return typing.cast(typing.List[KafkaSchemaValidationConfig], result)
23045
+
23046
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
23047
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
23048
+
23049
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
23050
+ return not (rhs == self)
23051
+
23052
+ def __repr__(self) -> str:
23053
+ return "SchemaRegistryProps(%s)" % ", ".join(
23054
+ k + "=" + repr(v) for k, v in self._values.items()
23055
+ )
23056
+
23057
+
22317
23058
  @jsii.data_type(
22318
23059
  jsii_type="aws-cdk-lib.aws_lambda.SingletonFunctionProps",
22319
23060
  jsii_struct_bases=[FunctionProps],
@@ -22348,6 +23089,7 @@ class S3CodeV2(
22348
23089
  "log_format": "logFormat",
22349
23090
  "logging_format": "loggingFormat",
22350
23091
  "log_group": "logGroup",
23092
+ "log_removal_policy": "logRemovalPolicy",
22351
23093
  "log_retention": "logRetention",
22352
23094
  "log_retention_retry_options": "logRetentionRetryOptions",
22353
23095
  "log_retention_role": "logRetentionRole",
@@ -22408,6 +23150,7 @@ class SingletonFunctionProps(FunctionProps):
22408
23150
  log_format: typing.Optional[builtins.str] = None,
22409
23151
  logging_format: typing.Optional[LoggingFormat] = None,
22410
23152
  log_group: typing.Optional[_ILogGroup_3c4fa718] = None,
23153
+ log_removal_policy: typing.Optional[_RemovalPolicy_9f93c814] = None,
22411
23154
  log_retention: typing.Optional[_RetentionDays_070f99f0] = None,
22412
23155
  log_retention_retry_options: typing.Optional[typing.Union[LogRetentionRetryOptions, typing.Dict[builtins.str, typing.Any]]] = None,
22413
23156
  log_retention_role: typing.Optional[_IRole_235f5d8e] = None,
@@ -22465,7 +23208,8 @@ class SingletonFunctionProps(FunctionProps):
22465
23208
  :param log_format: (deprecated) Sets the logFormat for the function. Default: "Text"
22466
23209
  :param logging_format: Sets the loggingFormat for the function. Default: LoggingFormat.TEXT
22467
23210
  :param log_group: The log group the function sends logs to. By default, Lambda functions send logs to an automatically created default log group named /aws/lambda/<function name>. However you cannot change the properties of this auto-created log group using the AWS CDK, e.g. you cannot set a different log retention. Use the ``logGroup`` property to create a fully customizable LogGroup ahead of time, and instruct the Lambda function to send logs to it. Providing a user-controlled log group was rolled out to commercial regions on 2023-11-16. If you are deploying to another type of region, please check regional availability first. Default: ``/aws/lambda/${this.functionName}`` - default log group created by Lambda
22468
- :param log_retention: The number of days log events are kept in CloudWatch Logs. When updating this property, unsetting it doesn't remove the log retention policy. To remove the retention policy, set the value to ``INFINITE``. This is a legacy API and we strongly recommend you move away from it if you can. Instead create a fully customizable log group with ``logs.LogGroup`` and use the ``logGroup`` property to instruct the Lambda function to send logs to it. Migrating from ``logRetention`` to ``logGroup`` will cause the name of the log group to change. Users and code and referencing the name verbatim will have to adjust. In AWS CDK code, you can access the log group name directly from the LogGroup construct:: import * as logs from 'aws-cdk-lib/aws-logs'; declare const myLogGroup: logs.LogGroup; myLogGroup.logGroupName; Default: logs.RetentionDays.INFINITE
23211
+ :param log_removal_policy: (deprecated) Determine the removal policy of the log group that is auto-created by this construct. Normally you want to retain the log group so you can diagnose issues from logs even after a deployment that no longer includes the log group. In that case, use the normal date-based retention policy to age out your logs. Default: RemovalPolicy.Retain
23212
+ :param log_retention: (deprecated) The number of days log events are kept in CloudWatch Logs. When updating this property, unsetting it doesn't remove the log retention policy. To remove the retention policy, set the value to ``INFINITE``. This is a legacy API and we strongly recommend you move away from it if you can. Instead create a fully customizable log group with ``logs.LogGroup`` and use the ``logGroup`` property to instruct the Lambda function to send logs to it. Migrating from ``logRetention`` to ``logGroup`` will cause the name of the log group to change. Users and code and referencing the name verbatim will have to adjust. In AWS CDK code, you can access the log group name directly from the LogGroup construct:: import * as logs from 'aws-cdk-lib/aws-logs'; declare const myLogGroup: logs.LogGroup; myLogGroup.logGroupName; Default: logs.RetentionDays.INFINITE
22469
23213
  :param log_retention_retry_options: When log retention is specified, a custom resource attempts to create the CloudWatch log group. These options control the retry policy when interacting with CloudWatch APIs. This is a legacy API and we strongly recommend you migrate to ``logGroup`` if you can. ``logGroup`` allows you to create a fully customizable log group and instruct the Lambda function to send logs to it. Default: - Default AWS SDK retry options.
22470
23214
  :param log_retention_role: The IAM role for the Lambda function associated with the custom resource that sets the retention policy. This is a legacy API and we strongly recommend you migrate to ``logGroup`` if you can. ``logGroup`` allows you to create a fully customizable log group and instruct the Lambda function to send logs to it. Default: - A new role is created.
22471
23215
  :param memory_size: The amount of memory, in MB, that is allocated to your Lambda function. Lambda uses this value to proportionally allocate the amount of CPU power. For more information, see Resource Model in the AWS Lambda Developer Guide. Default: 128
@@ -22540,6 +23284,7 @@ class SingletonFunctionProps(FunctionProps):
22540
23284
  check_type(argname="argument log_format", value=log_format, expected_type=type_hints["log_format"])
22541
23285
  check_type(argname="argument logging_format", value=logging_format, expected_type=type_hints["logging_format"])
22542
23286
  check_type(argname="argument log_group", value=log_group, expected_type=type_hints["log_group"])
23287
+ check_type(argname="argument log_removal_policy", value=log_removal_policy, expected_type=type_hints["log_removal_policy"])
22543
23288
  check_type(argname="argument log_retention", value=log_retention, expected_type=type_hints["log_retention"])
22544
23289
  check_type(argname="argument log_retention_retry_options", value=log_retention_retry_options, expected_type=type_hints["log_retention_retry_options"])
22545
23290
  check_type(argname="argument log_retention_role", value=log_retention_role, expected_type=type_hints["log_retention_role"])
@@ -22630,6 +23375,8 @@ class SingletonFunctionProps(FunctionProps):
22630
23375
  self._values["logging_format"] = logging_format
22631
23376
  if log_group is not None:
22632
23377
  self._values["log_group"] = log_group
23378
+ if log_removal_policy is not None:
23379
+ self._values["log_removal_policy"] = log_removal_policy
22633
23380
  if log_retention is not None:
22634
23381
  self._values["log_retention"] = log_retention
22635
23382
  if log_retention_retry_options is not None:
@@ -23011,9 +23758,27 @@ class SingletonFunctionProps(FunctionProps):
23011
23758
  result = self._values.get("log_group")
23012
23759
  return typing.cast(typing.Optional[_ILogGroup_3c4fa718], result)
23013
23760
 
23761
+ @builtins.property
23762
+ def log_removal_policy(self) -> typing.Optional[_RemovalPolicy_9f93c814]:
23763
+ '''(deprecated) Determine the removal policy of the log group that is auto-created by this construct.
23764
+
23765
+ Normally you want to retain the log group so you can diagnose issues
23766
+ from logs even after a deployment that no longer includes the log group.
23767
+ In that case, use the normal date-based retention policy to age out your
23768
+ logs.
23769
+
23770
+ :default: RemovalPolicy.Retain
23771
+
23772
+ :deprecated: use ``logGroup`` instead
23773
+
23774
+ :stability: deprecated
23775
+ '''
23776
+ result = self._values.get("log_removal_policy")
23777
+ return typing.cast(typing.Optional[_RemovalPolicy_9f93c814], result)
23778
+
23014
23779
  @builtins.property
23015
23780
  def log_retention(self) -> typing.Optional[_RetentionDays_070f99f0]:
23016
- '''The number of days log events are kept in CloudWatch Logs.
23781
+ '''(deprecated) The number of days log events are kept in CloudWatch Logs.
23017
23782
 
23018
23783
  When updating
23019
23784
  this property, unsetting it doesn't remove the log retention policy. To
@@ -23034,6 +23799,10 @@ class SingletonFunctionProps(FunctionProps):
23034
23799
  my_log_group.log_group_name
23035
23800
 
23036
23801
  :default: logs.RetentionDays.INFINITE
23802
+
23803
+ :deprecated: use ``logGroup`` instead
23804
+
23805
+ :stability: deprecated
23037
23806
  '''
23038
23807
  result = self._values.get("log_retention")
23039
23808
  return typing.cast(typing.Optional[_RetentionDays_070f99f0], result)
@@ -23551,20 +24320,30 @@ class StartingPosition(enum.Enum):
23551
24320
 
23552
24321
  Example::
23553
24322
 
23554
- import aws_cdk.aws_kinesis as kinesis
23555
- from aws_cdk.aws_lambda_event_sources import KinesisConsumerEventSource
24323
+ from aws_cdk.aws_lambda_event_sources import ManagedKafkaEventSource
24324
+ from aws_cdk.aws_kms import Key
23556
24325
 
23557
24326
  # my_function: lambda.Function
23558
24327
 
23559
24328
 
23560
- stream = kinesis.Stream(self, "MyStream")
23561
- stream_consumer = kinesis.StreamConsumer(self, "MyStreamConsumer",
23562
- stream=stream,
23563
- stream_consumer_name="MyStreamConsumer"
23564
- )
23565
- my_function.add_event_source(KinesisConsumerEventSource(stream_consumer,
23566
- batch_size=100, # default
23567
- starting_position=lambda_.StartingPosition.TRIM_HORIZON
24329
+ # Your MSK cluster arn
24330
+ cluster_arn = "arn:aws:kafka:us-east-1:0123456789019:cluster/SalesCluster/abcd1234-abcd-cafe-abab-9876543210ab-4"
24331
+
24332
+ # The Kafka topic you want to subscribe to
24333
+ topic = "some-cool-topic"
24334
+
24335
+ # Your self managed KMS key
24336
+ my_key = Key.from_key_arn(self, "SourceBucketEncryptionKey", "arn:aws:kms:us-east-1:123456789012:key/<key-id>")
24337
+ my_function.add_event_source(ManagedKafkaEventSource(
24338
+ cluster_arn=cluster_arn,
24339
+ topic=topic,
24340
+ starting_position=lambda_.StartingPosition.TRIM_HORIZON,
24341
+ filters=[
24342
+ lambda_.FilterCriteria.filter({
24343
+ "string_equals": lambda_.FilterRule.is_equal("test")
24344
+ })
24345
+ ],
24346
+ filter_encryption=my_key
23568
24347
  ))
23569
24348
  '''
23570
24349
 
@@ -25329,6 +26108,7 @@ class CodeSigningConfig(
25329
26108
  "log_format": "logFormat",
25330
26109
  "logging_format": "loggingFormat",
25331
26110
  "log_group": "logGroup",
26111
+ "log_removal_policy": "logRemovalPolicy",
25332
26112
  "log_retention": "logRetention",
25333
26113
  "log_retention_retry_options": "logRetentionRetryOptions",
25334
26114
  "log_retention_role": "logRetentionRole",
@@ -25385,6 +26165,7 @@ class DockerImageFunctionProps(FunctionOptions):
25385
26165
  log_format: typing.Optional[builtins.str] = None,
25386
26166
  logging_format: typing.Optional[LoggingFormat] = None,
25387
26167
  log_group: typing.Optional[_ILogGroup_3c4fa718] = None,
26168
+ log_removal_policy: typing.Optional[_RemovalPolicy_9f93c814] = None,
25388
26169
  log_retention: typing.Optional[_RetentionDays_070f99f0] = None,
25389
26170
  log_retention_retry_options: typing.Optional[typing.Union[LogRetentionRetryOptions, typing.Dict[builtins.str, typing.Any]]] = None,
25390
26171
  log_retention_role: typing.Optional[_IRole_235f5d8e] = None,
@@ -25438,7 +26219,8 @@ class DockerImageFunctionProps(FunctionOptions):
25438
26219
  :param log_format: (deprecated) Sets the logFormat for the function. Default: "Text"
25439
26220
  :param logging_format: Sets the loggingFormat for the function. Default: LoggingFormat.TEXT
25440
26221
  :param log_group: The log group the function sends logs to. By default, Lambda functions send logs to an automatically created default log group named /aws/lambda/<function name>. However you cannot change the properties of this auto-created log group using the AWS CDK, e.g. you cannot set a different log retention. Use the ``logGroup`` property to create a fully customizable LogGroup ahead of time, and instruct the Lambda function to send logs to it. Providing a user-controlled log group was rolled out to commercial regions on 2023-11-16. If you are deploying to another type of region, please check regional availability first. Default: ``/aws/lambda/${this.functionName}`` - default log group created by Lambda
25441
- :param log_retention: The number of days log events are kept in CloudWatch Logs. When updating this property, unsetting it doesn't remove the log retention policy. To remove the retention policy, set the value to ``INFINITE``. This is a legacy API and we strongly recommend you move away from it if you can. Instead create a fully customizable log group with ``logs.LogGroup`` and use the ``logGroup`` property to instruct the Lambda function to send logs to it. Migrating from ``logRetention`` to ``logGroup`` will cause the name of the log group to change. Users and code and referencing the name verbatim will have to adjust. In AWS CDK code, you can access the log group name directly from the LogGroup construct:: import * as logs from 'aws-cdk-lib/aws-logs'; declare const myLogGroup: logs.LogGroup; myLogGroup.logGroupName; Default: logs.RetentionDays.INFINITE
26222
+ :param log_removal_policy: (deprecated) Determine the removal policy of the log group that is auto-created by this construct. Normally you want to retain the log group so you can diagnose issues from logs even after a deployment that no longer includes the log group. In that case, use the normal date-based retention policy to age out your logs. Default: RemovalPolicy.Retain
26223
+ :param log_retention: (deprecated) The number of days log events are kept in CloudWatch Logs. When updating this property, unsetting it doesn't remove the log retention policy. To remove the retention policy, set the value to ``INFINITE``. This is a legacy API and we strongly recommend you move away from it if you can. Instead create a fully customizable log group with ``logs.LogGroup`` and use the ``logGroup`` property to instruct the Lambda function to send logs to it. Migrating from ``logRetention`` to ``logGroup`` will cause the name of the log group to change. Users and code and referencing the name verbatim will have to adjust. In AWS CDK code, you can access the log group name directly from the LogGroup construct:: import * as logs from 'aws-cdk-lib/aws-logs'; declare const myLogGroup: logs.LogGroup; myLogGroup.logGroupName; Default: logs.RetentionDays.INFINITE
25442
26224
  :param log_retention_retry_options: When log retention is specified, a custom resource attempts to create the CloudWatch log group. These options control the retry policy when interacting with CloudWatch APIs. This is a legacy API and we strongly recommend you migrate to ``logGroup`` if you can. ``logGroup`` allows you to create a fully customizable log group and instruct the Lambda function to send logs to it. Default: - Default AWS SDK retry options.
25443
26225
  :param log_retention_role: The IAM role for the Lambda function associated with the custom resource that sets the retention policy. This is a legacy API and we strongly recommend you migrate to ``logGroup`` if you can. ``logGroup`` allows you to create a fully customizable log group and instruct the Lambda function to send logs to it. Default: - A new role is created.
25444
26226
  :param memory_size: The amount of memory, in MB, that is allocated to your Lambda function. Lambda uses this value to proportionally allocate the amount of CPU power. For more information, see Resource Model in the AWS Lambda Developer Guide. Default: 128
@@ -25507,6 +26289,7 @@ class DockerImageFunctionProps(FunctionOptions):
25507
26289
  check_type(argname="argument log_format", value=log_format, expected_type=type_hints["log_format"])
25508
26290
  check_type(argname="argument logging_format", value=logging_format, expected_type=type_hints["logging_format"])
25509
26291
  check_type(argname="argument log_group", value=log_group, expected_type=type_hints["log_group"])
26292
+ check_type(argname="argument log_removal_policy", value=log_removal_policy, expected_type=type_hints["log_removal_policy"])
25510
26293
  check_type(argname="argument log_retention", value=log_retention, expected_type=type_hints["log_retention"])
25511
26294
  check_type(argname="argument log_retention_retry_options", value=log_retention_retry_options, expected_type=type_hints["log_retention_retry_options"])
25512
26295
  check_type(argname="argument log_retention_role", value=log_retention_role, expected_type=type_hints["log_retention_role"])
@@ -25590,6 +26373,8 @@ class DockerImageFunctionProps(FunctionOptions):
25590
26373
  self._values["logging_format"] = logging_format
25591
26374
  if log_group is not None:
25592
26375
  self._values["log_group"] = log_group
26376
+ if log_removal_policy is not None:
26377
+ self._values["log_removal_policy"] = log_removal_policy
25593
26378
  if log_retention is not None:
25594
26379
  self._values["log_retention"] = log_retention
25595
26380
  if log_retention_retry_options is not None:
@@ -25969,9 +26754,27 @@ class DockerImageFunctionProps(FunctionOptions):
25969
26754
  result = self._values.get("log_group")
25970
26755
  return typing.cast(typing.Optional[_ILogGroup_3c4fa718], result)
25971
26756
 
26757
+ @builtins.property
26758
+ def log_removal_policy(self) -> typing.Optional[_RemovalPolicy_9f93c814]:
26759
+ '''(deprecated) Determine the removal policy of the log group that is auto-created by this construct.
26760
+
26761
+ Normally you want to retain the log group so you can diagnose issues
26762
+ from logs even after a deployment that no longer includes the log group.
26763
+ In that case, use the normal date-based retention policy to age out your
26764
+ logs.
26765
+
26766
+ :default: RemovalPolicy.Retain
26767
+
26768
+ :deprecated: use ``logGroup`` instead
26769
+
26770
+ :stability: deprecated
26771
+ '''
26772
+ result = self._values.get("log_removal_policy")
26773
+ return typing.cast(typing.Optional[_RemovalPolicy_9f93c814], result)
26774
+
25972
26775
  @builtins.property
25973
26776
  def log_retention(self) -> typing.Optional[_RetentionDays_070f99f0]:
25974
- '''The number of days log events are kept in CloudWatch Logs.
26777
+ '''(deprecated) The number of days log events are kept in CloudWatch Logs.
25975
26778
 
25976
26779
  When updating
25977
26780
  this property, unsetting it doesn't remove the log retention policy. To
@@ -25992,6 +26795,10 @@ class DockerImageFunctionProps(FunctionOptions):
25992
26795
  my_log_group.log_group_name
25993
26796
 
25994
26797
  :default: logs.RetentionDays.INFINITE
26798
+
26799
+ :deprecated: use ``logGroup`` instead
26800
+
26801
+ :stability: deprecated
25995
26802
  '''
25996
26803
  result = self._values.get("log_retention")
25997
26804
  return typing.cast(typing.Optional[_RetentionDays_070f99f0], result)
@@ -26278,6 +27085,7 @@ class EventSourceMapping(
26278
27085
  # filters: Any
26279
27086
  # function_: lambda.Function
26280
27087
  # key: kms.Key
27088
+ # schema_registry: lambda.ISchemaRegistry
26281
27089
  # source_access_configuration_type: lambda.SourceAccessConfigurationType
26282
27090
 
26283
27091
  event_source_mapping = lambda_.EventSourceMapping(self, "MyEventSourceMapping",
@@ -26309,6 +27117,7 @@ class EventSourceMapping(
26309
27117
  ),
26310
27118
  report_batch_item_failures=False,
26311
27119
  retry_attempts=123,
27120
+ schema_registry_config=schema_registry,
26312
27121
  source_access_configurations=[lambda.SourceAccessConfiguration(
26313
27122
  type=source_access_configuration_type,
26314
27123
  uri="uri"
@@ -26344,6 +27153,7 @@ class EventSourceMapping(
26344
27153
  provisioned_poller_config: typing.Optional[typing.Union[ProvisionedPollerConfig, typing.Dict[builtins.str, typing.Any]]] = None,
26345
27154
  report_batch_item_failures: typing.Optional[builtins.bool] = None,
26346
27155
  retry_attempts: typing.Optional[jsii.Number] = None,
27156
+ schema_registry_config: typing.Optional[ISchemaRegistry] = None,
26347
27157
  source_access_configurations: typing.Optional[typing.Sequence[typing.Union[SourceAccessConfiguration, typing.Dict[builtins.str, typing.Any]]]] = None,
26348
27158
  starting_position: typing.Optional[StartingPosition] = None,
26349
27159
  starting_position_timestamp: typing.Optional[jsii.Number] = None,
@@ -26372,6 +27182,7 @@ class EventSourceMapping(
26372
27182
  :param provisioned_poller_config: Configuration for provisioned pollers that read from the event source. When specified, allows control over the minimum and maximum number of pollers that can be provisioned to process events from the source. Default: - no provisioned pollers
26373
27183
  :param report_batch_item_failures: Allow functions to return partially successful responses for a batch of records. Default: false
26374
27184
  :param retry_attempts: The maximum number of times to retry when the function returns an error. Set to ``undefined`` if you want lambda to keep retrying infinitely or until the record expires. Valid Range: - Minimum value of 0 - Maximum value of 10000 Default: - infinite or until the record expires.
27185
+ :param schema_registry_config: Specific configuration settings for a Kafka schema registry. Default: - none
26375
27186
  :param source_access_configurations: Specific settings like the authentication protocol or the VPC components to secure access to your event source. Default: - none
26376
27187
  :param starting_position: The position in the DynamoDB, Kinesis or MSK stream where AWS Lambda should start reading. Default: - no starting position
26377
27188
  :param starting_position_timestamp: The time from which to start reading, in Unix time seconds. Default: - no timestamp
@@ -26402,6 +27213,7 @@ class EventSourceMapping(
26402
27213
  provisioned_poller_config=provisioned_poller_config,
26403
27214
  report_batch_item_failures=report_batch_item_failures,
26404
27215
  retry_attempts=retry_attempts,
27216
+ schema_registry_config=schema_registry_config,
26405
27217
  source_access_configurations=source_access_configurations,
26406
27218
  starting_position=starting_position,
26407
27219
  starting_position_timestamp=starting_position_timestamp,
@@ -26529,6 +27341,7 @@ class FunctionBase(
26529
27341
  provisioned_poller_config: typing.Optional[typing.Union[ProvisionedPollerConfig, typing.Dict[builtins.str, typing.Any]]] = None,
26530
27342
  report_batch_item_failures: typing.Optional[builtins.bool] = None,
26531
27343
  retry_attempts: typing.Optional[jsii.Number] = None,
27344
+ schema_registry_config: typing.Optional[ISchemaRegistry] = None,
26532
27345
  source_access_configurations: typing.Optional[typing.Sequence[typing.Union[SourceAccessConfiguration, typing.Dict[builtins.str, typing.Any]]]] = None,
26533
27346
  starting_position: typing.Optional[StartingPosition] = None,
26534
27347
  starting_position_timestamp: typing.Optional[jsii.Number] = None,
@@ -26556,6 +27369,7 @@ class FunctionBase(
26556
27369
  :param provisioned_poller_config: Configuration for provisioned pollers that read from the event source. When specified, allows control over the minimum and maximum number of pollers that can be provisioned to process events from the source. Default: - no provisioned pollers
26557
27370
  :param report_batch_item_failures: Allow functions to return partially successful responses for a batch of records. Default: false
26558
27371
  :param retry_attempts: The maximum number of times to retry when the function returns an error. Set to ``undefined`` if you want lambda to keep retrying infinitely or until the record expires. Valid Range: - Minimum value of 0 - Maximum value of 10000 Default: - infinite or until the record expires.
27372
+ :param schema_registry_config: Specific configuration settings for a Kafka schema registry. Default: - none
26559
27373
  :param source_access_configurations: Specific settings like the authentication protocol or the VPC components to secure access to your event source. Default: - none
26560
27374
  :param starting_position: The position in the DynamoDB, Kinesis or MSK stream where AWS Lambda should start reading. Default: - no starting position
26561
27375
  :param starting_position_timestamp: The time from which to start reading, in Unix time seconds. Default: - no timestamp
@@ -26584,6 +27398,7 @@ class FunctionBase(
26584
27398
  provisioned_poller_config=provisioned_poller_config,
26585
27399
  report_batch_item_failures=report_batch_item_failures,
26586
27400
  retry_attempts=retry_attempts,
27401
+ schema_registry_config=schema_registry_config,
26587
27402
  source_access_configurations=source_access_configurations,
26588
27403
  starting_position=starting_position,
26589
27404
  starting_position_timestamp=starting_position_timestamp,
@@ -27530,6 +28345,7 @@ class SingletonFunction(
27530
28345
  log_format: typing.Optional[builtins.str] = None,
27531
28346
  logging_format: typing.Optional[LoggingFormat] = None,
27532
28347
  log_group: typing.Optional[_ILogGroup_3c4fa718] = None,
28348
+ log_removal_policy: typing.Optional[_RemovalPolicy_9f93c814] = None,
27533
28349
  log_retention: typing.Optional[_RetentionDays_070f99f0] = None,
27534
28350
  log_retention_retry_options: typing.Optional[typing.Union[LogRetentionRetryOptions, typing.Dict[builtins.str, typing.Any]]] = None,
27535
28351
  log_retention_role: typing.Optional[_IRole_235f5d8e] = None,
@@ -27588,7 +28404,8 @@ class SingletonFunction(
27588
28404
  :param log_format: (deprecated) Sets the logFormat for the function. Default: "Text"
27589
28405
  :param logging_format: Sets the loggingFormat for the function. Default: LoggingFormat.TEXT
27590
28406
  :param log_group: The log group the function sends logs to. By default, Lambda functions send logs to an automatically created default log group named /aws/lambda/<function name>. However you cannot change the properties of this auto-created log group using the AWS CDK, e.g. you cannot set a different log retention. Use the ``logGroup`` property to create a fully customizable LogGroup ahead of time, and instruct the Lambda function to send logs to it. Providing a user-controlled log group was rolled out to commercial regions on 2023-11-16. If you are deploying to another type of region, please check regional availability first. Default: ``/aws/lambda/${this.functionName}`` - default log group created by Lambda
27591
- :param log_retention: The number of days log events are kept in CloudWatch Logs. When updating this property, unsetting it doesn't remove the log retention policy. To remove the retention policy, set the value to ``INFINITE``. This is a legacy API and we strongly recommend you move away from it if you can. Instead create a fully customizable log group with ``logs.LogGroup`` and use the ``logGroup`` property to instruct the Lambda function to send logs to it. Migrating from ``logRetention`` to ``logGroup`` will cause the name of the log group to change. Users and code and referencing the name verbatim will have to adjust. In AWS CDK code, you can access the log group name directly from the LogGroup construct:: import * as logs from 'aws-cdk-lib/aws-logs'; declare const myLogGroup: logs.LogGroup; myLogGroup.logGroupName; Default: logs.RetentionDays.INFINITE
28407
+ :param log_removal_policy: (deprecated) Determine the removal policy of the log group that is auto-created by this construct. Normally you want to retain the log group so you can diagnose issues from logs even after a deployment that no longer includes the log group. In that case, use the normal date-based retention policy to age out your logs. Default: RemovalPolicy.Retain
28408
+ :param log_retention: (deprecated) The number of days log events are kept in CloudWatch Logs. When updating this property, unsetting it doesn't remove the log retention policy. To remove the retention policy, set the value to ``INFINITE``. This is a legacy API and we strongly recommend you move away from it if you can. Instead create a fully customizable log group with ``logs.LogGroup`` and use the ``logGroup`` property to instruct the Lambda function to send logs to it. Migrating from ``logRetention`` to ``logGroup`` will cause the name of the log group to change. Users and code and referencing the name verbatim will have to adjust. In AWS CDK code, you can access the log group name directly from the LogGroup construct:: import * as logs from 'aws-cdk-lib/aws-logs'; declare const myLogGroup: logs.LogGroup; myLogGroup.logGroupName; Default: logs.RetentionDays.INFINITE
27592
28409
  :param log_retention_retry_options: When log retention is specified, a custom resource attempts to create the CloudWatch log group. These options control the retry policy when interacting with CloudWatch APIs. This is a legacy API and we strongly recommend you migrate to ``logGroup`` if you can. ``logGroup`` allows you to create a fully customizable log group and instruct the Lambda function to send logs to it. Default: - Default AWS SDK retry options.
27593
28410
  :param log_retention_role: The IAM role for the Lambda function associated with the custom resource that sets the retention policy. This is a legacy API and we strongly recommend you migrate to ``logGroup`` if you can. ``logGroup`` allows you to create a fully customizable log group and instruct the Lambda function to send logs to it. Default: - A new role is created.
27594
28411
  :param memory_size: The amount of memory, in MB, that is allocated to your Lambda function. Lambda uses this value to proportionally allocate the amount of CPU power. For more information, see Resource Model in the AWS Lambda Developer Guide. Default: 128
@@ -27648,6 +28465,7 @@ class SingletonFunction(
27648
28465
  log_format=log_format,
27649
28466
  logging_format=logging_format,
27650
28467
  log_group=log_group,
28468
+ log_removal_policy=log_removal_policy,
27651
28469
  log_retention=log_retention,
27652
28470
  log_retention_retry_options=log_retention_retry_options,
27653
28471
  log_retention_role=log_retention_role,
@@ -28566,6 +29384,7 @@ class Function(
28566
29384
  log_format: typing.Optional[builtins.str] = None,
28567
29385
  logging_format: typing.Optional[LoggingFormat] = None,
28568
29386
  log_group: typing.Optional[_ILogGroup_3c4fa718] = None,
29387
+ log_removal_policy: typing.Optional[_RemovalPolicy_9f93c814] = None,
28569
29388
  log_retention: typing.Optional[_RetentionDays_070f99f0] = None,
28570
29389
  log_retention_retry_options: typing.Optional[typing.Union[LogRetentionRetryOptions, typing.Dict[builtins.str, typing.Any]]] = None,
28571
29390
  log_retention_role: typing.Optional[_IRole_235f5d8e] = None,
@@ -28622,7 +29441,8 @@ class Function(
28622
29441
  :param log_format: (deprecated) Sets the logFormat for the function. Default: "Text"
28623
29442
  :param logging_format: Sets the loggingFormat for the function. Default: LoggingFormat.TEXT
28624
29443
  :param log_group: The log group the function sends logs to. By default, Lambda functions send logs to an automatically created default log group named /aws/lambda/<function name>. However you cannot change the properties of this auto-created log group using the AWS CDK, e.g. you cannot set a different log retention. Use the ``logGroup`` property to create a fully customizable LogGroup ahead of time, and instruct the Lambda function to send logs to it. Providing a user-controlled log group was rolled out to commercial regions on 2023-11-16. If you are deploying to another type of region, please check regional availability first. Default: ``/aws/lambda/${this.functionName}`` - default log group created by Lambda
28625
- :param log_retention: The number of days log events are kept in CloudWatch Logs. When updating this property, unsetting it doesn't remove the log retention policy. To remove the retention policy, set the value to ``INFINITE``. This is a legacy API and we strongly recommend you move away from it if you can. Instead create a fully customizable log group with ``logs.LogGroup`` and use the ``logGroup`` property to instruct the Lambda function to send logs to it. Migrating from ``logRetention`` to ``logGroup`` will cause the name of the log group to change. Users and code and referencing the name verbatim will have to adjust. In AWS CDK code, you can access the log group name directly from the LogGroup construct:: import * as logs from 'aws-cdk-lib/aws-logs'; declare const myLogGroup: logs.LogGroup; myLogGroup.logGroupName; Default: logs.RetentionDays.INFINITE
29444
+ :param log_removal_policy: (deprecated) Determine the removal policy of the log group that is auto-created by this construct. Normally you want to retain the log group so you can diagnose issues from logs even after a deployment that no longer includes the log group. In that case, use the normal date-based retention policy to age out your logs. Default: RemovalPolicy.Retain
29445
+ :param log_retention: (deprecated) The number of days log events are kept in CloudWatch Logs. When updating this property, unsetting it doesn't remove the log retention policy. To remove the retention policy, set the value to ``INFINITE``. This is a legacy API and we strongly recommend you move away from it if you can. Instead create a fully customizable log group with ``logs.LogGroup`` and use the ``logGroup`` property to instruct the Lambda function to send logs to it. Migrating from ``logRetention`` to ``logGroup`` will cause the name of the log group to change. Users and code and referencing the name verbatim will have to adjust. In AWS CDK code, you can access the log group name directly from the LogGroup construct:: import * as logs from 'aws-cdk-lib/aws-logs'; declare const myLogGroup: logs.LogGroup; myLogGroup.logGroupName; Default: logs.RetentionDays.INFINITE
28626
29446
  :param log_retention_retry_options: When log retention is specified, a custom resource attempts to create the CloudWatch log group. These options control the retry policy when interacting with CloudWatch APIs. This is a legacy API and we strongly recommend you migrate to ``logGroup`` if you can. ``logGroup`` allows you to create a fully customizable log group and instruct the Lambda function to send logs to it. Default: - Default AWS SDK retry options.
28627
29447
  :param log_retention_role: The IAM role for the Lambda function associated with the custom resource that sets the retention policy. This is a legacy API and we strongly recommend you migrate to ``logGroup`` if you can. ``logGroup`` allows you to create a fully customizable log group and instruct the Lambda function to send logs to it. Default: - A new role is created.
28628
29448
  :param memory_size: The amount of memory, in MB, that is allocated to your Lambda function. Lambda uses this value to proportionally allocate the amount of CPU power. For more information, see Resource Model in the AWS Lambda Developer Guide. Default: 128
@@ -28680,6 +29500,7 @@ class Function(
28680
29500
  log_format=log_format,
28681
29501
  logging_format=logging_format,
28682
29502
  log_group=log_group,
29503
+ log_removal_policy=log_removal_policy,
28683
29504
  log_retention=log_retention,
28684
29505
  log_retention_retry_options=log_retention_retry_options,
28685
29506
  log_retention_role=log_retention_role,
@@ -29412,6 +30233,7 @@ class DockerImageFunction(
29412
30233
  log_format: typing.Optional[builtins.str] = None,
29413
30234
  logging_format: typing.Optional[LoggingFormat] = None,
29414
30235
  log_group: typing.Optional[_ILogGroup_3c4fa718] = None,
30236
+ log_removal_policy: typing.Optional[_RemovalPolicy_9f93c814] = None,
29415
30237
  log_retention: typing.Optional[_RetentionDays_070f99f0] = None,
29416
30238
  log_retention_retry_options: typing.Optional[typing.Union[LogRetentionRetryOptions, typing.Dict[builtins.str, typing.Any]]] = None,
29417
30239
  log_retention_role: typing.Optional[_IRole_235f5d8e] = None,
@@ -29466,7 +30288,8 @@ class DockerImageFunction(
29466
30288
  :param log_format: (deprecated) Sets the logFormat for the function. Default: "Text"
29467
30289
  :param logging_format: Sets the loggingFormat for the function. Default: LoggingFormat.TEXT
29468
30290
  :param log_group: The log group the function sends logs to. By default, Lambda functions send logs to an automatically created default log group named /aws/lambda/<function name>. However you cannot change the properties of this auto-created log group using the AWS CDK, e.g. you cannot set a different log retention. Use the ``logGroup`` property to create a fully customizable LogGroup ahead of time, and instruct the Lambda function to send logs to it. Providing a user-controlled log group was rolled out to commercial regions on 2023-11-16. If you are deploying to another type of region, please check regional availability first. Default: ``/aws/lambda/${this.functionName}`` - default log group created by Lambda
29469
- :param log_retention: The number of days log events are kept in CloudWatch Logs. When updating this property, unsetting it doesn't remove the log retention policy. To remove the retention policy, set the value to ``INFINITE``. This is a legacy API and we strongly recommend you move away from it if you can. Instead create a fully customizable log group with ``logs.LogGroup`` and use the ``logGroup`` property to instruct the Lambda function to send logs to it. Migrating from ``logRetention`` to ``logGroup`` will cause the name of the log group to change. Users and code and referencing the name verbatim will have to adjust. In AWS CDK code, you can access the log group name directly from the LogGroup construct:: import * as logs from 'aws-cdk-lib/aws-logs'; declare const myLogGroup: logs.LogGroup; myLogGroup.logGroupName; Default: logs.RetentionDays.INFINITE
30291
+ :param log_removal_policy: (deprecated) Determine the removal policy of the log group that is auto-created by this construct. Normally you want to retain the log group so you can diagnose issues from logs even after a deployment that no longer includes the log group. In that case, use the normal date-based retention policy to age out your logs. Default: RemovalPolicy.Retain
30292
+ :param log_retention: (deprecated) The number of days log events are kept in CloudWatch Logs. When updating this property, unsetting it doesn't remove the log retention policy. To remove the retention policy, set the value to ``INFINITE``. This is a legacy API and we strongly recommend you move away from it if you can. Instead create a fully customizable log group with ``logs.LogGroup`` and use the ``logGroup`` property to instruct the Lambda function to send logs to it. Migrating from ``logRetention`` to ``logGroup`` will cause the name of the log group to change. Users and code and referencing the name verbatim will have to adjust. In AWS CDK code, you can access the log group name directly from the LogGroup construct:: import * as logs from 'aws-cdk-lib/aws-logs'; declare const myLogGroup: logs.LogGroup; myLogGroup.logGroupName; Default: logs.RetentionDays.INFINITE
29470
30293
  :param log_retention_retry_options: When log retention is specified, a custom resource attempts to create the CloudWatch log group. These options control the retry policy when interacting with CloudWatch APIs. This is a legacy API and we strongly recommend you migrate to ``logGroup`` if you can. ``logGroup`` allows you to create a fully customizable log group and instruct the Lambda function to send logs to it. Default: - Default AWS SDK retry options.
29471
30294
  :param log_retention_role: The IAM role for the Lambda function associated with the custom resource that sets the retention policy. This is a legacy API and we strongly recommend you migrate to ``logGroup`` if you can. ``logGroup`` allows you to create a fully customizable log group and instruct the Lambda function to send logs to it. Default: - A new role is created.
29472
30295
  :param memory_size: The amount of memory, in MB, that is allocated to your Lambda function. Lambda uses this value to proportionally allocate the amount of CPU power. For more information, see Resource Model in the AWS Lambda Developer Guide. Default: 128
@@ -29522,6 +30345,7 @@ class DockerImageFunction(
29522
30345
  log_format=log_format,
29523
30346
  logging_format=logging_format,
29524
30347
  log_group=log_group,
30348
+ log_removal_policy=log_removal_policy,
29525
30349
  log_retention=log_retention,
29526
30350
  log_retention_retry_options=log_retention_retry_options,
29527
30351
  log_retention_role=log_retention_role,
@@ -29618,6 +30442,7 @@ __all__ = [
29618
30442
  "EventInvokeConfig",
29619
30443
  "EventInvokeConfigOptions",
29620
30444
  "EventInvokeConfigProps",
30445
+ "EventRecordFormat",
29621
30446
  "EventSourceMapping",
29622
30447
  "EventSourceMappingOptions",
29623
30448
  "EventSourceMappingProps",
@@ -29648,9 +30473,15 @@ __all__ = [
29648
30473
  "IFunctionUrl",
29649
30474
  "ILayerVersion",
29650
30475
  "IScalableFunctionAttribute",
30476
+ "ISchemaRegistry",
29651
30477
  "IVersion",
29652
30478
  "InlineCode",
29653
30479
  "InvokeMode",
30480
+ "KafkaSchemaRegistryAccessConfig",
30481
+ "KafkaSchemaRegistryAccessConfigType",
30482
+ "KafkaSchemaRegistryConfig",
30483
+ "KafkaSchemaValidationAttribute",
30484
+ "KafkaSchemaValidationConfig",
29654
30485
  "LambdaInsightsVersion",
29655
30486
  "LambdaRuntimeProps",
29656
30487
  "LayerVersion",
@@ -29677,6 +30508,7 @@ __all__ = [
29677
30508
  "RuntimeManagementMode",
29678
30509
  "S3Code",
29679
30510
  "S3CodeV2",
30511
+ "SchemaRegistryProps",
29680
30512
  "SingletonFunction",
29681
30513
  "SingletonFunctionProps",
29682
30514
  "SnapStartConf",
@@ -31503,6 +32335,12 @@ def _typecheckingstub__39c1b3a3185624e50b391ccba8992ee288e54789a9b063a9fbffc3207
31503
32335
  """Type checking stubs"""
31504
32336
  pass
31505
32337
 
32338
+ def _typecheckingstub__913b83169547e1e27e0d17d4e5a189f10545dca54ca45db7a5dc40a7d5cc2999(
32339
+ name: builtins.str,
32340
+ ) -> None:
32341
+ """Type checking stubs"""
32342
+ pass
32343
+
31506
32344
  def _typecheckingstub__7442d2bd60e56a826eab54e95fa6a6ebc8961285a26558c7189840a124a0a2e0(
31507
32345
  *,
31508
32346
  batch_size: typing.Optional[jsii.Number] = None,
@@ -31523,6 +32361,7 @@ def _typecheckingstub__7442d2bd60e56a826eab54e95fa6a6ebc8961285a26558c7189840a12
31523
32361
  provisioned_poller_config: typing.Optional[typing.Union[ProvisionedPollerConfig, typing.Dict[builtins.str, typing.Any]]] = None,
31524
32362
  report_batch_item_failures: typing.Optional[builtins.bool] = None,
31525
32363
  retry_attempts: typing.Optional[jsii.Number] = None,
32364
+ schema_registry_config: typing.Optional[ISchemaRegistry] = None,
31526
32365
  source_access_configurations: typing.Optional[typing.Sequence[typing.Union[SourceAccessConfiguration, typing.Dict[builtins.str, typing.Any]]]] = None,
31527
32366
  starting_position: typing.Optional[StartingPosition] = None,
31528
32367
  starting_position_timestamp: typing.Optional[jsii.Number] = None,
@@ -31552,6 +32391,7 @@ def _typecheckingstub__e74d0bc5516fc715f7302bdf199df23dddf769e98771f0bac2ff026a4
31552
32391
  provisioned_poller_config: typing.Optional[typing.Union[ProvisionedPollerConfig, typing.Dict[builtins.str, typing.Any]]] = None,
31553
32392
  report_batch_item_failures: typing.Optional[builtins.bool] = None,
31554
32393
  retry_attempts: typing.Optional[jsii.Number] = None,
32394
+ schema_registry_config: typing.Optional[ISchemaRegistry] = None,
31555
32395
  source_access_configurations: typing.Optional[typing.Sequence[typing.Union[SourceAccessConfiguration, typing.Dict[builtins.str, typing.Any]]]] = None,
31556
32396
  starting_position: typing.Optional[StartingPosition] = None,
31557
32397
  starting_position_timestamp: typing.Optional[jsii.Number] = None,
@@ -31661,6 +32501,7 @@ def _typecheckingstub__59918bb957d892739733c7a5849db990615fe5329709ad7ba703e0ee4
31661
32501
  log_format: typing.Optional[builtins.str] = None,
31662
32502
  logging_format: typing.Optional[LoggingFormat] = None,
31663
32503
  log_group: typing.Optional[_ILogGroup_3c4fa718] = None,
32504
+ log_removal_policy: typing.Optional[_RemovalPolicy_9f93c814] = None,
31664
32505
  log_retention: typing.Optional[_RetentionDays_070f99f0] = None,
31665
32506
  log_retention_retry_options: typing.Optional[typing.Union[LogRetentionRetryOptions, typing.Dict[builtins.str, typing.Any]]] = None,
31666
32507
  log_retention_role: typing.Optional[_IRole_235f5d8e] = None,
@@ -31716,6 +32557,7 @@ def _typecheckingstub__94e70d11aa3c53737d418dbb9983973dfc06dbdef5c8cc30613cc3c6d
31716
32557
  log_format: typing.Optional[builtins.str] = None,
31717
32558
  logging_format: typing.Optional[LoggingFormat] = None,
31718
32559
  log_group: typing.Optional[_ILogGroup_3c4fa718] = None,
32560
+ log_removal_policy: typing.Optional[_RemovalPolicy_9f93c814] = None,
31719
32561
  log_retention: typing.Optional[_RetentionDays_070f99f0] = None,
31720
32562
  log_retention_retry_options: typing.Optional[typing.Union[LogRetentionRetryOptions, typing.Dict[builtins.str, typing.Any]]] = None,
31721
32563
  log_retention_role: typing.Optional[_IRole_235f5d8e] = None,
@@ -31835,6 +32677,7 @@ def _typecheckingstub__726375d512fd3c0da30be8d20d1c4016974ba77359e6bac8eb3569126
31835
32677
  provisioned_poller_config: typing.Optional[typing.Union[ProvisionedPollerConfig, typing.Dict[builtins.str, typing.Any]]] = None,
31836
32678
  report_batch_item_failures: typing.Optional[builtins.bool] = None,
31837
32679
  retry_attempts: typing.Optional[jsii.Number] = None,
32680
+ schema_registry_config: typing.Optional[ISchemaRegistry] = None,
31838
32681
  source_access_configurations: typing.Optional[typing.Sequence[typing.Union[SourceAccessConfiguration, typing.Dict[builtins.str, typing.Any]]]] = None,
31839
32682
  starting_position: typing.Optional[StartingPosition] = None,
31840
32683
  starting_position_timestamp: typing.Optional[jsii.Number] = None,
@@ -31941,6 +32784,13 @@ def _typecheckingstub__6400e52bafb7e00e3113dbb1e115c4dea946b786b17eee75a6aa6706a
31941
32784
  """Type checking stubs"""
31942
32785
  pass
31943
32786
 
32787
+ def _typecheckingstub__0c68a1588ffc2bca6786310b7681f323e4368d6bf66e13c5fbdc7ef0ad571a22(
32788
+ target: IEventSourceMapping,
32789
+ target_handler: IFunction,
32790
+ ) -> None:
32791
+ """Type checking stubs"""
32792
+ pass
32793
+
31944
32794
  def _typecheckingstub__d163f09d3cc5fe40599d7400b73c5f0814fcf5b50dccd44d5740a368a0d84cf9(
31945
32795
  alias_name: builtins.str,
31946
32796
  *,
@@ -31967,6 +32817,43 @@ def _typecheckingstub__68701e0be659943818e792689f9c11f6ea386ae16b7e76ef2e090037d
31967
32817
  """Type checking stubs"""
31968
32818
  pass
31969
32819
 
32820
+ def _typecheckingstub__a9ed7f710fdd20a96eb8eeb709bbea9f1e52b3ca20bed4ca85cf8341031090d2(
32821
+ *,
32822
+ type: KafkaSchemaRegistryAccessConfigType,
32823
+ uri: builtins.str,
32824
+ ) -> None:
32825
+ """Type checking stubs"""
32826
+ pass
32827
+
32828
+ def _typecheckingstub__4bc6850ec99a0d35e26da78049f4174bb567964e6b20083c7a1e29e3f120f831(
32829
+ name: builtins.str,
32830
+ ) -> None:
32831
+ """Type checking stubs"""
32832
+ pass
32833
+
32834
+ def _typecheckingstub__a3171876130664545cc7c6ac22856db59c006c52bb5f546cb11b18d515fef45e(
32835
+ *,
32836
+ event_record_format: EventRecordFormat,
32837
+ schema_registry_uri: builtins.str,
32838
+ schema_validation_configs: typing.Sequence[typing.Union[KafkaSchemaValidationConfig, typing.Dict[builtins.str, typing.Any]]],
32839
+ access_configs: typing.Optional[typing.Sequence[typing.Union[KafkaSchemaRegistryAccessConfig, typing.Dict[builtins.str, typing.Any]]]] = None,
32840
+ ) -> None:
32841
+ """Type checking stubs"""
32842
+ pass
32843
+
32844
+ def _typecheckingstub__90f583f1aa63ef4c8f67ca1d84697d67f4e81ae0ea5473533af46b85cc17e696(
32845
+ name: builtins.str,
32846
+ ) -> None:
32847
+ """Type checking stubs"""
32848
+ pass
32849
+
32850
+ def _typecheckingstub__89fd450fee20fb5d81fd39157485acaae3ba70536153566208b1778d213a1ae8(
32851
+ *,
32852
+ attribute: KafkaSchemaValidationAttribute,
32853
+ ) -> None:
32854
+ """Type checking stubs"""
32855
+ pass
32856
+
31970
32857
  def _typecheckingstub__263309ccb98199a52576e8475ff6ab5f39d5cf43f49cd26a3d9a85ab711464ad(
31971
32858
  arn: builtins.str,
31972
32859
  ) -> None:
@@ -32218,6 +33105,14 @@ def _typecheckingstub__304505e97ff3b397f5306079c5410e06bb217281e1cc348ada6eef6ae
32218
33105
  """Type checking stubs"""
32219
33106
  pass
32220
33107
 
33108
+ def _typecheckingstub__0915a5e0439a722acf480d4010d03236559e242684c698d0a460dffc5709933b(
33109
+ *,
33110
+ event_record_format: EventRecordFormat,
33111
+ schema_validation_configs: typing.Sequence[typing.Union[KafkaSchemaValidationConfig, typing.Dict[builtins.str, typing.Any]]],
33112
+ ) -> None:
33113
+ """Type checking stubs"""
33114
+ pass
33115
+
32221
33116
  def _typecheckingstub__68a03ec9f866a29c77aabcf8328c63a49511790fa9714874f255b3292623893c(
32222
33117
  *,
32223
33118
  max_event_age: typing.Optional[_Duration_4839e8c3] = None,
@@ -32250,6 +33145,7 @@ def _typecheckingstub__68a03ec9f866a29c77aabcf8328c63a49511790fa9714874f255b3292
32250
33145
  log_format: typing.Optional[builtins.str] = None,
32251
33146
  logging_format: typing.Optional[LoggingFormat] = None,
32252
33147
  log_group: typing.Optional[_ILogGroup_3c4fa718] = None,
33148
+ log_removal_policy: typing.Optional[_RemovalPolicy_9f93c814] = None,
32253
33149
  log_retention: typing.Optional[_RetentionDays_070f99f0] = None,
32254
33150
  log_retention_retry_options: typing.Optional[typing.Union[LogRetentionRetryOptions, typing.Dict[builtins.str, typing.Any]]] = None,
32255
33151
  log_retention_role: typing.Optional[_IRole_235f5d8e] = None,
@@ -32506,6 +33402,7 @@ def _typecheckingstub__04dd97f4b18c00e7ee0981f2428664401ae0b75dbda6102ea3ef53d08
32506
33402
  log_format: typing.Optional[builtins.str] = None,
32507
33403
  logging_format: typing.Optional[LoggingFormat] = None,
32508
33404
  log_group: typing.Optional[_ILogGroup_3c4fa718] = None,
33405
+ log_removal_policy: typing.Optional[_RemovalPolicy_9f93c814] = None,
32509
33406
  log_retention: typing.Optional[_RetentionDays_070f99f0] = None,
32510
33407
  log_retention_retry_options: typing.Optional[typing.Union[LogRetentionRetryOptions, typing.Dict[builtins.str, typing.Any]]] = None,
32511
33408
  log_retention_role: typing.Optional[_IRole_235f5d8e] = None,
@@ -32553,6 +33450,7 @@ def _typecheckingstub__b0460bc5250777612d2b42ec799737ce019fcdc03fe86c6540ab2ecec
32553
33450
  provisioned_poller_config: typing.Optional[typing.Union[ProvisionedPollerConfig, typing.Dict[builtins.str, typing.Any]]] = None,
32554
33451
  report_batch_item_failures: typing.Optional[builtins.bool] = None,
32555
33452
  retry_attempts: typing.Optional[jsii.Number] = None,
33453
+ schema_registry_config: typing.Optional[ISchemaRegistry] = None,
32556
33454
  source_access_configurations: typing.Optional[typing.Sequence[typing.Union[SourceAccessConfiguration, typing.Dict[builtins.str, typing.Any]]]] = None,
32557
33455
  starting_position: typing.Optional[StartingPosition] = None,
32558
33456
  starting_position_timestamp: typing.Optional[jsii.Number] = None,
@@ -32609,6 +33507,7 @@ def _typecheckingstub__bfc312bd9bc4e64c5ae8419715155a56676bb9fe40870f57ffa4f3030
32609
33507
  provisioned_poller_config: typing.Optional[typing.Union[ProvisionedPollerConfig, typing.Dict[builtins.str, typing.Any]]] = None,
32610
33508
  report_batch_item_failures: typing.Optional[builtins.bool] = None,
32611
33509
  retry_attempts: typing.Optional[jsii.Number] = None,
33510
+ schema_registry_config: typing.Optional[ISchemaRegistry] = None,
32612
33511
  source_access_configurations: typing.Optional[typing.Sequence[typing.Union[SourceAccessConfiguration, typing.Dict[builtins.str, typing.Any]]]] = None,
32613
33512
  starting_position: typing.Optional[StartingPosition] = None,
32614
33513
  starting_position_timestamp: typing.Optional[jsii.Number] = None,
@@ -32772,6 +33671,7 @@ def _typecheckingstub__e7b766bff13bb7266787cec9bebb600187e19c1672e530bb9cfa31649
32772
33671
  log_format: typing.Optional[builtins.str] = None,
32773
33672
  logging_format: typing.Optional[LoggingFormat] = None,
32774
33673
  log_group: typing.Optional[_ILogGroup_3c4fa718] = None,
33674
+ log_removal_policy: typing.Optional[_RemovalPolicy_9f93c814] = None,
32775
33675
  log_retention: typing.Optional[_RetentionDays_070f99f0] = None,
32776
33676
  log_retention_retry_options: typing.Optional[typing.Union[LogRetentionRetryOptions, typing.Dict[builtins.str, typing.Any]]] = None,
32777
33677
  log_retention_role: typing.Optional[_IRole_235f5d8e] = None,
@@ -32994,6 +33894,7 @@ def _typecheckingstub__724895b6b59aaf2b678ef25f2beca19fb114fc04ff6b37edef28e12b3
32994
33894
  log_format: typing.Optional[builtins.str] = None,
32995
33895
  logging_format: typing.Optional[LoggingFormat] = None,
32996
33896
  log_group: typing.Optional[_ILogGroup_3c4fa718] = None,
33897
+ log_removal_policy: typing.Optional[_RemovalPolicy_9f93c814] = None,
32997
33898
  log_retention: typing.Optional[_RetentionDays_070f99f0] = None,
32998
33899
  log_retention_retry_options: typing.Optional[typing.Union[LogRetentionRetryOptions, typing.Dict[builtins.str, typing.Any]]] = None,
32999
33900
  log_retention_role: typing.Optional[_IRole_235f5d8e] = None,
@@ -33141,6 +34042,7 @@ def _typecheckingstub__368a49fe1f866c7ea7986c57b6f8488d0fddea8f62bf05ec1ed7eb09b
33141
34042
  log_format: typing.Optional[builtins.str] = None,
33142
34043
  logging_format: typing.Optional[LoggingFormat] = None,
33143
34044
  log_group: typing.Optional[_ILogGroup_3c4fa718] = None,
34045
+ log_removal_policy: typing.Optional[_RemovalPolicy_9f93c814] = None,
33144
34046
  log_retention: typing.Optional[_RetentionDays_070f99f0] = None,
33145
34047
  log_retention_retry_options: typing.Optional[typing.Union[LogRetentionRetryOptions, typing.Dict[builtins.str, typing.Any]]] = None,
33146
34048
  log_retention_role: typing.Optional[_IRole_235f5d8e] = None,