-
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
(assets, aws-lambda): Add asset metadata for nested stack and image-type Lambda Function #14593
Comments
@hawflau makes total sense to add support for this. I've tagged it as P1, which means it should be on our near-term roadmap. We welcome community contributions! If you are able, we encourage you to contribute a bug fix or new feature to the CDK. If you decide to contribute, please start an engineering discussion in this issue to ensure there is a commonly understood design before submitting code. This will minimize the number of review cycles and get your code merged faster. |
Added PR to add Asset metadata to SpecRestApi resource when it contains AssetApiDefinition. |
…al tooling (#17343) ---- Reference issue #14593 Building on this initial PR: #1433 We're looking to add asset metadata to the NestedStack resource. The implementation is similar to this one [design/code-asset-metadata.md](https://github.com/aws/aws-cdk/pull/design/code-asset-metadata.md). This will allow SAM CLI to support CDK-synthed templates nested function resources. *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
) Adds Assets metadata to RestApi resource in case if AssetApiDefinition is used. This Metadata will enable SAM CLI to find local assets used by RestApi in the template. It follows the same design in document [design/code-asset-metadata.md](https://github.com/aws/aws-cdk/pull/design/code-asset-metadata.md) Fixes #14593 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
) Adds asset metadata to image-type lambda functions. This will allow SAM CLI to support local invocation of image-type lambdas from CDK-synthed templates. It follows the same design and builds upon #1433 Fixes #14593 Uses some changes from #17293 to enable asset metadata generation in integration tests *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…#17368) Adds asset metadata to image-type lambda functions. This will allow SAM CLI to support local invocation of image-type lambdas from CDK-synthed templates. It follows the same design and builds upon aws#1433 Fixes aws#14593 Uses some changes from aws#17293 to enable asset metadata generation in integration tests *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
… resource provider functions (#17551) ---- Following up on issue #14593 and PR #1433. It seems that log retention and customer resource provider constructs create the corresponding lambda functions using ```CfnResource()``` which means that the asset metadata isn't appended to the output template. *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Following up on issue #14593 The integration with SAM tool requires to have some more info about the Assets. SAM needs to know if the Asset was already bundled or not, and what is the original asset path before staging. This change is to add the following assets metadata: - aws:asset:is-bundled - aws:asset:original-path ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…al tooling (aws#17343) ---- Reference issue aws#14593 Building on this initial PR: aws#1433 We're looking to add asset metadata to the NestedStack resource. The implementation is similar to this one [design/code-asset-metadata.md](https://github.com/aws/aws-cdk/pull/design/code-asset-metadata.md). This will allow SAM CLI to support CDK-synthed templates nested function resources. *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…#17293) Adds Assets metadata to RestApi resource in case if AssetApiDefinition is used. This Metadata will enable SAM CLI to find local assets used by RestApi in the template. It follows the same design in document [design/code-asset-metadata.md](https://github.com/aws/aws-cdk/pull/design/code-asset-metadata.md) Fixes aws#14593 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…#17368) Adds asset metadata to image-type lambda functions. This will allow SAM CLI to support local invocation of image-type lambdas from CDK-synthed templates. It follows the same design and builds upon aws#1433 Fixes aws#14593 Uses some changes from aws#17293 to enable asset metadata generation in integration tests *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
… resource provider functions (aws#17551) ---- Following up on issue aws#14593 and PR aws#1433. It seems that log retention and customer resource provider constructs create the corresponding lambda functions using ```CfnResource()``` which means that the asset metadata isn't appended to the output template. *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Following up on issue aws#14593 The integration with SAM tool requires to have some more info about the Assets. SAM needs to know if the Asset was already bundled or not, and what is the original asset path before staging. This change is to add the following assets metadata: - aws:asset:is-bundled - aws:asset:original-path ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Add CloudFormation resource metadata for SAM to find local assets for the resources below:
Use Case
In this PR, resource metadata was added for zip-type Lambda Function for SAM to find local assets (for example, for running
sam local invoke
). As SAM CLI now supports local nested stacks and image-type Lambda Function, adding resource metadata for these two types of resources will enable SAM CLI to support CDK-synthed templates with these two types of resources.Proposed Solution
I believe the implementation will be very similar to the PR mentioned above.
For local nested stack, the value of
aws::asset::property
should be"TemplateURL"
.For image-type Lambda Function, it's a bit tricky - because the local path has to sit inside the
ImageUri
property underCode
, I propose the value ofaws::asset::property
to be"Code.ImageUri"
.Example for local nested stack (in yaml):
Example for image-type Lambda Function (in yaml):
Other
This is a 🚀 Feature Request
The text was updated successfully, but these errors were encountered: