-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Local CDK Lambda Layer asset path not respected #1411
Comments
@abrooksv Looks like a CDK bug. A Layer does not have a property 'Code', it should be 'Content'. LayerVersion docs: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-layerversion.html |
Overwrote the template:
Leads to:
|
CDK has the 'aws:asset:property` set incorrectly. As far as the second issue (not allowing zip), we have an open issue for that here #947 but really the path should be pointed to the source (none-zipped asset). Closing as an issue is open with CDK and we already have an tracking issue for the other issue brought up. |
The `aws:asset:property` metadata entry was "Code" intead of "Content" as it should be for lambda layers. Fixes #4076 Fixes aws/aws-sam-cli#1411
* fix(lambda): asset metadata invalid for layers The `aws:asset:property` metadata entry was "Code" intead of "Content" as it should be for lambda layers. Fixes #4076 Fixes aws/aws-sam-cli#1411 * fix build
Description
When using CDK to create a layer, SAM local does not respect the
aws:asset:path
metadata.Steps to reproduce
Generated template snippet:
Modified lambda_downloader.py to add logging:
Observed result
Logs:
Expected result
HELLO should say
/tmp/aws-lambda-layer-kubectl/layer.zip
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
sam --version
: 0.21.0Add --debug flag to command you are running
The text was updated successfully, but these errors were encountered: