Lambda code: add asset metadata to support SAM CLI #1432
Labels
@aws-cdk/assets
Related to the @aws-cdk/assets package
@aws-cdk/aws-lambda
Related to AWS Lambda
feature-request
A feature should be added or improved.
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
The text was updated successfully, but these errors were encountered: