You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
4:09:33 PM | CREATE_FAILED | AWS::Lambda::Function | createDeploymentGroupLambda
Resource handler returned message: "Uploaded file must be a non-empty zip (Service: Lambda, Status Code: 400, Request ID: 3c34131a-fd1d-4ab8-910c-a5c5835676c1, Extended Request ID: null)" (RequestToken: de7494e8-19
4c-3c7f-0643-eb02c68208b6, HandlerErrorCode: InvalidRequest)
which is logical, because of the definition
// Custom resource to create the deployment group
const createDeploymentGroupLambda = new lambda.Function(this, 'createDeploymentGroupLambda', {
code: lambda.Code.fromAsset(
path.join(__dirname, 'custom_resources'),
{
exclude: ["**", "!create_deployment_group.py"]
}),
runtime: lambda.Runtime.PYTHON_3_8,
handler: 'create_deployment_group.handler',
role: customLambdaServiceRole,
description: "Custom resource to create deployment group",
memorySize: 128,
timeout: cdk.Duration.seconds(60)
});
the cloned repo directory custom_resources contains only custom_resources/create_deployment_group.py file, which is excluded by the lambda definition, therefore it attempts to upload empty zip.
is there some file missing in the demo repository in the custom_resources directory?
The text was updated successfully, but these errors were encountered:
@seyfer ran into this issue myself while building same same environment for B/G deployments.
Turns out this is a known issue with AWS CDK with respect to node versions, see here: aws/aws-cdk#12536
In summary when using the Code.fromAsset() API for the lambda module with local assets, deploying new assets will fail with the error that you're seeing ("Uploaded file must be a non-empty zip (Service: Lambda")).
This has confirmed behavior if you're using a node version > 15.6 and a fix is to downgrade.
I've tested v14.15.4 and was able to run the "cdk deploy" command successfully after with all components built.
Steps 2/3 call out clearing out the cache in the cdk.out/ directory (on your local IDE) and from your S3 bucket.
For step 1: downgrading the Node engine i used NVM to install v14.15.4 and uninstall v15.6, did below:
confirm your node version: node --version
install 14.15.4: nvm install 14.15.4
uninstall 15.6: nvm uninstall 15.6
reconfirm node version: node --version to be v14.15.4
Hey all, just FYI we refreshed the Blue Green deployment chapter and just merged the changes this week. Hopefully the experience will be much better now. Thanks for bringing this up and thank you @senatoredu for the assistance.
when I am on this page
https://ecsworkshop.com/blue_green_deployments/build_environment/
and I run
I have this error
which is logical, because of the definition
the cloned repo directory
custom_resources
contains onlycustom_resources/create_deployment_group.py
file, which is excluded by the lambda definition, therefore it attempts to upload empty zip.is there some file missing in the demo repository in the
custom_resources
directory?The text was updated successfully, but these errors were encountered: