-
Notifications
You must be signed in to change notification settings - Fork 4.5k
AmplifyGraphqlApi: Validation error deploying AmplifyGraphqlApi CDK construct #27526
Description
Describe the bug
I am following the walkthrough in the CDK construct announcement blog post found here: https://aws.amazon.com/blogs/mobile/announcing-aws-amplifys-graphql-api-cdk-construct-deploy-real-time-graphql-api-and-data-stack-on-aws/. The only difference is I am deploying from a package in a pnpm monorepo, however, everything else is identical. During the cdk deploy logs I see the following error message:
Error occurred while monitoring stack: Error [ValidationError]: 2 validation errors detected: Value '' at 'stackName' failed to satisfy constraint: Member must satisfy regular expression pattern: [a-zA-Z][-a-zA-Z0-9]|arn:[-a-zA-Z0-9:/._+]; Value '' at 'stackName' failed to satisfy constraint: Member must have length greater than or equal to 1
at Request.extractError (C:...\AppData\Local\pnpm\global\5.pnpm\aws-cdk@2.100.0\node_modules\aws-cdk\lib\index.js:362:46430)
at Request.callListeners (C:...\AppData\Local\pnpm\global\5.pnpm\aws-cdk@2.100.0\node_modules\aws-cdk\lib\index.js:362:90083)
at Request.emit (C:...\AppData\Local\pnpm\global\5.pnpm\aws-cdk@2.100.0\node_modules\aws-cdk\lib\index.js:362:89531)
at Request.emit (C:...\AppData\Local\pnpm\global\5.pnpm\aws-cdk@2.100.0\node_modules\aws-cdk\lib\index.js:362:196289)
at Request.transition (C:...\AppData\Local\pnpm\global\5.pnpm\aws-cdk@2.100.0\node_modules\aws-cdk\lib\index.js:362:189841)
at AcceptorStateMachine.runTo (C:...\AppData\Local\pnpm\global\5.pnpm\aws-cdk@2.100.0\node_modules\aws-cdk\lib\index.js:362:154713)
at C:...\AppData\Local\pnpm\global\5.pnpm\aws-cdk@2.100.0\node_modules\aws-cdk\lib\index.js:362:155043
at Request. (C:...\AppData\Local\pnpm\global\5.pnpm\aws-cdk@2.100.0\node_modules\aws-cdk\lib\index.js:362:190133)
at Request. (C:...\AppData\Local\pnpm\global\5.pnpm\aws-cdk@2.100.0\node_modules\aws-cdk\lib\index.js:362:196364)
at Request.callListeners (C:...\AppData\Local\pnpm\global\5.pnpm\aws-cdk@2.100.0\node_modules\aws-cdk\lib\index.js:362:90251) {
code: 'ValidationError',
time: 2023-10-12T14:16:28.072Z,
requestId: 'e828bd70-e9db-4173-8924-3dec501fccf6',
statusCode: 400,
retryable: false,
retryDelay: 142.81362092100824
}
Following deploy, the generated resources appear to work correctly.
Expected Behavior
No errors during cdk deploy
Current Behavior
During the cdk deploy logs I see the following error message:
Error occurred while monitoring stack: Error [ValidationError]: 2 validation errors detected: Value '' at 'stackName' failed to satisfy constraint: Member must satisfy regular expression pattern: [a-zA-Z][-a-zA-Z0-9]|arn:[-a-zA-Z0-9:/._+]; Value '' at 'stackName' failed to satisfy constraint: Member must have length greater than or equal to 1
at Request.extractError (C:...\AppData\Local\pnpm\global\5.pnpm\aws-cdk@2.100.0\node_modules\aws-cdk\lib\index.js:362:46430)
at Request.callListeners (C:...\AppData\Local\pnpm\global\5.pnpm\aws-cdk@2.100.0\node_modules\aws-cdk\lib\index.js:362:90083)
at Request.emit (C:...\AppData\Local\pnpm\global\5.pnpm\aws-cdk@2.100.0\node_modules\aws-cdk\lib\index.js:362:89531)
at Request.emit (C:...\AppData\Local\pnpm\global\5.pnpm\aws-cdk@2.100.0\node_modules\aws-cdk\lib\index.js:362:196289)
at Request.transition (C:...\AppData\Local\pnpm\global\5.pnpm\aws-cdk@2.100.0\node_modules\aws-cdk\lib\index.js:362:189841)
at AcceptorStateMachine.runTo (C:...\AppData\Local\pnpm\global\5.pnpm\aws-cdk@2.100.0\node_modules\aws-cdk\lib\index.js:362:154713)
at C:...\AppData\Local\pnpm\global\5.pnpm\aws-cdk@2.100.0\node_modules\aws-cdk\lib\index.js:362:155043
at Request. (C:...\AppData\Local\pnpm\global\5.pnpm\aws-cdk@2.100.0\node_modules\aws-cdk\lib\index.js:362:190133)
at Request. (C:...\AppData\Local\pnpm\global\5.pnpm\aws-cdk@2.100.0\node_modules\aws-cdk\lib\index.js:362:196364)
at Request.callListeners (C:...\AppData\Local\pnpm\global\5.pnpm\aws-cdk@2.100.0\node_modules\aws-cdk\lib\index.js:362:90251) {
code: 'ValidationError',
time: 2023-10-12T14:16:28.072Z,
requestId: 'e828bd70-e9db-4173-8924-3dec501fccf6',
statusCode: 400,
retryable: false,
retryDelay: 142.81362092100824
}
Reproduction Steps
Follow instructions found here: https://aws.amazon.com/blogs/mobile/announcing-aws-amplifys-graphql-api-cdk-construct-deploy-real-time-graphql-api-and-data-stack-on-aws/
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.100.0
Framework Version
No response
Node.js Version
18.18.0
OS
windows
Language
TypeScript
Language Version
No response
Other information
No response