-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Lambda code: add asset metadata to support SAM CLI #1432
Copy link
Copy link
Closed
Labels
@aws-cdk/assetsRelated to the @aws-cdk/assets packageRelated to the @aws-cdk/assets package@aws-cdk/aws-lambdaRelated to AWS LambdaRelated to AWS Lambdafeature-requestA feature should be added or improved.A feature should be added or improved.
Description
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
@aws-cdk/assetsRelated to the @aws-cdk/assets packageRelated to the @aws-cdk/assets package@aws-cdk/aws-lambdaRelated to AWS LambdaRelated to AWS Lambdafeature-requestA feature should be added or improved.A feature should be added or improved.