cdklabs / cdk-stacksets

Apache License 2.0
90 stars 14 forks source link

Deployment failed: Error: stack: SSM parameter not found #327

Closed Almenon closed 9 months ago

Almenon commented 9 months ago
$ cdk deploy                       

✨  Synthesis time: 1.95s

current credentials could not be used to assume 'arn:aws:iam::451441111407:role/cdk-hnb659fds-deploy-role-451441111407-us-east-1', but are for the right account. Proceeding anyway.
current credentials could not be used to assume 'arn:aws:iam::451441111407:role/cdk-hnb659fds-deploy-role-451441111407-us-east-1', but are for the right account. Proceeding anyway.

 ❌ Deployment failed: Error: stack: SSM parameter /cdk-bootstrap/hnb659fds/version not found. Has the environment been bootstrapped? Please run 'cdk bootstrap' (see https://docs.aws.amazon.com/cdk/latest/guide/bootstrapping.html)
    at Deployments.validateBootstrapStackVersion (/Users/almenon/.asdf/installs/nodejs/18.16.0/lib/node_modules/aws-cdk/lib/index.js:424:12023)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Deployments.buildSingleAsset (/Users/almenon/.asdf/installs/nodejs/18.16.0/lib/node_modules/aws-cdk/lib/index.js:424:10788)
    at async Object.buildAsset (/Users/almenon/.asdf/installs/nodejs/18.16.0/lib/node_modules/aws-cdk/lib/index.js:424:178251)
    at async /Users/almenon/.asdf/installs/nodejs/18.16.0/lib/node_modules/aws-cdk/lib/index.js:424:163919

stack: SSM parameter /cdk-bootstrap/hnb659fds/version not found. Has the environment been bootstrapped? Please run 'cdk bootstrap' (see https://docs.aws.amazon.com/cdk/latest/guide/bootstrapping.html)

Synth:

Parameters:
  BootstrapVersion:
    Type: AWS::SSM::Parameter::Value<String>
    Default: /cdk-bootstrap/hnb659fds/version
    Description: Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]

I'm not sure why it's trying to look for that parameter, the parameter that bootstrap creates is /cdk-bootstrap/ssoutility/version

Almenon commented 9 months ago

Turns out the issue was that the account was bootstrapped a long time ago with a custom qualifier for some reason. deleting the bootstrap cloudformation and re-boostrapping fixed it.