aws-cdk-lib 2.117.0__py3-none-any.whl → 2.119.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of aws-cdk-lib might be problematic. Click here for more details.
- aws_cdk/__init__.py +138 -25
- aws_cdk/_jsii/__init__.py +1 -1
- aws_cdk/_jsii/{aws-cdk-lib@2.117.0.jsii.tgz → aws-cdk-lib@2.119.0.jsii.tgz} +0 -0
- aws_cdk/amzn_sdc/__init__.py +496 -0
- aws_cdk/aws_appsync/__init__.py +94 -22
- aws_cdk/aws_autoscaling/__init__.py +139 -74
- aws_cdk/aws_certificatemanager/__init__.py +164 -3
- aws_cdk/aws_cloud9/__init__.py +3 -3
- aws_cdk/aws_cloudfront/__init__.py +853 -38
- aws_cdk/aws_cloudtrail/__init__.py +54 -34
- aws_cdk/aws_cloudwatch_actions/__init__.py +105 -0
- aws_cdk/aws_codebuild/__init__.py +46 -5
- aws_cdk/aws_codecommit/__init__.py +9 -3
- aws_cdk/aws_codepipeline_actions/__init__.py +54 -0
- aws_cdk/aws_codetest/__init__.py +788 -0
- aws_cdk/aws_cognito/__init__.py +104 -0
- aws_cdk/aws_connect/__init__.py +626 -78
- aws_cdk/aws_docdb/__init__.py +442 -0
- aws_cdk/aws_dynamodb/__init__.py +14 -0
- aws_cdk/aws_ec2/__init__.py +372 -44
- aws_cdk/aws_ecs/__init__.py +192 -35
- aws_cdk/aws_emrserverless/__init__.py +20 -13
- aws_cdk/aws_events/__init__.py +90 -1
- aws_cdk/aws_fis/__init__.py +12 -32
- aws_cdk/aws_globalaccelerator/__init__.py +19 -0
- aws_cdk/aws_glue/__init__.py +329 -0
- aws_cdk/aws_iam/__init__.py +50 -24
- aws_cdk/aws_iot/__init__.py +112 -0
- aws_cdk/aws_iotsitewise/__init__.py +4 -4
- aws_cdk/aws_kendra/__init__.py +10 -5
- aws_cdk/aws_kinesisfirehose/__init__.py +111 -0
- aws_cdk/aws_lambda/__init__.py +180 -407
- aws_cdk/aws_location/__init__.py +1132 -17
- aws_cdk/aws_mediatailor/__init__.py +120 -17
- aws_cdk/aws_networkfirewall/__init__.py +2 -2
- aws_cdk/aws_networkmanager/__init__.py +1 -1
- aws_cdk/aws_omics/__init__.py +4 -4
- aws_cdk/aws_opensearchservice/__init__.py +58 -0
- aws_cdk/aws_pinpoint/__init__.py +14 -6
- aws_cdk/aws_pipes/__init__.py +7 -2
- aws_cdk/aws_rds/__init__.py +247 -16
- aws_cdk/aws_redshift/__init__.py +103 -0
- aws_cdk/aws_route53/__init__.py +68 -20
- aws_cdk/aws_s3/__init__.py +2 -4
- aws_cdk/aws_s3objectlambda/__init__.py +2 -2
- aws_cdk/aws_servicecatalogappregistry/__init__.py +3 -3
- aws_cdk/aws_signer/__init__.py +27 -4
- aws_cdk/aws_ssm/__init__.py +76 -13
- aws_cdk/aws_stepfunctions/__init__.py +110 -5
- aws_cdk/aws_stepfunctions_tasks/__init__.py +84 -29
- aws_cdk/pipelines/__init__.py +136 -37
- {aws_cdk_lib-2.117.0.dist-info → aws_cdk_lib-2.119.0.dist-info}/LICENSE +1 -1
- {aws_cdk_lib-2.117.0.dist-info → aws_cdk_lib-2.119.0.dist-info}/METADATA +98 -12
- {aws_cdk_lib-2.117.0.dist-info → aws_cdk_lib-2.119.0.dist-info}/NOTICE +1 -1
- {aws_cdk_lib-2.117.0.dist-info → aws_cdk_lib-2.119.0.dist-info}/RECORD +57 -55
- {aws_cdk_lib-2.117.0.dist-info → aws_cdk_lib-2.119.0.dist-info}/WHEEL +0 -0
- {aws_cdk_lib-2.117.0.dist-info → aws_cdk_lib-2.119.0.dist-info}/top_level.txt +0 -0
aws_cdk/aws_lambda/__init__.py
CHANGED
|
@@ -5987,8 +5987,6 @@ class CfnFunction(
|
|
|
5987
5987
|
# The values are placeholders you should change.
|
|
5988
5988
|
from aws_cdk import aws_lambda as lambda_
|
|
5989
5989
|
|
|
5990
|
-
# policy: Any
|
|
5991
|
-
|
|
5992
5990
|
cfn_function = lambda_.CfnFunction(self, "MyCfnFunction",
|
|
5993
5991
|
code=lambda.CfnFunction.CodeProperty(
|
|
5994
5992
|
image_uri="imageUri",
|
|
@@ -6035,7 +6033,6 @@ class CfnFunction(
|
|
|
6035
6033
|
),
|
|
6036
6034
|
memory_size=123,
|
|
6037
6035
|
package_type="packageType",
|
|
6038
|
-
policy=policy,
|
|
6039
6036
|
reserved_concurrent_executions=123,
|
|
6040
6037
|
runtime="runtime",
|
|
6041
6038
|
runtime_management_config=lambda.CfnFunction.RuntimeManagementConfigProperty(
|
|
@@ -6085,7 +6082,6 @@ class CfnFunction(
|
|
|
6085
6082
|
logging_config: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union["CfnFunction.LoggingConfigProperty", typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
6086
6083
|
memory_size: typing.Optional[jsii.Number] = None,
|
|
6087
6084
|
package_type: typing.Optional[builtins.str] = None,
|
|
6088
|
-
policy: typing.Any = None,
|
|
6089
6085
|
reserved_concurrent_executions: typing.Optional[jsii.Number] = None,
|
|
6090
6086
|
runtime: typing.Optional[builtins.str] = None,
|
|
6091
6087
|
runtime_management_config: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union["CfnFunction.RuntimeManagementConfigProperty", typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
@@ -6101,29 +6097,28 @@ class CfnFunction(
|
|
|
6101
6097
|
:param code: The code for the function.
|
|
6102
6098
|
:param role: The Amazon Resource Name (ARN) of the function's execution role.
|
|
6103
6099
|
:param architectures: The instruction set architecture that the function supports. Enter a string array with one of the valid values (arm64 or x86_64). The default value is ``x86_64`` .
|
|
6104
|
-
:param code_signing_config_arn: A
|
|
6105
|
-
:param dead_letter_config:
|
|
6100
|
+
:param code_signing_config_arn: To enable code signing for this function, specify the ARN of a code-signing configuration. A code-signing configuration includes a set of signing profiles, which define the trusted publishers for this function.
|
|
6101
|
+
:param dead_letter_config: A dead-letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when they fail processing. For more information, see `Dead-letter queues <https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-dlq>`_ .
|
|
6106
6102
|
:param description: A description of the function.
|
|
6107
|
-
:param environment:
|
|
6108
|
-
:param ephemeral_storage:
|
|
6109
|
-
:param file_system_configs: Connection settings for an Amazon EFS file system. To connect a function to a file system, a mount target must be available in every Availability Zone that your function connects to. If your template contains an AWS::EFS::MountTarget resource, you must also specify a DependsOn attribute to ensure that the mount target is created or updated before the function.
|
|
6110
|
-
:param function_name: The name of the Lambda function, up to 64 characters in length. If you don't specify a name, AWS CloudFormation generates one.
|
|
6111
|
-
:param handler: The name of the method within your code that Lambda calls to
|
|
6103
|
+
:param environment: Environment variables that are accessible from function code during execution.
|
|
6104
|
+
:param ephemeral_storage: The size of the function's ``/tmp`` directory in MB. The default value is 512, but it can be any whole number between 512 and 10,240 MB.
|
|
6105
|
+
:param file_system_configs: Connection settings for an Amazon EFS file system. To connect a function to a file system, a mount target must be available in every Availability Zone that your function connects to. If your template contains an `AWS::EFS::MountTarget <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-efs-mounttarget.html>`_ resource, you must also specify a ``DependsOn`` attribute to ensure that the mount target is created or updated before the function. For more information about using the ``DependsOn`` attribute, see `DependsOn Attribute <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-dependson.html>`_ .
|
|
6106
|
+
:param function_name: The name of the Lambda function, up to 64 characters in length. If you don't specify a name, AWS CloudFormation generates one. If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
|
|
6107
|
+
:param handler: The name of the method within your code that Lambda calls to run your function. Handler is required if the deployment package is a .zip file archive. The format includes the file name. It can also include namespaces and other qualifiers, depending on the runtime. For more information, see `Lambda programming model <https://docs.aws.amazon.com/lambda/latest/dg/foundation-progmodel.html>`_ .
|
|
6112
6108
|
:param image_config: Configuration values that override the container image Dockerfile settings. For more information, see `Container image settings <https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-parms>`_ .
|
|
6113
|
-
:param kms_key_arn: The ARN of the AWS Key Management Service (AWS KMS) key that's used to encrypt your function's environment variables. If it's not
|
|
6114
|
-
:param layers: A list of function layers to add to the function's execution environment. Specify each layer by its ARN, including the version.
|
|
6115
|
-
:param logging_config:
|
|
6116
|
-
:param memory_size: The amount of memory
|
|
6117
|
-
:param package_type:
|
|
6118
|
-
:param policy: The resource policy of your function.
|
|
6109
|
+
:param kms_key_arn: The ARN of the AWS Key Management Service ( AWS KMS ) customer managed key that's used to encrypt your function's `environment variables <https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-encryption>`_ . When `Lambda SnapStart <https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html>`_ is activated, Lambda also uses this key is to encrypt your function's snapshot. If you deploy your function using a container image, Lambda also uses this key to encrypt your function when it's deployed. Note that this is not the same key that's used to protect your container image in the Amazon Elastic Container Registry (Amazon ECR). If you don't provide a customer managed key, Lambda uses a default service key.
|
|
6110
|
+
:param layers: A list of `function layers <https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html>`_ to add to the function's execution environment. Specify each layer by its ARN, including the version.
|
|
6111
|
+
:param logging_config: The function's Amazon CloudWatch Logs configuration settings.
|
|
6112
|
+
:param memory_size: The amount of `memory available to the function <https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-memory-console>`_ at runtime. Increasing the function memory also increases its CPU allocation. The default value is 128 MB. The value can be any multiple of 1 MB. Note that new AWS accounts have reduced concurrency and memory quotas. AWS raises these quotas automatically based on your usage. You can also request a quota increase.
|
|
6113
|
+
:param package_type: The type of deployment package. Set to ``Image`` for container image and set ``Zip`` for .zip file archive.
|
|
6119
6114
|
:param reserved_concurrent_executions: The number of simultaneous executions to reserve for the function.
|
|
6120
|
-
:param runtime: The identifier of the function's runtime.
|
|
6115
|
+
:param runtime: The identifier of the function's `runtime <https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html>`_ . Runtime is required if the deployment package is a .zip file archive. The following list includes deprecated runtimes. For more information, see `Runtime deprecation policy <https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-support-policy>`_ .
|
|
6121
6116
|
:param runtime_management_config: Sets the runtime management configuration for a function's version. For more information, see `Runtime updates <https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html>`_ .
|
|
6122
|
-
:param snap_start: The function's
|
|
6123
|
-
:param tags: A list of tags to apply to the function.
|
|
6124
|
-
:param timeout: The amount of time that Lambda allows a function to run before stopping it. The default is 3 seconds. The maximum allowed value is 900 seconds.
|
|
6125
|
-
:param tracing_config:
|
|
6126
|
-
:param vpc_config:
|
|
6117
|
+
:param snap_start: The function's `AWS Lambda SnapStart <https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html>`_ setting.
|
|
6118
|
+
:param tags: A list of `tags <https://docs.aws.amazon.com/lambda/latest/dg/tagging.html>`_ to apply to the function.
|
|
6119
|
+
:param timeout: The amount of time (in seconds) that Lambda allows a function to run before stopping it. The default is 3 seconds. The maximum allowed value is 900 seconds. For more information, see `Lambda execution environment <https://docs.aws.amazon.com/lambda/latest/dg/runtimes-context.html>`_ .
|
|
6120
|
+
:param tracing_config: Set ``Mode`` to ``Active`` to sample and trace a subset of incoming requests with `X-Ray <https://docs.aws.amazon.com/lambda/latest/dg/services-xray.html>`_ .
|
|
6121
|
+
:param vpc_config: For network connectivity to AWS resources in a VPC, specify a list of security groups and subnets in the VPC. When you connect a function to a VPC, it can access resources and the internet only through that VPC. For more information, see `Configuring a Lambda function to access resources in a VPC <https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html>`_ .
|
|
6127
6122
|
'''
|
|
6128
6123
|
if __debug__:
|
|
6129
6124
|
type_hints = typing.get_type_hints(_typecheckingstub__d971f3872acf20816e6da364ff9e6bec83fe2e68bbb9a7debc845b40036ee553)
|
|
@@ -6147,7 +6142,6 @@ class CfnFunction(
|
|
|
6147
6142
|
logging_config=logging_config,
|
|
6148
6143
|
memory_size=memory_size,
|
|
6149
6144
|
package_type=package_type,
|
|
6150
|
-
policy=policy,
|
|
6151
6145
|
reserved_concurrent_executions=reserved_concurrent_executions,
|
|
6152
6146
|
runtime=runtime,
|
|
6153
6147
|
runtime_management_config=runtime_management_config,
|
|
@@ -6193,7 +6187,7 @@ class CfnFunction(
|
|
|
6193
6187
|
@builtins.property
|
|
6194
6188
|
@jsii.member(jsii_name="attrArn")
|
|
6195
6189
|
def attr_arn(self) -> builtins.str:
|
|
6196
|
-
'''
|
|
6190
|
+
'''The Amazon Resource Name (ARN) of the function.
|
|
6197
6191
|
|
|
6198
6192
|
:cloudformationAttribute: Arn
|
|
6199
6193
|
'''
|
|
@@ -6284,7 +6278,7 @@ class CfnFunction(
|
|
|
6284
6278
|
@builtins.property
|
|
6285
6279
|
@jsii.member(jsii_name="codeSigningConfigArn")
|
|
6286
6280
|
def code_signing_config_arn(self) -> typing.Optional[builtins.str]:
|
|
6287
|
-
'''
|
|
6281
|
+
'''To enable code signing for this function, specify the ARN of a code-signing configuration.'''
|
|
6288
6282
|
return typing.cast(typing.Optional[builtins.str], jsii.get(self, "codeSigningConfigArn"))
|
|
6289
6283
|
|
|
6290
6284
|
@code_signing_config_arn.setter
|
|
@@ -6299,7 +6293,7 @@ class CfnFunction(
|
|
|
6299
6293
|
def dead_letter_config(
|
|
6300
6294
|
self,
|
|
6301
6295
|
) -> typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnFunction.DeadLetterConfigProperty"]]:
|
|
6302
|
-
'''
|
|
6296
|
+
'''A dead-letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when they fail processing.'''
|
|
6303
6297
|
return typing.cast(typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnFunction.DeadLetterConfigProperty"]], jsii.get(self, "deadLetterConfig"))
|
|
6304
6298
|
|
|
6305
6299
|
@dead_letter_config.setter
|
|
@@ -6330,7 +6324,7 @@ class CfnFunction(
|
|
|
6330
6324
|
def environment(
|
|
6331
6325
|
self,
|
|
6332
6326
|
) -> typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnFunction.EnvironmentProperty"]]:
|
|
6333
|
-
'''
|
|
6327
|
+
'''Environment variables that are accessible from function code during execution.'''
|
|
6334
6328
|
return typing.cast(typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnFunction.EnvironmentProperty"]], jsii.get(self, "environment"))
|
|
6335
6329
|
|
|
6336
6330
|
@environment.setter
|
|
@@ -6348,7 +6342,7 @@ class CfnFunction(
|
|
|
6348
6342
|
def ephemeral_storage(
|
|
6349
6343
|
self,
|
|
6350
6344
|
) -> typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnFunction.EphemeralStorageProperty"]]:
|
|
6351
|
-
'''
|
|
6345
|
+
'''The size of the function's ``/tmp`` directory in MB.'''
|
|
6352
6346
|
return typing.cast(typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnFunction.EphemeralStorageProperty"]], jsii.get(self, "ephemeralStorage"))
|
|
6353
6347
|
|
|
6354
6348
|
@ephemeral_storage.setter
|
|
@@ -6395,7 +6389,7 @@ class CfnFunction(
|
|
|
6395
6389
|
@builtins.property
|
|
6396
6390
|
@jsii.member(jsii_name="handler")
|
|
6397
6391
|
def handler(self) -> typing.Optional[builtins.str]:
|
|
6398
|
-
'''The name of the method within your code that Lambda calls to
|
|
6392
|
+
'''The name of the method within your code that Lambda calls to run your function.'''
|
|
6399
6393
|
return typing.cast(typing.Optional[builtins.str], jsii.get(self, "handler"))
|
|
6400
6394
|
|
|
6401
6395
|
@handler.setter
|
|
@@ -6426,7 +6420,7 @@ class CfnFunction(
|
|
|
6426
6420
|
@builtins.property
|
|
6427
6421
|
@jsii.member(jsii_name="kmsKeyArn")
|
|
6428
6422
|
def kms_key_arn(self) -> typing.Optional[builtins.str]:
|
|
6429
|
-
'''The ARN of the AWS Key Management Service (AWS KMS) key that's used to encrypt your function's environment variables.'''
|
|
6423
|
+
'''The ARN of the AWS Key Management Service ( AWS KMS ) customer managed key that's used to encrypt your function's `environment variables <https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-encryption>`_ . When `Lambda SnapStart <https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html>`_ is activated, Lambda also uses this key is to encrypt your function's snapshot. If you deploy your function using a container image, Lambda also uses this key to encrypt your function when it's deployed. Note that this is not the same key that's used to protect your container image in the Amazon Elastic Container Registry (Amazon ECR). If you don't provide a customer managed key, Lambda uses a default service key.'''
|
|
6430
6424
|
return typing.cast(typing.Optional[builtins.str], jsii.get(self, "kmsKeyArn"))
|
|
6431
6425
|
|
|
6432
6426
|
@kms_key_arn.setter
|
|
@@ -6439,7 +6433,7 @@ class CfnFunction(
|
|
|
6439
6433
|
@builtins.property
|
|
6440
6434
|
@jsii.member(jsii_name="layers")
|
|
6441
6435
|
def layers(self) -> typing.Optional[typing.List[builtins.str]]:
|
|
6442
|
-
'''A list of function layers to add to the function's execution environment.'''
|
|
6436
|
+
'''A list of `function layers <https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html>`_ to add to the function's execution environment. Specify each layer by its ARN, including the version.'''
|
|
6443
6437
|
return typing.cast(typing.Optional[typing.List[builtins.str]], jsii.get(self, "layers"))
|
|
6444
6438
|
|
|
6445
6439
|
@layers.setter
|
|
@@ -6454,7 +6448,7 @@ class CfnFunction(
|
|
|
6454
6448
|
def logging_config(
|
|
6455
6449
|
self,
|
|
6456
6450
|
) -> typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnFunction.LoggingConfigProperty"]]:
|
|
6457
|
-
'''
|
|
6451
|
+
'''The function's Amazon CloudWatch Logs configuration settings.'''
|
|
6458
6452
|
return typing.cast(typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnFunction.LoggingConfigProperty"]], jsii.get(self, "loggingConfig"))
|
|
6459
6453
|
|
|
6460
6454
|
@logging_config.setter
|
|
@@ -6470,7 +6464,7 @@ class CfnFunction(
|
|
|
6470
6464
|
@builtins.property
|
|
6471
6465
|
@jsii.member(jsii_name="memorySize")
|
|
6472
6466
|
def memory_size(self) -> typing.Optional[jsii.Number]:
|
|
6473
|
-
'''The amount of memory that your
|
|
6467
|
+
'''The amount of `memory available to the function <https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-memory-console>`_ at runtime. Increasing the function memory also increases its CPU allocation. The default value is 128 MB. The value can be any multiple of 1 MB. Note that new AWS accounts have reduced concurrency and memory quotas. AWS raises these quotas automatically based on your usage. You can also request a quota increase.'''
|
|
6474
6468
|
return typing.cast(typing.Optional[jsii.Number], jsii.get(self, "memorySize"))
|
|
6475
6469
|
|
|
6476
6470
|
@memory_size.setter
|
|
@@ -6483,7 +6477,7 @@ class CfnFunction(
|
|
|
6483
6477
|
@builtins.property
|
|
6484
6478
|
@jsii.member(jsii_name="packageType")
|
|
6485
6479
|
def package_type(self) -> typing.Optional[builtins.str]:
|
|
6486
|
-
'''
|
|
6480
|
+
'''The type of deployment package.'''
|
|
6487
6481
|
return typing.cast(typing.Optional[builtins.str], jsii.get(self, "packageType"))
|
|
6488
6482
|
|
|
6489
6483
|
@package_type.setter
|
|
@@ -6493,19 +6487,6 @@ class CfnFunction(
|
|
|
6493
6487
|
check_type(argname="argument value", value=value, expected_type=type_hints["value"])
|
|
6494
6488
|
jsii.set(self, "packageType", value)
|
|
6495
6489
|
|
|
6496
|
-
@builtins.property
|
|
6497
|
-
@jsii.member(jsii_name="policy")
|
|
6498
|
-
def policy(self) -> typing.Any:
|
|
6499
|
-
'''The resource policy of your function.'''
|
|
6500
|
-
return typing.cast(typing.Any, jsii.get(self, "policy"))
|
|
6501
|
-
|
|
6502
|
-
@policy.setter
|
|
6503
|
-
def policy(self, value: typing.Any) -> None:
|
|
6504
|
-
if __debug__:
|
|
6505
|
-
type_hints = typing.get_type_hints(_typecheckingstub__4a54210e26bffc8d85473b7ef012a678281a822dad29846097f8060e1a584fd8)
|
|
6506
|
-
check_type(argname="argument value", value=value, expected_type=type_hints["value"])
|
|
6507
|
-
jsii.set(self, "policy", value)
|
|
6508
|
-
|
|
6509
6490
|
@builtins.property
|
|
6510
6491
|
@jsii.member(jsii_name="reservedConcurrentExecutions")
|
|
6511
6492
|
def reserved_concurrent_executions(self) -> typing.Optional[jsii.Number]:
|
|
@@ -6525,7 +6506,7 @@ class CfnFunction(
|
|
|
6525
6506
|
@builtins.property
|
|
6526
6507
|
@jsii.member(jsii_name="runtime")
|
|
6527
6508
|
def runtime(self) -> typing.Optional[builtins.str]:
|
|
6528
|
-
'''The identifier of the function's runtime.'''
|
|
6509
|
+
'''The identifier of the function's `runtime <https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html>`_ . Runtime is required if the deployment package is a .zip file archive.'''
|
|
6529
6510
|
return typing.cast(typing.Optional[builtins.str], jsii.get(self, "runtime"))
|
|
6530
6511
|
|
|
6531
6512
|
@runtime.setter
|
|
@@ -6558,7 +6539,7 @@ class CfnFunction(
|
|
|
6558
6539
|
def snap_start(
|
|
6559
6540
|
self,
|
|
6560
6541
|
) -> typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnFunction.SnapStartProperty"]]:
|
|
6561
|
-
'''The function's SnapStart setting.'''
|
|
6542
|
+
'''The function's `AWS Lambda SnapStart <https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html>`_ setting.'''
|
|
6562
6543
|
return typing.cast(typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnFunction.SnapStartProperty"]], jsii.get(self, "snapStart"))
|
|
6563
6544
|
|
|
6564
6545
|
@snap_start.setter
|
|
@@ -6574,7 +6555,7 @@ class CfnFunction(
|
|
|
6574
6555
|
@builtins.property
|
|
6575
6556
|
@jsii.member(jsii_name="tagsRaw")
|
|
6576
6557
|
def tags_raw(self) -> typing.Optional[typing.List[_CfnTag_f6864754]]:
|
|
6577
|
-
'''A list of tags to apply to the function.'''
|
|
6558
|
+
'''A list of `tags <https://docs.aws.amazon.com/lambda/latest/dg/tagging.html>`_ to apply to the function.'''
|
|
6578
6559
|
return typing.cast(typing.Optional[typing.List[_CfnTag_f6864754]], jsii.get(self, "tagsRaw"))
|
|
6579
6560
|
|
|
6580
6561
|
@tags_raw.setter
|
|
@@ -6587,7 +6568,7 @@ class CfnFunction(
|
|
|
6587
6568
|
@builtins.property
|
|
6588
6569
|
@jsii.member(jsii_name="timeout")
|
|
6589
6570
|
def timeout(self) -> typing.Optional[jsii.Number]:
|
|
6590
|
-
'''The amount of time that Lambda allows a function to run before stopping it.'''
|
|
6571
|
+
'''The amount of time (in seconds) that Lambda allows a function to run before stopping it.'''
|
|
6591
6572
|
return typing.cast(typing.Optional[jsii.Number], jsii.get(self, "timeout"))
|
|
6592
6573
|
|
|
6593
6574
|
@timeout.setter
|
|
@@ -6602,7 +6583,7 @@ class CfnFunction(
|
|
|
6602
6583
|
def tracing_config(
|
|
6603
6584
|
self,
|
|
6604
6585
|
) -> typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnFunction.TracingConfigProperty"]]:
|
|
6605
|
-
'''
|
|
6586
|
+
'''Set ``Mode`` to ``Active`` to sample and trace a subset of incoming requests with `X-Ray <https://docs.aws.amazon.com/lambda/latest/dg/services-xray.html>`_ .'''
|
|
6606
6587
|
return typing.cast(typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnFunction.TracingConfigProperty"]], jsii.get(self, "tracingConfig"))
|
|
6607
6588
|
|
|
6608
6589
|
@tracing_config.setter
|
|
@@ -6620,7 +6601,7 @@ class CfnFunction(
|
|
|
6620
6601
|
def vpc_config(
|
|
6621
6602
|
self,
|
|
6622
6603
|
) -> typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnFunction.VpcConfigProperty"]]:
|
|
6623
|
-
'''
|
|
6604
|
+
'''For network connectivity to AWS resources in a VPC, specify a list of security groups and subnets in the VPC.'''
|
|
6624
6605
|
return typing.cast(typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnFunction.VpcConfigProperty"]], jsii.get(self, "vpcConfig"))
|
|
6625
6606
|
|
|
6626
6607
|
@vpc_config.setter
|
|
@@ -6658,11 +6639,11 @@ class CfnFunction(
|
|
|
6658
6639
|
|
|
6659
6640
|
Changes to a deployment package in Amazon S3 or a container image in ECR are not detected automatically during stack updates. To update the function code, change the object key or version in the template.
|
|
6660
6641
|
|
|
6661
|
-
:param image_uri:
|
|
6662
|
-
:param s3_bucket: An Amazon S3 bucket in the same AWS Region as your function. The bucket can be in a different AWS account.
|
|
6642
|
+
:param image_uri: URI of a `container image <https://docs.aws.amazon.com/lambda/latest/dg/lambda-images.html>`_ in the Amazon ECR registry.
|
|
6643
|
+
:param s3_bucket: An Amazon S3 bucket in the same AWS Region as your function. The bucket can be in a different AWS account .
|
|
6663
6644
|
:param s3_key: The Amazon S3 key of the deployment package.
|
|
6664
6645
|
:param s3_object_version: For versioned objects, the version of the deployment package object to use.
|
|
6665
|
-
:param zip_file: The source code of your Lambda function. If you include your function source inline with this parameter, AWS CloudFormation places it in a file named index and zips it to create a deployment package
|
|
6646
|
+
:param zip_file: (Node.js and Python) The source code of your Lambda function. If you include your function source inline with this parameter, AWS CloudFormation places it in a file named ``index`` and zips it to create a `deployment package <https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-package.html>`_ . This zip file cannot exceed 4MB. For the ``Handler`` property, the first part of the handler identifier must be ``index`` . For example, ``index.handler`` . For JSON, you must escape quotes and special characters such as newline ( ``\\n`` ) with a backslash. If you specify a function that interacts with an AWS CloudFormation custom resource, you don't have to write your own functions to send responses to the custom resource that invoked the function. AWS CloudFormation provides a response module ( `cfn-response <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-lambda-function-code-cfnresponsemodule.html>`_ ) that simplifies sending responses. See `Using AWS Lambda with AWS CloudFormation <https://docs.aws.amazon.com/lambda/latest/dg/services-cloudformation.html>`_ for details.
|
|
6666
6647
|
|
|
6667
6648
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-code.html
|
|
6668
6649
|
:exampleMetadata: fixture=_generated
|
|
@@ -6702,7 +6683,7 @@ class CfnFunction(
|
|
|
6702
6683
|
|
|
6703
6684
|
@builtins.property
|
|
6704
6685
|
def image_uri(self) -> typing.Optional[builtins.str]:
|
|
6705
|
-
'''
|
|
6686
|
+
'''URI of a `container image <https://docs.aws.amazon.com/lambda/latest/dg/lambda-images.html>`_ in the Amazon ECR registry.
|
|
6706
6687
|
|
|
6707
6688
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-code.html#cfn-lambda-function-code-imageuri
|
|
6708
6689
|
'''
|
|
@@ -6713,7 +6694,7 @@ class CfnFunction(
|
|
|
6713
6694
|
def s3_bucket(self) -> typing.Optional[builtins.str]:
|
|
6714
6695
|
'''An Amazon S3 bucket in the same AWS Region as your function.
|
|
6715
6696
|
|
|
6716
|
-
The bucket can be in a different AWS account.
|
|
6697
|
+
The bucket can be in a different AWS account .
|
|
6717
6698
|
|
|
6718
6699
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-code.html#cfn-lambda-function-code-s3bucket
|
|
6719
6700
|
'''
|
|
@@ -6740,9 +6721,11 @@ class CfnFunction(
|
|
|
6740
6721
|
|
|
6741
6722
|
@builtins.property
|
|
6742
6723
|
def zip_file(self) -> typing.Optional[builtins.str]:
|
|
6743
|
-
'''The source code of your Lambda function.
|
|
6724
|
+
'''(Node.js and Python) The source code of your Lambda function. If you include your function source inline with this parameter, AWS CloudFormation places it in a file named ``index`` and zips it to create a `deployment package <https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-package.html>`_ . This zip file cannot exceed 4MB. For the ``Handler`` property, the first part of the handler identifier must be ``index`` . For example, ``index.handler`` .
|
|
6744
6725
|
|
|
6745
|
-
|
|
6726
|
+
For JSON, you must escape quotes and special characters such as newline ( ``\\n`` ) with a backslash.
|
|
6727
|
+
|
|
6728
|
+
If you specify a function that interacts with an AWS CloudFormation custom resource, you don't have to write your own functions to send responses to the custom resource that invoked the function. AWS CloudFormation provides a response module ( `cfn-response <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-lambda-function-code-cfnresponsemodule.html>`_ ) that simplifies sending responses. See `Using AWS Lambda with AWS CloudFormation <https://docs.aws.amazon.com/lambda/latest/dg/services-cloudformation.html>`_ for details.
|
|
6746
6729
|
|
|
6747
6730
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-code.html#cfn-lambda-function-code-zipfile
|
|
6748
6731
|
'''
|
|
@@ -6767,7 +6750,7 @@ class CfnFunction(
|
|
|
6767
6750
|
)
|
|
6768
6751
|
class DeadLetterConfigProperty:
|
|
6769
6752
|
def __init__(self, *, target_arn: typing.Optional[builtins.str] = None) -> None:
|
|
6770
|
-
'''The dead-letter queue for failed asynchronous invocations.
|
|
6753
|
+
'''The `dead-letter queue <https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#dlq>`_ for failed asynchronous invocations.
|
|
6771
6754
|
|
|
6772
6755
|
:param target_arn: The Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic.
|
|
6773
6756
|
|
|
@@ -6824,7 +6807,9 @@ class CfnFunction(
|
|
|
6824
6807
|
) -> None:
|
|
6825
6808
|
'''A function's environment variable settings.
|
|
6826
6809
|
|
|
6827
|
-
|
|
6810
|
+
You can use environment variables to adjust your function's behavior without updating code. An environment variable is a pair of strings that are stored in a function's version-specific configuration.
|
|
6811
|
+
|
|
6812
|
+
:param variables: Environment variable key-value pairs. For more information, see `Using Lambda environment variables <https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html>`_ .
|
|
6828
6813
|
|
|
6829
6814
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-environment.html
|
|
6830
6815
|
:exampleMetadata: fixture=_generated
|
|
@@ -6854,6 +6839,8 @@ class CfnFunction(
|
|
|
6854
6839
|
) -> typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Mapping[builtins.str, builtins.str]]]:
|
|
6855
6840
|
'''Environment variable key-value pairs.
|
|
6856
6841
|
|
|
6842
|
+
For more information, see `Using Lambda environment variables <https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html>`_ .
|
|
6843
|
+
|
|
6857
6844
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-environment.html#cfn-lambda-function-environment-variables
|
|
6858
6845
|
'''
|
|
6859
6846
|
result = self._values.get("variables")
|
|
@@ -6877,9 +6864,11 @@ class CfnFunction(
|
|
|
6877
6864
|
)
|
|
6878
6865
|
class EphemeralStorageProperty:
|
|
6879
6866
|
def __init__(self, *, size: jsii.Number) -> None:
|
|
6880
|
-
'''
|
|
6867
|
+
'''The size of the function's ``/tmp`` directory in MB.
|
|
6881
6868
|
|
|
6882
|
-
|
|
6869
|
+
The default value is 512, but it can be any whole number between 512 and 10,240 MB.
|
|
6870
|
+
|
|
6871
|
+
:param size: The size of the function's ``/tmp`` directory.
|
|
6883
6872
|
|
|
6884
6873
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-ephemeralstorage.html
|
|
6885
6874
|
:exampleMetadata: fixture=_generated
|
|
@@ -6903,7 +6892,7 @@ class CfnFunction(
|
|
|
6903
6892
|
|
|
6904
6893
|
@builtins.property
|
|
6905
6894
|
def size(self) -> jsii.Number:
|
|
6906
|
-
'''The
|
|
6895
|
+
'''The size of the function's ``/tmp`` directory.
|
|
6907
6896
|
|
|
6908
6897
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-ephemeralstorage.html#cfn-lambda-function-ephemeralstorage-size
|
|
6909
6898
|
'''
|
|
@@ -6937,7 +6926,7 @@ class CfnFunction(
|
|
|
6937
6926
|
'''Details about the connection between a Lambda function and an `Amazon EFS file system <https://docs.aws.amazon.com/lambda/latest/dg/configuration-filesystem.html>`_ .
|
|
6938
6927
|
|
|
6939
6928
|
:param arn: The Amazon Resource Name (ARN) of the Amazon EFS access point that provides access to the file system.
|
|
6940
|
-
:param local_mount_path: The path where the function can access the file system, starting with
|
|
6929
|
+
:param local_mount_path: The path where the function can access the file system, starting with ``/mnt/`` .
|
|
6941
6930
|
|
|
6942
6931
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-filesystemconfig.html
|
|
6943
6932
|
:exampleMetadata: fixture=_generated
|
|
@@ -6974,7 +6963,7 @@ class CfnFunction(
|
|
|
6974
6963
|
|
|
6975
6964
|
@builtins.property
|
|
6976
6965
|
def local_mount_path(self) -> builtins.str:
|
|
6977
|
-
'''The path where the function can access the file system, starting with
|
|
6966
|
+
'''The path where the function can access the file system, starting with ``/mnt/`` .
|
|
6978
6967
|
|
|
6979
6968
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-filesystemconfig.html#cfn-lambda-function-filesystemconfig-localmountpath
|
|
6980
6969
|
'''
|
|
@@ -7014,9 +7003,9 @@ class CfnFunction(
|
|
|
7014
7003
|
|
|
7015
7004
|
For more information, see `Container image settings <https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-parms>`_ .
|
|
7016
7005
|
|
|
7017
|
-
:param command:
|
|
7018
|
-
:param entry_point:
|
|
7019
|
-
:param working_directory:
|
|
7006
|
+
:param command: Specifies parameters that you want to pass in with ENTRYPOINT. You can specify a maximum of 1,500 parameters in the list.
|
|
7007
|
+
:param entry_point: Specifies the entry point to their application, which is typically the location of the runtime executable. You can specify a maximum of 1,500 string entries in the list.
|
|
7008
|
+
:param working_directory: Specifies the working directory. The length of the directory string cannot exceed 1,000 characters.
|
|
7020
7009
|
|
|
7021
7010
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-imageconfig.html
|
|
7022
7011
|
:exampleMetadata: fixture=_generated
|
|
@@ -7048,7 +7037,9 @@ class CfnFunction(
|
|
|
7048
7037
|
|
|
7049
7038
|
@builtins.property
|
|
7050
7039
|
def command(self) -> typing.Optional[typing.List[builtins.str]]:
|
|
7051
|
-
'''
|
|
7040
|
+
'''Specifies parameters that you want to pass in with ENTRYPOINT.
|
|
7041
|
+
|
|
7042
|
+
You can specify a maximum of 1,500 parameters in the list.
|
|
7052
7043
|
|
|
7053
7044
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-imageconfig.html#cfn-lambda-function-imageconfig-command
|
|
7054
7045
|
'''
|
|
@@ -7057,7 +7048,9 @@ class CfnFunction(
|
|
|
7057
7048
|
|
|
7058
7049
|
@builtins.property
|
|
7059
7050
|
def entry_point(self) -> typing.Optional[typing.List[builtins.str]]:
|
|
7060
|
-
'''
|
|
7051
|
+
'''Specifies the entry point to their application, which is typically the location of the runtime executable.
|
|
7052
|
+
|
|
7053
|
+
You can specify a maximum of 1,500 string entries in the list.
|
|
7061
7054
|
|
|
7062
7055
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-imageconfig.html#cfn-lambda-function-imageconfig-entrypoint
|
|
7063
7056
|
'''
|
|
@@ -7066,7 +7059,9 @@ class CfnFunction(
|
|
|
7066
7059
|
|
|
7067
7060
|
@builtins.property
|
|
7068
7061
|
def working_directory(self) -> typing.Optional[builtins.str]:
|
|
7069
|
-
'''
|
|
7062
|
+
'''Specifies the working directory.
|
|
7063
|
+
|
|
7064
|
+
The length of the directory string cannot exceed 1,000 characters.
|
|
7070
7065
|
|
|
7071
7066
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-imageconfig.html#cfn-lambda-function-imageconfig-workingdirectory
|
|
7072
7067
|
'''
|
|
@@ -7103,12 +7098,12 @@ class CfnFunction(
|
|
|
7103
7098
|
log_group: typing.Optional[builtins.str] = None,
|
|
7104
7099
|
system_log_level: typing.Optional[builtins.str] = None,
|
|
7105
7100
|
) -> None:
|
|
7106
|
-
'''
|
|
7101
|
+
'''The function's Amazon CloudWatch Logs configuration settings.
|
|
7107
7102
|
|
|
7108
|
-
:param application_log_level:
|
|
7109
|
-
:param log_format:
|
|
7110
|
-
:param log_group:
|
|
7111
|
-
:param system_log_level:
|
|
7103
|
+
:param application_log_level: Set this property to filter the application logs for your function that Lambda sends to CloudWatch. Lambda only sends application logs at the selected level and lower.
|
|
7104
|
+
:param log_format: The format in which Lambda sends your function's application and system logs to CloudWatch. Select between plain text and structured JSON.
|
|
7105
|
+
:param log_group: The name of the Amazon CloudWatch log group the function sends logs to. By default, Lambda functions send logs to a default log group named ``/aws/lambda/<function name>`` . To use a different log group, enter an existing log group or enter a new log group name.
|
|
7106
|
+
:param system_log_level: Set this property to filter the system logs for your function that Lambda sends to CloudWatch. Lambda only sends system logs at the selected level and lower.
|
|
7112
7107
|
|
|
7113
7108
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-loggingconfig.html
|
|
7114
7109
|
:exampleMetadata: fixture=_generated
|
|
@@ -7144,7 +7139,9 @@ class CfnFunction(
|
|
|
7144
7139
|
|
|
7145
7140
|
@builtins.property
|
|
7146
7141
|
def application_log_level(self) -> typing.Optional[builtins.str]:
|
|
7147
|
-
'''
|
|
7142
|
+
'''Set this property to filter the application logs for your function that Lambda sends to CloudWatch.
|
|
7143
|
+
|
|
7144
|
+
Lambda only sends application logs at the selected level and lower.
|
|
7148
7145
|
|
|
7149
7146
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-loggingconfig.html#cfn-lambda-function-loggingconfig-applicationloglevel
|
|
7150
7147
|
'''
|
|
@@ -7153,7 +7150,9 @@ class CfnFunction(
|
|
|
7153
7150
|
|
|
7154
7151
|
@builtins.property
|
|
7155
7152
|
def log_format(self) -> typing.Optional[builtins.str]:
|
|
7156
|
-
'''
|
|
7153
|
+
'''The format in which Lambda sends your function's application and system logs to CloudWatch.
|
|
7154
|
+
|
|
7155
|
+
Select between plain text and structured JSON.
|
|
7157
7156
|
|
|
7158
7157
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-loggingconfig.html#cfn-lambda-function-loggingconfig-logformat
|
|
7159
7158
|
'''
|
|
@@ -7162,7 +7161,9 @@ class CfnFunction(
|
|
|
7162
7161
|
|
|
7163
7162
|
@builtins.property
|
|
7164
7163
|
def log_group(self) -> typing.Optional[builtins.str]:
|
|
7165
|
-
'''
|
|
7164
|
+
'''The name of the Amazon CloudWatch log group the function sends logs to.
|
|
7165
|
+
|
|
7166
|
+
By default, Lambda functions send logs to a default log group named ``/aws/lambda/<function name>`` . To use a different log group, enter an existing log group or enter a new log group name.
|
|
7166
7167
|
|
|
7167
7168
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-loggingconfig.html#cfn-lambda-function-loggingconfig-loggroup
|
|
7168
7169
|
'''
|
|
@@ -7171,7 +7172,9 @@ class CfnFunction(
|
|
|
7171
7172
|
|
|
7172
7173
|
@builtins.property
|
|
7173
7174
|
def system_log_level(self) -> typing.Optional[builtins.str]:
|
|
7174
|
-
'''
|
|
7175
|
+
'''Set this property to filter the system logs for your function that Lambda sends to CloudWatch.
|
|
7176
|
+
|
|
7177
|
+
Lambda only sends system logs at the selected level and lower.
|
|
7175
7178
|
|
|
7176
7179
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-loggingconfig.html#cfn-lambda-function-loggingconfig-systemloglevel
|
|
7177
7180
|
'''
|
|
@@ -7208,8 +7211,8 @@ class CfnFunction(
|
|
|
7208
7211
|
|
|
7209
7212
|
For more information, see `Runtime updates <https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html>`_ .
|
|
7210
7213
|
|
|
7211
|
-
:param update_runtime_on:
|
|
7212
|
-
:param runtime_version_arn:
|
|
7214
|
+
:param update_runtime_on: Specify the runtime update mode. - *Auto (default)* - Automatically update to the most recent and secure runtime version using a `Two-phase runtime version rollout <https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html#runtime-management-two-phase>`_ . This is the best choice for most customers to ensure they always benefit from runtime updates. - *FunctionUpdate* - Lambda updates the runtime of you function to the most recent and secure runtime version when you update your function. This approach synchronizes runtime updates with function deployments, giving you control over when runtime updates are applied and allowing you to detect and mitigate rare runtime update incompatibilities early. When using this setting, you need to regularly update your functions to keep their runtime up-to-date. - *Manual* - You specify a runtime version in your function configuration. The function will use this runtime version indefinitely. In the rare case where a new runtime version is incompatible with an existing function, this allows you to roll back your function to an earlier runtime version. For more information, see `Roll back a runtime version <https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html#runtime-management-rollback>`_ . *Valid Values* : ``Auto`` | ``FunctionUpdate`` | ``Manual``
|
|
7215
|
+
:param runtime_version_arn: The ARN of the runtime version you want the function to use. .. epigraph:: This is only required if you're using the *Manual* runtime update mode.
|
|
7213
7216
|
|
|
7214
7217
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-runtimemanagementconfig.html
|
|
7215
7218
|
:exampleMetadata: fixture=_generated
|
|
@@ -7239,7 +7242,13 @@ class CfnFunction(
|
|
|
7239
7242
|
|
|
7240
7243
|
@builtins.property
|
|
7241
7244
|
def update_runtime_on(self) -> builtins.str:
|
|
7242
|
-
'''
|
|
7245
|
+
'''Specify the runtime update mode.
|
|
7246
|
+
|
|
7247
|
+
- *Auto (default)* - Automatically update to the most recent and secure runtime version using a `Two-phase runtime version rollout <https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html#runtime-management-two-phase>`_ . This is the best choice for most customers to ensure they always benefit from runtime updates.
|
|
7248
|
+
- *FunctionUpdate* - Lambda updates the runtime of you function to the most recent and secure runtime version when you update your function. This approach synchronizes runtime updates with function deployments, giving you control over when runtime updates are applied and allowing you to detect and mitigate rare runtime update incompatibilities early. When using this setting, you need to regularly update your functions to keep their runtime up-to-date.
|
|
7249
|
+
- *Manual* - You specify a runtime version in your function configuration. The function will use this runtime version indefinitely. In the rare case where a new runtime version is incompatible with an existing function, this allows you to roll back your function to an earlier runtime version. For more information, see `Roll back a runtime version <https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html#runtime-management-rollback>`_ .
|
|
7250
|
+
|
|
7251
|
+
*Valid Values* : ``Auto`` | ``FunctionUpdate`` | ``Manual``
|
|
7243
7252
|
|
|
7244
7253
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-runtimemanagementconfig.html#cfn-lambda-function-runtimemanagementconfig-updateruntimeon
|
|
7245
7254
|
'''
|
|
@@ -7249,7 +7258,11 @@ class CfnFunction(
|
|
|
7249
7258
|
|
|
7250
7259
|
@builtins.property
|
|
7251
7260
|
def runtime_version_arn(self) -> typing.Optional[builtins.str]:
|
|
7252
|
-
'''
|
|
7261
|
+
'''The ARN of the runtime version you want the function to use.
|
|
7262
|
+
|
|
7263
|
+
.. epigraph::
|
|
7264
|
+
|
|
7265
|
+
This is only required if you're using the *Manual* runtime update mode.
|
|
7253
7266
|
|
|
7254
7267
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-runtimemanagementconfig.html#cfn-lambda-function-runtimemanagementconfig-runtimeversionarn
|
|
7255
7268
|
'''
|
|
@@ -7274,11 +7287,9 @@ class CfnFunction(
|
|
|
7274
7287
|
)
|
|
7275
7288
|
class SnapStartProperty:
|
|
7276
7289
|
def __init__(self, *, apply_on: builtins.str) -> None:
|
|
7277
|
-
'''The function's SnapStart setting.
|
|
7278
|
-
|
|
7279
|
-
When set to PublishedVersions, Lambda creates a snapshot of the execution environment when you publish a function version.
|
|
7290
|
+
'''The function's `AWS Lambda SnapStart <https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html>`_ setting.
|
|
7280
7291
|
|
|
7281
|
-
:param apply_on:
|
|
7292
|
+
:param apply_on: Set ``ApplyOn`` to ``PublishedVersions`` to create a snapshot of the initialized execution environment when you publish a function version.
|
|
7282
7293
|
|
|
7283
7294
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-snapstart.html
|
|
7284
7295
|
:exampleMetadata: fixture=_generated
|
|
@@ -7302,7 +7313,7 @@ class CfnFunction(
|
|
|
7302
7313
|
|
|
7303
7314
|
@builtins.property
|
|
7304
7315
|
def apply_on(self) -> builtins.str:
|
|
7305
|
-
'''
|
|
7316
|
+
'''Set ``ApplyOn`` to ``PublishedVersions`` to create a snapshot of the initialized execution environment when you publish a function version.
|
|
7306
7317
|
|
|
7307
7318
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-snapstart.html#cfn-lambda-function-snapstart-applyon
|
|
7308
7319
|
'''
|
|
@@ -7336,12 +7347,10 @@ class CfnFunction(
|
|
|
7336
7347
|
apply_on: typing.Optional[builtins.str] = None,
|
|
7337
7348
|
optimization_status: typing.Optional[builtins.str] = None,
|
|
7338
7349
|
) -> None:
|
|
7339
|
-
'''The function's SnapStart
|
|
7350
|
+
'''The function's `SnapStart <https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html>`_ setting.
|
|
7340
7351
|
|
|
7341
|
-
When set to PublishedVersions, Lambda creates a snapshot of the execution environment when you publish a function version.
|
|
7342
|
-
|
|
7343
|
-
:param apply_on: Applying SnapStart setting on function resource type.
|
|
7344
|
-
:param optimization_status: Indicates whether SnapStart is activated for the specified function version.
|
|
7352
|
+
:param apply_on: When set to ``PublishedVersions`` , Lambda creates a snapshot of the execution environment when you publish a function version.
|
|
7353
|
+
:param optimization_status: When you provide a `qualified Amazon Resource Name (ARN) <https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html#versioning-versions-using>`_ , this response element indicates whether SnapStart is activated for the specified function version.
|
|
7345
7354
|
|
|
7346
7355
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-snapstartresponse.html
|
|
7347
7356
|
:exampleMetadata: fixture=_generated
|
|
@@ -7369,7 +7378,7 @@ class CfnFunction(
|
|
|
7369
7378
|
|
|
7370
7379
|
@builtins.property
|
|
7371
7380
|
def apply_on(self) -> typing.Optional[builtins.str]:
|
|
7372
|
-
'''
|
|
7381
|
+
'''When set to ``PublishedVersions`` , Lambda creates a snapshot of the execution environment when you publish a function version.
|
|
7373
7382
|
|
|
7374
7383
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-snapstartresponse.html#cfn-lambda-function-snapstartresponse-applyon
|
|
7375
7384
|
'''
|
|
@@ -7378,7 +7387,7 @@ class CfnFunction(
|
|
|
7378
7387
|
|
|
7379
7388
|
@builtins.property
|
|
7380
7389
|
def optimization_status(self) -> typing.Optional[builtins.str]:
|
|
7381
|
-
'''
|
|
7390
|
+
'''When you provide a `qualified Amazon Resource Name (ARN) <https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html#versioning-versions-using>`_ , this response element indicates whether SnapStart is activated for the specified function version.
|
|
7382
7391
|
|
|
7383
7392
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-snapstartresponse.html#cfn-lambda-function-snapstartresponse-optimizationstatus
|
|
7384
7393
|
'''
|
|
@@ -7403,9 +7412,7 @@ class CfnFunction(
|
|
|
7403
7412
|
)
|
|
7404
7413
|
class TracingConfigProperty:
|
|
7405
7414
|
def __init__(self, *, mode: typing.Optional[builtins.str] = None) -> None:
|
|
7406
|
-
'''The function's AWS X-Ray tracing configuration.
|
|
7407
|
-
|
|
7408
|
-
To sample and record incoming requests, set Mode to Active.
|
|
7415
|
+
'''The function's `AWS X-Ray <https://docs.aws.amazon.com/lambda/latest/dg/services-xray.html>`_ tracing configuration. To sample and record incoming requests, set ``Mode`` to ``Active`` .
|
|
7409
7416
|
|
|
7410
7417
|
:param mode: The tracing mode.
|
|
7411
7418
|
|
|
@@ -7468,10 +7475,15 @@ class CfnFunction(
|
|
|
7468
7475
|
) -> None:
|
|
7469
7476
|
'''The VPC security groups and subnets that are attached to a Lambda function.
|
|
7470
7477
|
|
|
7471
|
-
When you connect a function to a VPC, Lambda creates an elastic network interface for each combination of security group and subnet in the function's VPC configuration. The function can only access resources and the internet through that VPC.
|
|
7478
|
+
When you connect a function to a VPC, Lambda creates an elastic network interface for each combination of security group and subnet in the function's VPC configuration. The function can only access resources and the internet through that VPC. For more information, see `VPC Settings <https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html>`_ .
|
|
7479
|
+
.. epigraph::
|
|
7480
|
+
|
|
7481
|
+
When you delete a function, AWS CloudFormation monitors the state of its network interfaces and waits for Lambda to delete them before proceeding. If the VPC is defined in the same stack, the network interfaces need to be deleted by Lambda before AWS CloudFormation can delete the VPC's resources.
|
|
7472
7482
|
|
|
7473
|
-
|
|
7474
|
-
|
|
7483
|
+
To monitor network interfaces, AWS CloudFormation needs the ``ec2:DescribeNetworkInterfaces`` permission. It obtains this from the user or role that modifies the stack. If you don't provide this permission, AWS CloudFormation does not wait for network interfaces to be deleted.
|
|
7484
|
+
|
|
7485
|
+
:param ipv6_allowed_for_dual_stack: Allows outbound IPv6 traffic on VPC functions that are connected to dual-stack subnets.
|
|
7486
|
+
:param security_group_ids: A list of VPC security group IDs.
|
|
7475
7487
|
:param subnet_ids: A list of VPC subnet IDs.
|
|
7476
7488
|
|
|
7477
7489
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-vpcconfig.html
|
|
@@ -7506,7 +7518,7 @@ class CfnFunction(
|
|
|
7506
7518
|
def ipv6_allowed_for_dual_stack(
|
|
7507
7519
|
self,
|
|
7508
7520
|
) -> typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]]:
|
|
7509
|
-
'''
|
|
7521
|
+
'''Allows outbound IPv6 traffic on VPC functions that are connected to dual-stack subnets.
|
|
7510
7522
|
|
|
7511
7523
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-vpcconfig.html#cfn-lambda-function-vpcconfig-ipv6allowedfordualstack
|
|
7512
7524
|
'''
|
|
@@ -7515,7 +7527,7 @@ class CfnFunction(
|
|
|
7515
7527
|
|
|
7516
7528
|
@builtins.property
|
|
7517
7529
|
def security_group_ids(self) -> typing.Optional[typing.List[builtins.str]]:
|
|
7518
|
-
'''A list of VPC security
|
|
7530
|
+
'''A list of VPC security group IDs.
|
|
7519
7531
|
|
|
7520
7532
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-vpcconfig.html#cfn-lambda-function-vpcconfig-securitygroupids
|
|
7521
7533
|
'''
|
|
@@ -7564,7 +7576,6 @@ class CfnFunction(
|
|
|
7564
7576
|
"logging_config": "loggingConfig",
|
|
7565
7577
|
"memory_size": "memorySize",
|
|
7566
7578
|
"package_type": "packageType",
|
|
7567
|
-
"policy": "policy",
|
|
7568
7579
|
"reserved_concurrent_executions": "reservedConcurrentExecutions",
|
|
7569
7580
|
"runtime": "runtime",
|
|
7570
7581
|
"runtime_management_config": "runtimeManagementConfig",
|
|
@@ -7596,7 +7607,6 @@ class CfnFunctionProps:
|
|
|
7596
7607
|
logging_config: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union[CfnFunction.LoggingConfigProperty, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
7597
7608
|
memory_size: typing.Optional[jsii.Number] = None,
|
|
7598
7609
|
package_type: typing.Optional[builtins.str] = None,
|
|
7599
|
-
policy: typing.Any = None,
|
|
7600
7610
|
reserved_concurrent_executions: typing.Optional[jsii.Number] = None,
|
|
7601
7611
|
runtime: typing.Optional[builtins.str] = None,
|
|
7602
7612
|
runtime_management_config: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union[CfnFunction.RuntimeManagementConfigProperty, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
@@ -7611,29 +7621,28 @@ class CfnFunctionProps:
|
|
|
7611
7621
|
:param code: The code for the function.
|
|
7612
7622
|
:param role: The Amazon Resource Name (ARN) of the function's execution role.
|
|
7613
7623
|
:param architectures: The instruction set architecture that the function supports. Enter a string array with one of the valid values (arm64 or x86_64). The default value is ``x86_64`` .
|
|
7614
|
-
:param code_signing_config_arn: A
|
|
7615
|
-
:param dead_letter_config:
|
|
7624
|
+
:param code_signing_config_arn: To enable code signing for this function, specify the ARN of a code-signing configuration. A code-signing configuration includes a set of signing profiles, which define the trusted publishers for this function.
|
|
7625
|
+
:param dead_letter_config: A dead-letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when they fail processing. For more information, see `Dead-letter queues <https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-dlq>`_ .
|
|
7616
7626
|
:param description: A description of the function.
|
|
7617
|
-
:param environment:
|
|
7618
|
-
:param ephemeral_storage:
|
|
7619
|
-
:param file_system_configs: Connection settings for an Amazon EFS file system. To connect a function to a file system, a mount target must be available in every Availability Zone that your function connects to. If your template contains an AWS::EFS::MountTarget resource, you must also specify a DependsOn attribute to ensure that the mount target is created or updated before the function.
|
|
7620
|
-
:param function_name: The name of the Lambda function, up to 64 characters in length. If you don't specify a name, AWS CloudFormation generates one.
|
|
7621
|
-
:param handler: The name of the method within your code that Lambda calls to
|
|
7627
|
+
:param environment: Environment variables that are accessible from function code during execution.
|
|
7628
|
+
:param ephemeral_storage: The size of the function's ``/tmp`` directory in MB. The default value is 512, but it can be any whole number between 512 and 10,240 MB.
|
|
7629
|
+
:param file_system_configs: Connection settings for an Amazon EFS file system. To connect a function to a file system, a mount target must be available in every Availability Zone that your function connects to. If your template contains an `AWS::EFS::MountTarget <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-efs-mounttarget.html>`_ resource, you must also specify a ``DependsOn`` attribute to ensure that the mount target is created or updated before the function. For more information about using the ``DependsOn`` attribute, see `DependsOn Attribute <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-dependson.html>`_ .
|
|
7630
|
+
:param function_name: The name of the Lambda function, up to 64 characters in length. If you don't specify a name, AWS CloudFormation generates one. If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
|
|
7631
|
+
:param handler: The name of the method within your code that Lambda calls to run your function. Handler is required if the deployment package is a .zip file archive. The format includes the file name. It can also include namespaces and other qualifiers, depending on the runtime. For more information, see `Lambda programming model <https://docs.aws.amazon.com/lambda/latest/dg/foundation-progmodel.html>`_ .
|
|
7622
7632
|
:param image_config: Configuration values that override the container image Dockerfile settings. For more information, see `Container image settings <https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-parms>`_ .
|
|
7623
|
-
:param kms_key_arn: The ARN of the AWS Key Management Service (AWS KMS) key that's used to encrypt your function's environment variables. If it's not
|
|
7624
|
-
:param layers: A list of function layers to add to the function's execution environment. Specify each layer by its ARN, including the version.
|
|
7625
|
-
:param logging_config:
|
|
7626
|
-
:param memory_size: The amount of memory
|
|
7627
|
-
:param package_type:
|
|
7628
|
-
:param policy: The resource policy of your function.
|
|
7633
|
+
:param kms_key_arn: The ARN of the AWS Key Management Service ( AWS KMS ) customer managed key that's used to encrypt your function's `environment variables <https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-encryption>`_ . When `Lambda SnapStart <https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html>`_ is activated, Lambda also uses this key is to encrypt your function's snapshot. If you deploy your function using a container image, Lambda also uses this key to encrypt your function when it's deployed. Note that this is not the same key that's used to protect your container image in the Amazon Elastic Container Registry (Amazon ECR). If you don't provide a customer managed key, Lambda uses a default service key.
|
|
7634
|
+
:param layers: A list of `function layers <https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html>`_ to add to the function's execution environment. Specify each layer by its ARN, including the version.
|
|
7635
|
+
:param logging_config: The function's Amazon CloudWatch Logs configuration settings.
|
|
7636
|
+
:param memory_size: The amount of `memory available to the function <https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-memory-console>`_ at runtime. Increasing the function memory also increases its CPU allocation. The default value is 128 MB. The value can be any multiple of 1 MB. Note that new AWS accounts have reduced concurrency and memory quotas. AWS raises these quotas automatically based on your usage. You can also request a quota increase.
|
|
7637
|
+
:param package_type: The type of deployment package. Set to ``Image`` for container image and set ``Zip`` for .zip file archive.
|
|
7629
7638
|
:param reserved_concurrent_executions: The number of simultaneous executions to reserve for the function.
|
|
7630
|
-
:param runtime: The identifier of the function's runtime.
|
|
7639
|
+
:param runtime: The identifier of the function's `runtime <https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html>`_ . Runtime is required if the deployment package is a .zip file archive. The following list includes deprecated runtimes. For more information, see `Runtime deprecation policy <https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-support-policy>`_ .
|
|
7631
7640
|
:param runtime_management_config: Sets the runtime management configuration for a function's version. For more information, see `Runtime updates <https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html>`_ .
|
|
7632
|
-
:param snap_start: The function's
|
|
7633
|
-
:param tags: A list of tags to apply to the function.
|
|
7634
|
-
:param timeout: The amount of time that Lambda allows a function to run before stopping it. The default is 3 seconds. The maximum allowed value is 900 seconds.
|
|
7635
|
-
:param tracing_config:
|
|
7636
|
-
:param vpc_config:
|
|
7641
|
+
:param snap_start: The function's `AWS Lambda SnapStart <https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html>`_ setting.
|
|
7642
|
+
:param tags: A list of `tags <https://docs.aws.amazon.com/lambda/latest/dg/tagging.html>`_ to apply to the function.
|
|
7643
|
+
:param timeout: The amount of time (in seconds) that Lambda allows a function to run before stopping it. The default is 3 seconds. The maximum allowed value is 900 seconds. For more information, see `Lambda execution environment <https://docs.aws.amazon.com/lambda/latest/dg/runtimes-context.html>`_ .
|
|
7644
|
+
:param tracing_config: Set ``Mode`` to ``Active`` to sample and trace a subset of incoming requests with `X-Ray <https://docs.aws.amazon.com/lambda/latest/dg/services-xray.html>`_ .
|
|
7645
|
+
:param vpc_config: For network connectivity to AWS resources in a VPC, specify a list of security groups and subnets in the VPC. When you connect a function to a VPC, it can access resources and the internet only through that VPC. For more information, see `Configuring a Lambda function to access resources in a VPC <https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html>`_ .
|
|
7637
7646
|
|
|
7638
7647
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html
|
|
7639
7648
|
:exampleMetadata: fixture=_generated
|
|
@@ -7644,8 +7653,6 @@ class CfnFunctionProps:
|
|
|
7644
7653
|
# The values are placeholders you should change.
|
|
7645
7654
|
from aws_cdk import aws_lambda as lambda_
|
|
7646
7655
|
|
|
7647
|
-
# policy: Any
|
|
7648
|
-
|
|
7649
7656
|
cfn_function_props = lambda.CfnFunctionProps(
|
|
7650
7657
|
code=lambda.CfnFunction.CodeProperty(
|
|
7651
7658
|
image_uri="imageUri",
|
|
@@ -7692,7 +7699,6 @@ class CfnFunctionProps:
|
|
|
7692
7699
|
),
|
|
7693
7700
|
memory_size=123,
|
|
7694
7701
|
package_type="packageType",
|
|
7695
|
-
policy=policy,
|
|
7696
7702
|
reserved_concurrent_executions=123,
|
|
7697
7703
|
runtime="runtime",
|
|
7698
7704
|
runtime_management_config=lambda.CfnFunction.RuntimeManagementConfigProperty(
|
|
@@ -7738,7 +7744,6 @@ class CfnFunctionProps:
|
|
|
7738
7744
|
check_type(argname="argument logging_config", value=logging_config, expected_type=type_hints["logging_config"])
|
|
7739
7745
|
check_type(argname="argument memory_size", value=memory_size, expected_type=type_hints["memory_size"])
|
|
7740
7746
|
check_type(argname="argument package_type", value=package_type, expected_type=type_hints["package_type"])
|
|
7741
|
-
check_type(argname="argument policy", value=policy, expected_type=type_hints["policy"])
|
|
7742
7747
|
check_type(argname="argument reserved_concurrent_executions", value=reserved_concurrent_executions, expected_type=type_hints["reserved_concurrent_executions"])
|
|
7743
7748
|
check_type(argname="argument runtime", value=runtime, expected_type=type_hints["runtime"])
|
|
7744
7749
|
check_type(argname="argument runtime_management_config", value=runtime_management_config, expected_type=type_hints["runtime_management_config"])
|
|
@@ -7781,8 +7786,6 @@ class CfnFunctionProps:
|
|
|
7781
7786
|
self._values["memory_size"] = memory_size
|
|
7782
7787
|
if package_type is not None:
|
|
7783
7788
|
self._values["package_type"] = package_type
|
|
7784
|
-
if policy is not None:
|
|
7785
|
-
self._values["policy"] = policy
|
|
7786
7789
|
if reserved_concurrent_executions is not None:
|
|
7787
7790
|
self._values["reserved_concurrent_executions"] = reserved_concurrent_executions
|
|
7788
7791
|
if runtime is not None:
|
|
@@ -7833,7 +7836,10 @@ class CfnFunctionProps:
|
|
|
7833
7836
|
|
|
7834
7837
|
@builtins.property
|
|
7835
7838
|
def code_signing_config_arn(self) -> typing.Optional[builtins.str]:
|
|
7836
|
-
'''
|
|
7839
|
+
'''To enable code signing for this function, specify the ARN of a code-signing configuration.
|
|
7840
|
+
|
|
7841
|
+
A code-signing configuration
|
|
7842
|
+
includes a set of signing profiles, which define the trusted publishers for this function.
|
|
7837
7843
|
|
|
7838
7844
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-codesigningconfigarn
|
|
7839
7845
|
'''
|
|
@@ -7844,7 +7850,9 @@ class CfnFunctionProps:
|
|
|
7844
7850
|
def dead_letter_config(
|
|
7845
7851
|
self,
|
|
7846
7852
|
) -> typing.Optional[typing.Union[_IResolvable_da3f097b, CfnFunction.DeadLetterConfigProperty]]:
|
|
7847
|
-
'''
|
|
7853
|
+
'''A dead-letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when they fail processing.
|
|
7854
|
+
|
|
7855
|
+
For more information, see `Dead-letter queues <https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-dlq>`_ .
|
|
7848
7856
|
|
|
7849
7857
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-deadletterconfig
|
|
7850
7858
|
'''
|
|
@@ -7864,7 +7872,7 @@ class CfnFunctionProps:
|
|
|
7864
7872
|
def environment(
|
|
7865
7873
|
self,
|
|
7866
7874
|
) -> typing.Optional[typing.Union[_IResolvable_da3f097b, CfnFunction.EnvironmentProperty]]:
|
|
7867
|
-
'''
|
|
7875
|
+
'''Environment variables that are accessible from function code during execution.
|
|
7868
7876
|
|
|
7869
7877
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-environment
|
|
7870
7878
|
'''
|
|
@@ -7875,7 +7883,9 @@ class CfnFunctionProps:
|
|
|
7875
7883
|
def ephemeral_storage(
|
|
7876
7884
|
self,
|
|
7877
7885
|
) -> typing.Optional[typing.Union[_IResolvable_da3f097b, CfnFunction.EphemeralStorageProperty]]:
|
|
7878
|
-
'''
|
|
7886
|
+
'''The size of the function's ``/tmp`` directory in MB.
|
|
7887
|
+
|
|
7888
|
+
The default value is 512, but it can be any whole number between 512 and 10,240 MB.
|
|
7879
7889
|
|
|
7880
7890
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-ephemeralstorage
|
|
7881
7891
|
'''
|
|
@@ -7888,7 +7898,9 @@ class CfnFunctionProps:
|
|
|
7888
7898
|
) -> typing.Optional[typing.Union[_IResolvable_da3f097b, typing.List[typing.Union[_IResolvable_da3f097b, CfnFunction.FileSystemConfigProperty]]]]:
|
|
7889
7899
|
'''Connection settings for an Amazon EFS file system.
|
|
7890
7900
|
|
|
7891
|
-
To connect a function to a file system, a mount target must be available in every Availability Zone that your function connects to. If your template contains an AWS::EFS::MountTarget resource, you must also specify a DependsOn attribute to ensure that the mount target is created or updated before the function.
|
|
7901
|
+
To connect a function to a file system, a mount target must be available in every Availability Zone that your function connects to. If your template contains an `AWS::EFS::MountTarget <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-efs-mounttarget.html>`_ resource, you must also specify a ``DependsOn`` attribute to ensure that the mount target is created or updated before the function.
|
|
7902
|
+
|
|
7903
|
+
For more information about using the ``DependsOn`` attribute, see `DependsOn Attribute <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-dependson.html>`_ .
|
|
7892
7904
|
|
|
7893
7905
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-filesystemconfigs
|
|
7894
7906
|
'''
|
|
@@ -7901,6 +7913,8 @@ class CfnFunctionProps:
|
|
|
7901
7913
|
|
|
7902
7914
|
If you don't specify a name, AWS CloudFormation generates one.
|
|
7903
7915
|
|
|
7916
|
+
If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
|
|
7917
|
+
|
|
7904
7918
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-functionname
|
|
7905
7919
|
'''
|
|
7906
7920
|
result = self._values.get("function_name")
|
|
@@ -7908,9 +7922,9 @@ class CfnFunctionProps:
|
|
|
7908
7922
|
|
|
7909
7923
|
@builtins.property
|
|
7910
7924
|
def handler(self) -> typing.Optional[builtins.str]:
|
|
7911
|
-
'''The name of the method within your code that Lambda calls to
|
|
7925
|
+
'''The name of the method within your code that Lambda calls to run your function.
|
|
7912
7926
|
|
|
7913
|
-
The format includes the file name. It can also include namespaces and other qualifiers, depending on the runtime
|
|
7927
|
+
Handler is required if the deployment package is a .zip file archive. The format includes the file name. It can also include namespaces and other qualifiers, depending on the runtime. For more information, see `Lambda programming model <https://docs.aws.amazon.com/lambda/latest/dg/foundation-progmodel.html>`_ .
|
|
7914
7928
|
|
|
7915
7929
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-handler
|
|
7916
7930
|
'''
|
|
@@ -7932,9 +7946,7 @@ class CfnFunctionProps:
|
|
|
7932
7946
|
|
|
7933
7947
|
@builtins.property
|
|
7934
7948
|
def kms_key_arn(self) -> typing.Optional[builtins.str]:
|
|
7935
|
-
'''The ARN of the AWS Key Management Service (AWS KMS) key that's used to encrypt your function's environment variables.
|
|
7936
|
-
|
|
7937
|
-
If it's not provided, AWS Lambda uses a default service key.
|
|
7949
|
+
'''The ARN of the AWS Key Management Service ( AWS KMS ) customer managed key that's used to encrypt your function's `environment variables <https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-encryption>`_ . When `Lambda SnapStart <https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html>`_ is activated, Lambda also uses this key is to encrypt your function's snapshot. If you deploy your function using a container image, Lambda also uses this key to encrypt your function when it's deployed. Note that this is not the same key that's used to protect your container image in the Amazon Elastic Container Registry (Amazon ECR). If you don't provide a customer managed key, Lambda uses a default service key.
|
|
7938
7950
|
|
|
7939
7951
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-kmskeyarn
|
|
7940
7952
|
'''
|
|
@@ -7943,9 +7955,7 @@ class CfnFunctionProps:
|
|
|
7943
7955
|
|
|
7944
7956
|
@builtins.property
|
|
7945
7957
|
def layers(self) -> typing.Optional[typing.List[builtins.str]]:
|
|
7946
|
-
'''A list of function layers to add to the function's execution environment.
|
|
7947
|
-
|
|
7948
|
-
Specify each layer by its ARN, including the version.
|
|
7958
|
+
'''A list of `function layers <https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html>`_ to add to the function's execution environment. Specify each layer by its ARN, including the version.
|
|
7949
7959
|
|
|
7950
7960
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-layers
|
|
7951
7961
|
'''
|
|
@@ -7956,7 +7966,7 @@ class CfnFunctionProps:
|
|
|
7956
7966
|
def logging_config(
|
|
7957
7967
|
self,
|
|
7958
7968
|
) -> typing.Optional[typing.Union[_IResolvable_da3f097b, CfnFunction.LoggingConfigProperty]]:
|
|
7959
|
-
'''
|
|
7969
|
+
'''The function's Amazon CloudWatch Logs configuration settings.
|
|
7960
7970
|
|
|
7961
7971
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-loggingconfig
|
|
7962
7972
|
'''
|
|
@@ -7965,9 +7975,7 @@ class CfnFunctionProps:
|
|
|
7965
7975
|
|
|
7966
7976
|
@builtins.property
|
|
7967
7977
|
def memory_size(self) -> typing.Optional[jsii.Number]:
|
|
7968
|
-
'''The amount of memory that your
|
|
7969
|
-
|
|
7970
|
-
Increasing the function's memory also increases its CPU allocation. The default value is 128 MB. The value must be a multiple of 64 MB.
|
|
7978
|
+
'''The amount of `memory available to the function <https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-memory-console>`_ at runtime. Increasing the function memory also increases its CPU allocation. The default value is 128 MB. The value can be any multiple of 1 MB. Note that new AWS accounts have reduced concurrency and memory quotas. AWS raises these quotas automatically based on your usage. You can also request a quota increase.
|
|
7971
7979
|
|
|
7972
7980
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-memorysize
|
|
7973
7981
|
'''
|
|
@@ -7976,22 +7984,15 @@ class CfnFunctionProps:
|
|
|
7976
7984
|
|
|
7977
7985
|
@builtins.property
|
|
7978
7986
|
def package_type(self) -> typing.Optional[builtins.str]:
|
|
7979
|
-
'''
|
|
7987
|
+
'''The type of deployment package.
|
|
7988
|
+
|
|
7989
|
+
Set to ``Image`` for container image and set ``Zip`` for .zip file archive.
|
|
7980
7990
|
|
|
7981
7991
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-packagetype
|
|
7982
7992
|
'''
|
|
7983
7993
|
result = self._values.get("package_type")
|
|
7984
7994
|
return typing.cast(typing.Optional[builtins.str], result)
|
|
7985
7995
|
|
|
7986
|
-
@builtins.property
|
|
7987
|
-
def policy(self) -> typing.Any:
|
|
7988
|
-
'''The resource policy of your function.
|
|
7989
|
-
|
|
7990
|
-
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-policy
|
|
7991
|
-
'''
|
|
7992
|
-
result = self._values.get("policy")
|
|
7993
|
-
return typing.cast(typing.Any, result)
|
|
7994
|
-
|
|
7995
7996
|
@builtins.property
|
|
7996
7997
|
def reserved_concurrent_executions(self) -> typing.Optional[jsii.Number]:
|
|
7997
7998
|
'''The number of simultaneous executions to reserve for the function.
|
|
@@ -8003,7 +8004,9 @@ class CfnFunctionProps:
|
|
|
8003
8004
|
|
|
8004
8005
|
@builtins.property
|
|
8005
8006
|
def runtime(self) -> typing.Optional[builtins.str]:
|
|
8006
|
-
'''The identifier of the function's runtime.
|
|
8007
|
+
'''The identifier of the function's `runtime <https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html>`_ . Runtime is required if the deployment package is a .zip file archive.
|
|
8008
|
+
|
|
8009
|
+
The following list includes deprecated runtimes. For more information, see `Runtime deprecation policy <https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-support-policy>`_ .
|
|
8007
8010
|
|
|
8008
8011
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-runtime
|
|
8009
8012
|
'''
|
|
@@ -8027,9 +8030,7 @@ class CfnFunctionProps:
|
|
|
8027
8030
|
def snap_start(
|
|
8028
8031
|
self,
|
|
8029
8032
|
) -> typing.Optional[typing.Union[_IResolvable_da3f097b, CfnFunction.SnapStartProperty]]:
|
|
8030
|
-
'''The function's SnapStart setting.
|
|
8031
|
-
|
|
8032
|
-
When set to PublishedVersions, Lambda creates a snapshot of the execution environment when you publish a function version.
|
|
8033
|
+
'''The function's `AWS Lambda SnapStart <https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html>`_ setting.
|
|
8033
8034
|
|
|
8034
8035
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-snapstart
|
|
8035
8036
|
'''
|
|
@@ -8038,7 +8039,7 @@ class CfnFunctionProps:
|
|
|
8038
8039
|
|
|
8039
8040
|
@builtins.property
|
|
8040
8041
|
def tags(self) -> typing.Optional[typing.List[_CfnTag_f6864754]]:
|
|
8041
|
-
'''A list of tags to apply to the function.
|
|
8042
|
+
'''A list of `tags <https://docs.aws.amazon.com/lambda/latest/dg/tagging.html>`_ to apply to the function.
|
|
8042
8043
|
|
|
8043
8044
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-tags
|
|
8044
8045
|
'''
|
|
@@ -8047,9 +8048,9 @@ class CfnFunctionProps:
|
|
|
8047
8048
|
|
|
8048
8049
|
@builtins.property
|
|
8049
8050
|
def timeout(self) -> typing.Optional[jsii.Number]:
|
|
8050
|
-
'''The amount of time that Lambda allows a function to run before stopping it.
|
|
8051
|
+
'''The amount of time (in seconds) that Lambda allows a function to run before stopping it.
|
|
8051
8052
|
|
|
8052
|
-
The default is 3 seconds. The maximum allowed value is 900 seconds.
|
|
8053
|
+
The default is 3 seconds. The maximum allowed value is 900 seconds. For more information, see `Lambda execution environment <https://docs.aws.amazon.com/lambda/latest/dg/runtimes-context.html>`_ .
|
|
8053
8054
|
|
|
8054
8055
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-timeout
|
|
8055
8056
|
'''
|
|
@@ -8060,9 +8061,7 @@ class CfnFunctionProps:
|
|
|
8060
8061
|
def tracing_config(
|
|
8061
8062
|
self,
|
|
8062
8063
|
) -> typing.Optional[typing.Union[_IResolvable_da3f097b, CfnFunction.TracingConfigProperty]]:
|
|
8063
|
-
'''
|
|
8064
|
-
|
|
8065
|
-
To sample and record incoming requests, set Mode to Active.
|
|
8064
|
+
'''Set ``Mode`` to ``Active`` to sample and trace a subset of incoming requests with `X-Ray <https://docs.aws.amazon.com/lambda/latest/dg/services-xray.html>`_ .
|
|
8066
8065
|
|
|
8067
8066
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-tracingconfig
|
|
8068
8067
|
'''
|
|
@@ -8073,9 +8072,9 @@ class CfnFunctionProps:
|
|
|
8073
8072
|
def vpc_config(
|
|
8074
8073
|
self,
|
|
8075
8074
|
) -> typing.Optional[typing.Union[_IResolvable_da3f097b, CfnFunction.VpcConfigProperty]]:
|
|
8076
|
-
'''
|
|
8075
|
+
'''For network connectivity to AWS resources in a VPC, specify a list of security groups and subnets in the VPC.
|
|
8077
8076
|
|
|
8078
|
-
When you connect a function to a VPC,
|
|
8077
|
+
When you connect a function to a VPC, it can access resources and the internet only through that VPC. For more information, see `Configuring a Lambda function to access resources in a VPC <https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html>`_ .
|
|
8079
8078
|
|
|
8080
8079
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-vpcconfig
|
|
8081
8080
|
'''
|
|
@@ -19734,123 +19733,14 @@ class SingletonFunctionProps(FunctionProps):
|
|
|
19734
19733
|
:param uuid: A unique identifier to identify this lambda. The identifier should be unique across all custom resource providers. We recommend generating a UUID per provider.
|
|
19735
19734
|
:param lambda_purpose: A descriptive name for the purpose of this Lambda. If the Lambda does not have a physical name, this string will be reflected its generated name. The combination of lambdaPurpose and uuid must be unique. Default: SingletonLambda
|
|
19736
19735
|
|
|
19737
|
-
:exampleMetadata:
|
|
19736
|
+
:exampleMetadata: infused
|
|
19738
19737
|
|
|
19739
19738
|
Example::
|
|
19740
19739
|
|
|
19741
|
-
|
|
19742
|
-
# The values are placeholders you should change.
|
|
19743
|
-
import aws_cdk as cdk
|
|
19744
|
-
from aws_cdk import aws_codeguruprofiler as codeguruprofiler
|
|
19745
|
-
from aws_cdk import aws_ec2 as ec2
|
|
19746
|
-
from aws_cdk import aws_iam as iam
|
|
19747
|
-
from aws_cdk import aws_kms as kms
|
|
19748
|
-
from aws_cdk import aws_lambda as lambda_
|
|
19749
|
-
from aws_cdk import aws_logs as logs
|
|
19750
|
-
from aws_cdk import aws_sns as sns
|
|
19751
|
-
from aws_cdk import aws_sqs as sqs
|
|
19752
|
-
|
|
19753
|
-
# adot_layer_version: lambda.AdotLayerVersion
|
|
19754
|
-
# architecture: lambda.Architecture
|
|
19755
|
-
# code: lambda.Code
|
|
19756
|
-
# code_signing_config: lambda.CodeSigningConfig
|
|
19757
|
-
# destination: lambda.IDestination
|
|
19758
|
-
# event_source: lambda.IEventSource
|
|
19759
|
-
# file_system: lambda.FileSystem
|
|
19760
|
-
# key: kms.Key
|
|
19761
|
-
# lambda_insights_version: lambda.LambdaInsightsVersion
|
|
19762
|
-
# layer_version: lambda.LayerVersion
|
|
19763
|
-
# log_group: logs.LogGroup
|
|
19764
|
-
# params_and_secrets_layer_version: lambda.ParamsAndSecretsLayerVersion
|
|
19765
|
-
# policy_statement: iam.PolicyStatement
|
|
19766
|
-
# profiling_group: codeguruprofiler.ProfilingGroup
|
|
19767
|
-
# queue: sqs.Queue
|
|
19768
|
-
# role: iam.Role
|
|
19769
|
-
# runtime: lambda.Runtime
|
|
19770
|
-
# runtime_management_mode: lambda.RuntimeManagementMode
|
|
19771
|
-
# security_group: ec2.SecurityGroup
|
|
19772
|
-
# size: cdk.Size
|
|
19773
|
-
# snap_start_conf: lambda.SnapStartConf
|
|
19774
|
-
# subnet: ec2.Subnet
|
|
19775
|
-
# subnet_filter: ec2.SubnetFilter
|
|
19776
|
-
# topic: sns.Topic
|
|
19777
|
-
# vpc: ec2.Vpc
|
|
19778
|
-
|
|
19779
|
-
singleton_function_props = lambda.SingletonFunctionProps(
|
|
19780
|
-
code=code,
|
|
19781
|
-
handler="handler",
|
|
19782
|
-
runtime=runtime,
|
|
19783
|
-
uuid="uuid",
|
|
19740
|
+
fn = lambda_.SingletonFunction(self, "MyProvider", function_props)
|
|
19784
19741
|
|
|
19785
|
-
|
|
19786
|
-
|
|
19787
|
-
exec_wrapper=lambda_.AdotLambdaExecWrapper.REGULAR_HANDLER,
|
|
19788
|
-
layer_version=adot_layer_version
|
|
19789
|
-
),
|
|
19790
|
-
allow_all_outbound=False,
|
|
19791
|
-
allow_public_subnet=False,
|
|
19792
|
-
application_log_level="applicationLogLevel",
|
|
19793
|
-
architecture=architecture,
|
|
19794
|
-
code_signing_config=code_signing_config,
|
|
19795
|
-
current_version_options=lambda.VersionOptions(
|
|
19796
|
-
code_sha256="codeSha256",
|
|
19797
|
-
description="description",
|
|
19798
|
-
max_event_age=cdk.Duration.minutes(30),
|
|
19799
|
-
on_failure=destination,
|
|
19800
|
-
on_success=destination,
|
|
19801
|
-
provisioned_concurrent_executions=123,
|
|
19802
|
-
removal_policy=cdk.RemovalPolicy.DESTROY,
|
|
19803
|
-
retry_attempts=123
|
|
19804
|
-
),
|
|
19805
|
-
dead_letter_queue=queue,
|
|
19806
|
-
dead_letter_queue_enabled=False,
|
|
19807
|
-
dead_letter_topic=topic,
|
|
19808
|
-
description="description",
|
|
19809
|
-
environment={
|
|
19810
|
-
"environment_key": "environment"
|
|
19811
|
-
},
|
|
19812
|
-
environment_encryption=key,
|
|
19813
|
-
ephemeral_storage_size=size,
|
|
19814
|
-
events=[event_source],
|
|
19815
|
-
filesystem=file_system,
|
|
19816
|
-
function_name="functionName",
|
|
19817
|
-
initial_policy=[policy_statement],
|
|
19818
|
-
insights_version=lambda_insights_version,
|
|
19819
|
-
lambda_purpose="lambdaPurpose",
|
|
19820
|
-
layers=[layer_version],
|
|
19821
|
-
log_format="logFormat",
|
|
19822
|
-
log_group=log_group,
|
|
19823
|
-
log_retention=logs.RetentionDays.ONE_DAY,
|
|
19824
|
-
log_retention_retry_options=lambda.LogRetentionRetryOptions(
|
|
19825
|
-
base=cdk.Duration.minutes(30),
|
|
19826
|
-
max_retries=123
|
|
19827
|
-
),
|
|
19828
|
-
log_retention_role=role,
|
|
19829
|
-
max_event_age=cdk.Duration.minutes(30),
|
|
19830
|
-
memory_size=123,
|
|
19831
|
-
on_failure=destination,
|
|
19832
|
-
on_success=destination,
|
|
19833
|
-
params_and_secrets=params_and_secrets_layer_version,
|
|
19834
|
-
profiling=False,
|
|
19835
|
-
profiling_group=profiling_group,
|
|
19836
|
-
reserved_concurrent_executions=123,
|
|
19837
|
-
retry_attempts=123,
|
|
19838
|
-
role=role,
|
|
19839
|
-
runtime_management_mode=runtime_management_mode,
|
|
19840
|
-
security_groups=[security_group],
|
|
19841
|
-
snap_start=snap_start_conf,
|
|
19842
|
-
system_log_level="systemLogLevel",
|
|
19843
|
-
timeout=cdk.Duration.minutes(30),
|
|
19844
|
-
tracing=lambda_.Tracing.ACTIVE,
|
|
19845
|
-
vpc=vpc,
|
|
19846
|
-
vpc_subnets=ec2.SubnetSelection(
|
|
19847
|
-
availability_zones=["availabilityZones"],
|
|
19848
|
-
one_per_az=False,
|
|
19849
|
-
subnet_filters=[subnet_filter],
|
|
19850
|
-
subnet_group_name="subnetGroupName",
|
|
19851
|
-
subnets=[subnet],
|
|
19852
|
-
subnet_type=ec2.SubnetType.PRIVATE_ISOLATED
|
|
19853
|
-
)
|
|
19742
|
+
CustomResource(self, "MyResource",
|
|
19743
|
+
service_token=fn.function_arn
|
|
19854
19744
|
)
|
|
19855
19745
|
'''
|
|
19856
19746
|
if isinstance(adot_instrumentation, dict):
|
|
@@ -24434,123 +24324,14 @@ class SingletonFunction(
|
|
|
24434
24324
|
whenever they're declared into the stack.
|
|
24435
24325
|
|
|
24436
24326
|
:resource: AWS::Lambda::Function
|
|
24437
|
-
:exampleMetadata:
|
|
24327
|
+
:exampleMetadata: infused
|
|
24438
24328
|
|
|
24439
24329
|
Example::
|
|
24440
24330
|
|
|
24441
|
-
|
|
24442
|
-
# The values are placeholders you should change.
|
|
24443
|
-
import aws_cdk as cdk
|
|
24444
|
-
from aws_cdk import aws_codeguruprofiler as codeguruprofiler
|
|
24445
|
-
from aws_cdk import aws_ec2 as ec2
|
|
24446
|
-
from aws_cdk import aws_iam as iam
|
|
24447
|
-
from aws_cdk import aws_kms as kms
|
|
24448
|
-
from aws_cdk import aws_lambda as lambda_
|
|
24449
|
-
from aws_cdk import aws_logs as logs
|
|
24450
|
-
from aws_cdk import aws_sns as sns
|
|
24451
|
-
from aws_cdk import aws_sqs as sqs
|
|
24452
|
-
|
|
24453
|
-
# adot_layer_version: lambda.AdotLayerVersion
|
|
24454
|
-
# architecture: lambda.Architecture
|
|
24455
|
-
# code: lambda.Code
|
|
24456
|
-
# code_signing_config: lambda.CodeSigningConfig
|
|
24457
|
-
# destination: lambda.IDestination
|
|
24458
|
-
# event_source: lambda.IEventSource
|
|
24459
|
-
# file_system: lambda.FileSystem
|
|
24460
|
-
# key: kms.Key
|
|
24461
|
-
# lambda_insights_version: lambda.LambdaInsightsVersion
|
|
24462
|
-
# layer_version: lambda.LayerVersion
|
|
24463
|
-
# log_group: logs.LogGroup
|
|
24464
|
-
# params_and_secrets_layer_version: lambda.ParamsAndSecretsLayerVersion
|
|
24465
|
-
# policy_statement: iam.PolicyStatement
|
|
24466
|
-
# profiling_group: codeguruprofiler.ProfilingGroup
|
|
24467
|
-
# queue: sqs.Queue
|
|
24468
|
-
# role: iam.Role
|
|
24469
|
-
# runtime: lambda.Runtime
|
|
24470
|
-
# runtime_management_mode: lambda.RuntimeManagementMode
|
|
24471
|
-
# security_group: ec2.SecurityGroup
|
|
24472
|
-
# size: cdk.Size
|
|
24473
|
-
# snap_start_conf: lambda.SnapStartConf
|
|
24474
|
-
# subnet: ec2.Subnet
|
|
24475
|
-
# subnet_filter: ec2.SubnetFilter
|
|
24476
|
-
# topic: sns.Topic
|
|
24477
|
-
# vpc: ec2.Vpc
|
|
24331
|
+
fn = lambda_.SingletonFunction(self, "MyProvider", function_props)
|
|
24478
24332
|
|
|
24479
|
-
|
|
24480
|
-
|
|
24481
|
-
handler="handler",
|
|
24482
|
-
runtime=runtime,
|
|
24483
|
-
uuid="uuid",
|
|
24484
|
-
|
|
24485
|
-
# the properties below are optional
|
|
24486
|
-
adot_instrumentation=lambda.AdotInstrumentationConfig(
|
|
24487
|
-
exec_wrapper=lambda_.AdotLambdaExecWrapper.REGULAR_HANDLER,
|
|
24488
|
-
layer_version=adot_layer_version
|
|
24489
|
-
),
|
|
24490
|
-
allow_all_outbound=False,
|
|
24491
|
-
allow_public_subnet=False,
|
|
24492
|
-
application_log_level="applicationLogLevel",
|
|
24493
|
-
architecture=architecture,
|
|
24494
|
-
code_signing_config=code_signing_config,
|
|
24495
|
-
current_version_options=lambda.VersionOptions(
|
|
24496
|
-
code_sha256="codeSha256",
|
|
24497
|
-
description="description",
|
|
24498
|
-
max_event_age=cdk.Duration.minutes(30),
|
|
24499
|
-
on_failure=destination,
|
|
24500
|
-
on_success=destination,
|
|
24501
|
-
provisioned_concurrent_executions=123,
|
|
24502
|
-
removal_policy=cdk.RemovalPolicy.DESTROY,
|
|
24503
|
-
retry_attempts=123
|
|
24504
|
-
),
|
|
24505
|
-
dead_letter_queue=queue,
|
|
24506
|
-
dead_letter_queue_enabled=False,
|
|
24507
|
-
dead_letter_topic=topic,
|
|
24508
|
-
description="description",
|
|
24509
|
-
environment={
|
|
24510
|
-
"environment_key": "environment"
|
|
24511
|
-
},
|
|
24512
|
-
environment_encryption=key,
|
|
24513
|
-
ephemeral_storage_size=size,
|
|
24514
|
-
events=[event_source],
|
|
24515
|
-
filesystem=file_system,
|
|
24516
|
-
function_name="functionName",
|
|
24517
|
-
initial_policy=[policy_statement],
|
|
24518
|
-
insights_version=lambda_insights_version,
|
|
24519
|
-
lambda_purpose="lambdaPurpose",
|
|
24520
|
-
layers=[layer_version],
|
|
24521
|
-
log_format="logFormat",
|
|
24522
|
-
log_group=log_group,
|
|
24523
|
-
log_retention=logs.RetentionDays.ONE_DAY,
|
|
24524
|
-
log_retention_retry_options=lambda.LogRetentionRetryOptions(
|
|
24525
|
-
base=cdk.Duration.minutes(30),
|
|
24526
|
-
max_retries=123
|
|
24527
|
-
),
|
|
24528
|
-
log_retention_role=role,
|
|
24529
|
-
max_event_age=cdk.Duration.minutes(30),
|
|
24530
|
-
memory_size=123,
|
|
24531
|
-
on_failure=destination,
|
|
24532
|
-
on_success=destination,
|
|
24533
|
-
params_and_secrets=params_and_secrets_layer_version,
|
|
24534
|
-
profiling=False,
|
|
24535
|
-
profiling_group=profiling_group,
|
|
24536
|
-
reserved_concurrent_executions=123,
|
|
24537
|
-
retry_attempts=123,
|
|
24538
|
-
role=role,
|
|
24539
|
-
runtime_management_mode=runtime_management_mode,
|
|
24540
|
-
security_groups=[security_group],
|
|
24541
|
-
snap_start=snap_start_conf,
|
|
24542
|
-
system_log_level="systemLogLevel",
|
|
24543
|
-
timeout=cdk.Duration.minutes(30),
|
|
24544
|
-
tracing=lambda_.Tracing.ACTIVE,
|
|
24545
|
-
vpc=vpc,
|
|
24546
|
-
vpc_subnets=ec2.SubnetSelection(
|
|
24547
|
-
availability_zones=["availabilityZones"],
|
|
24548
|
-
one_per_az=False,
|
|
24549
|
-
subnet_filters=[subnet_filter],
|
|
24550
|
-
subnet_group_name="subnetGroupName",
|
|
24551
|
-
subnets=[subnet],
|
|
24552
|
-
subnet_type=ec2.SubnetType.PRIVATE_ISOLATED
|
|
24553
|
-
)
|
|
24333
|
+
CustomResource(self, "MyResource",
|
|
24334
|
+
service_token=fn.function_arn
|
|
24554
24335
|
)
|
|
24555
24336
|
'''
|
|
24556
24337
|
|
|
@@ -27249,7 +27030,6 @@ def _typecheckingstub__d971f3872acf20816e6da364ff9e6bec83fe2e68bbb9a7debc845b400
|
|
|
27249
27030
|
logging_config: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union[CfnFunction.LoggingConfigProperty, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
27250
27031
|
memory_size: typing.Optional[jsii.Number] = None,
|
|
27251
27032
|
package_type: typing.Optional[builtins.str] = None,
|
|
27252
|
-
policy: typing.Any = None,
|
|
27253
27033
|
reserved_concurrent_executions: typing.Optional[jsii.Number] = None,
|
|
27254
27034
|
runtime: typing.Optional[builtins.str] = None,
|
|
27255
27035
|
runtime_management_config: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union[CfnFunction.RuntimeManagementConfigProperty, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
@@ -27376,12 +27156,6 @@ def _typecheckingstub__7f9bb5c748b58d456d8f996b07509c9991044629122c76de58eaabc34
|
|
|
27376
27156
|
"""Type checking stubs"""
|
|
27377
27157
|
pass
|
|
27378
27158
|
|
|
27379
|
-
def _typecheckingstub__4a54210e26bffc8d85473b7ef012a678281a822dad29846097f8060e1a584fd8(
|
|
27380
|
-
value: typing.Any,
|
|
27381
|
-
) -> None:
|
|
27382
|
-
"""Type checking stubs"""
|
|
27383
|
-
pass
|
|
27384
|
-
|
|
27385
27159
|
def _typecheckingstub__776a8ed6e24e90be835cb39b621ff66305005b357a6debbf3a62f69d83289278(
|
|
27386
27160
|
value: typing.Optional[jsii.Number],
|
|
27387
27161
|
) -> None:
|
|
@@ -27547,7 +27321,6 @@ def _typecheckingstub__06b7f494e25475a49ebed0d7ed6d0fca9653b5fa5e00ded0cba4fc40a
|
|
|
27547
27321
|
logging_config: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union[CfnFunction.LoggingConfigProperty, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
27548
27322
|
memory_size: typing.Optional[jsii.Number] = None,
|
|
27549
27323
|
package_type: typing.Optional[builtins.str] = None,
|
|
27550
|
-
policy: typing.Any = None,
|
|
27551
27324
|
reserved_concurrent_executions: typing.Optional[jsii.Number] = None,
|
|
27552
27325
|
runtime: typing.Optional[builtins.str] = None,
|
|
27553
27326
|
runtime_management_config: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union[CfnFunction.RuntimeManagementConfigProperty, typing.Dict[builtins.str, typing.Any]]]] = None,
|