-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Comments
eladb
added
enhancement
@aws-cdk/assets
Related to the @aws-cdk/assets package
@aws-cdk/aws-lambda
Related to AWS Lambda
labels
Dec 26, 2018
eladb
pushed a commit
that referenced
this issue
Dec 27, 2018
Adds CloudFormation resource metadata which enables tools such as SAM CLI to find local assets used by resources in the template. See design document under [design/code-asset-metadata.md](./design/code-asset-metadata.md) Fixes #1432
eladb
pushed a commit
that referenced
this issue
Dec 27, 2018
…#1433) Adds CloudFormation resource metadata which enables tools such as SAM CLI to find local assets used by resources in the template. The toolkit enables this feature by default, but it can be disabled using `--no-asset-metadata` or by setting `assetMetadata` to `false` in `cdk.json`. See design document under [design/code-asset-metadata.md](./design/code-asset-metadata.md) Fixes #1432
srchase
added
feature-request
A feature should be added or improved.
and removed
enhancement
labels
Jan 3, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: