CodeConfig — AWS Cloud Development Kit 1.204.0 documentation (original) (raw)

AWS Cloud Development Kit

class aws_cdk.aws_lambda.CodeConfig(*, image=None, inline_code=None, s3_location=None)

Bases: object

Result of binding Code into a Function.

Parameters:

ExampleMetadata:

fixture=_generated

Example:

The code below shows an example of how to instantiate this type.

The values are placeholders you should change.

import aws_cdk.aws_lambda as lambda_

code_config = lambda.CodeConfig( image=lambda.CodeImageConfig( image_uri="imageUri",

    # the properties below are optional
    cmd=["cmd"],
    entrypoint=["entrypoint"],
    working_directory="workingDirectory"
),
inline_code="inlineCode",
s3_location=Location(
    bucket_name="bucketName",
    object_key="objectKey",

    # the properties below are optional
    object_version="objectVersion"
)

)

Attributes

image

Docker image configuration (mutually exclusive with s3Location and inlineCode).

Default:

inline_code

Inline code (mutually exclusive with s3Location and image).

Default:

s3_location

The location of the code in S3 (mutually exclusive with inlineCode and image).

Default: