Describe the bug
After updating dependencies from 0.31.0 to 0.32.0 I got the following error ❌ AppName failed: Error [ValidationError]: Parameters: [AdoptEcrRepositorydbc60defc59544bcaa5c28c95d68f62cCodeArtifactHash8BCBAA49] must have values
New template code after dependency update:
Parameters:
AdoptEcrRepositorydbc60defc59544bcaa5c28c95d68f62cCodeArtifactHash8BCBAA49:
Type: String
Description: Artifact hash for asset
"AppName/AdoptEcrRepositorydbc60defc59544bcaa5c28c95d68f62c/Code"
Possibly caused by #2334 ?
To Reproduce
Full code available at https://github.com/markusl/cdk-fargate-docker-starter
Expected behavior
Should probably work as in previous version.
Version:
I'm getting the same error when trying to upload custom Lambda Layer or run Lambda function.
const testPythonLayer = new lambda.LayerVersion(this, "testPythonLayer", {
name: "testPythonLayer",
code: lambda.Code.asset("layer/test.zip"),
compatibleRuntimes: [ lambda.Runtime.Python36, lambda.Runtime.Python37 ]
});
Error in the output:
❌ TestPythonLambdaLayerExampleStack failed: Error [ValidationError]: Parameters: [testPythonLayerCodeArtifactHash793D5953] must have values
at Request.extractError (/Users/rdjurasaj/.nvm/versions/node/v12.2.0/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/protocol/query.js:50:29)
at Request.callListeners (/Users/rdjurasaj/.nvm/versions/node/v12.2.0/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
at Request.emit (/Users/rdjurasaj/.nvm/versions/node/v12.2.0/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
at Request.emit (/Users/rdjurasaj/.nvm/versions/node/v12.2.0/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/request.js:683:14)
at Request.transition (/Users/rdjurasaj/.nvm/versions/node/v12.2.0/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/request.js:22:10)
at AcceptorStateMachine.runTo (/Users/rdjurasaj/.nvm/versions/node/v12.2.0/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/state_machine.js:14:12)
at /Users/rdjurasaj/.nvm/versions/node/v12.2.0/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/state_machine.js:26:10
at Request.<anonymous> (/Users/rdjurasaj/.nvm/versions/node/v12.2.0/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/request.js:38:9)
at Request.<anonymous> (/Users/rdjurasaj/.nvm/versions/node/v12.2.0/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/request.js:685:12)
at Request.callListeners (/Users/rdjurasaj/.nvm/versions/node/v12.2.0/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/sequential_executor.js:116:18) {
message: 'Parameters: [testPythonLayerCodeArtifactHash793D5953] must have ' +
'values',
code: 'ValidationError',
time: 2019-05-26T15:34:18.399Z,
requestId: 'b98d3ba9-7fcb-11e9-8bee-ed35cd885e4a',
statusCode: 400,
retryable: false,
retryDelay: 269.339135006735
}
Parameters: [testPythonLayerCodeArtifactHash793D5953] must have values
Most likely a regression bug.
Could you guys please ensure that your CLI version is also 0.32.0?
@eladb you’re probably right. Recently, I’ve started running cdk commands from ./node_modules/ directory because very often I forget to keep global cdk up to date :). I’ll check get I get home.
@eladb I did upgrade global CLI to 0.32.0, but I can't really test since my stack depends on imported IAM Role, and that's not working with 0.32.0 at the moment. I will open a new issue for it.

EDIT: @eladb I take that back. I'm using nvm and most likely my global node_modules got out of whack. Everything is working for me on 0.32.0.

@robertd you will get this error if not all your CDK modules have the same version. Try to align your package.json file to the same version and nuke & rebuild your node_modules directory.
[This is caused by the fact that 0.31.0 and 0.32.0 are major versions]
@eladb 🤣 I was updating my reply above... Everything is working, it was my nvm acting up. I just nuked global node_modules and reinstalled cdk and it started working.
Glad to hear, and sorry for all the breaking changes.
@markusl, please reopen if this is still an issue
No worries (it was more user error than cdk breaking change to be honest) :)
Most helpful comment
Glad to hear, and sorry for all the breaking changes.
@markusl, please reopen if this is still an issue