Skip to content

Lambda code: add asset metadata to support SAM CLI #1432

@eladb

Description

@eladb

In order to enable AWS Lambda functions defined in CDK apps to be locally invoked through SAM CLI, the CLI needs to know the location of the Lambda handler code on the local disk.

The current implementation of Lambda code assets decouples the asset management from the Lambda resource, such that the resource's representation in the synthesized CloudFormation template basically just refers to the asset's S3 bucket and key indirectly via asset parameters.

This makes it quite complicated to traverse back from an asset to the resource which uses it. We propose to add CloudFormation metadata to the template so that SAM CLI will be able to infer the CodeUri of the function automatically.

Copy: @jfuss

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions