-
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
Missing Lambda Asset Results in Reduced Template #4927
Comments
I am unable to reproduce this based on the instructions below. I consistently get the following error and the CLI immediately terminates with a non-zero exit code:
Please reopen and provide exact CLI command you are running in your CI/CD system, and preferably also |
I was able to recreate this with a certain scenario. In my case, I import various configs dynamically, so I wrap the async function main(): Promise<void> {
const app = new cdk.App();
const envProps = await envPropsFunc();
const stack = new InfraStack(
app, `InfraStack`,
envProps
);
}
main(); Under these circumstances, and the Lambda code asset missing, I see the deploy continue with a reduced template as described in the original post. |
CDK reported a missing asset for a Lambda, correctly, but the deploy continued with a vastly reduced CloudFormation template, causing infrastructure to be torn down.
Reproduction Steps
Add a Lambda Function to a stack and reference an asset that does not exist as it's
code
parameter. Runcdk diff
to see the resulting changes orcdk deploy
to see this reproduced on a stack.Error Log
Here is output from our CI job, showing the error, but continuing on to deployment
Environment
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: