Skip to content

Unable to parse request while deploying CDk stack #13349

@nicolasduminil

Description

@nicolasduminil

Trying to deploy a CDK 2.221.1 based stack, using CDK CLI 2.1031.1, on a localstack 4.10 instance running as a Docker image, I'm getting, the output below:

Bootstrapping environment aws://000000000000/eu-west-3...
Trusted accounts for deployment: (none)
Trusted accounts for lookup: (none)
Using default execution policy of 'arn:aws:iam::aws:policy/AdministratorAccess'. Pass '--cloudformation-execution-policies' to customize.
 CDKToolkit: creating CloudFormation changeset...
 CDKToolkit |  0/12 | 1:04:07 PM | REVIEW_IN_PROGRESS   | AWS::CloudFormation::Stack | CDKToolkit User Initiated
 CDKToolkit |  0/12 | 1:04:07 PM | CREATE_IN_PROGRESS   | AWS::CloudFormation::Stack | CDKToolkit 
 CDKToolkit |  0/12 | 1:04:07 PM | CREATE_IN_PROGRESS   | AWS::SSM::Parameter        | CdkBootstrapVersion 
 CDKToolkit |  0/12 | 1:04:07 PM | CREATE_IN_PROGRESS   | AWS::IAM::Role             | CloudFormationExecutionRole 
 CDKToolkit |  1/12 | 1:04:07 PM | CREATE_COMPLETE      | AWS::SSM::Parameter        | CdkBootstrapVersion 
 CDKToolkit |  1/12 | 1:04:07 PM | CREATE_IN_PROGRESS   | AWS::ECR::Repository       | ContainerAssetsRepository 
 CDKToolkit |  2/12 | 1:04:07 PM | CREATE_COMPLETE      | AWS::IAM::Role             | CloudFormationExecutionRole 
 CDKToolkit |  2/12 | 1:04:07 PM | CREATE_IN_PROGRESS   | AWS::S3::Bucket            | StagingBucket 
 CDKToolkit |  3/12 | 1:04:07 PM | CREATE_COMPLETE      | AWS::ECR::Repository       | ContainerAssetsRepository 
 CDKToolkit |  3/12 | 1:04:08 PM | CREATE_IN_PROGRESS   | AWS::IAM::Role             | DeploymentActionRole 
 CDKToolkit |  4/12 | 1:04:08 PM | CREATE_COMPLETE      | AWS::S3::Bucket            | StagingBucket 
 CDKToolkit |  4/12 | 1:04:08 PM | CREATE_IN_PROGRESS   | AWS::IAM::Role             | FilePublishingRole 
 CDKToolkit |  5/12 | 1:04:08 PM | CREATE_COMPLETE      | AWS::IAM::Role             | DeploymentActionRole 
 CDKToolkit |  5/12 | 1:04:08 PM | CREATE_IN_PROGRESS   | AWS::IAM::Policy           | FilePublishingRoleDefaultPolicy 
 CDKToolkit |  6/12 | 1:04:08 PM | CREATE_COMPLETE      | AWS::IAM::Role             | FilePublishingRole 
 CDKToolkit |  6/12 | 1:04:08 PM | CREATE_IN_PROGRESS   | AWS::IAM::Role             | ImagePublishingRole  
 CDKToolkit |  7/12 | 1:04:08 PM | CREATE_COMPLETE      | AWS::IAM::Policy           | FilePublishingRoleDefaultPolicy 
 CDKToolkit |  7/12 | 1:04:08 PM | CREATE_IN_PROGRESS   | AWS::IAM::Policy           | ImagePublishingRoleDefaultPolicy 
 CDKToolkit |  8/12 | 1:04:08 PM | CREATE_COMPLETE      | AWS::IAM::Role             | ImagePublishingRole 
 CDKToolkit |  8/12 | 1:04:08 PM | CREATE_IN_PROGRESS   | AWS::IAM::Role             | LookupRole 
 CDKToolkit |  9/12 | 1:04:08 PM | CREATE_COMPLETE      | AWS::IAM::Policy           | ImagePublishingRoleDefaultPolicy 
 CDKToolkit |  9/12 | 1:04:08 PM | CREATE_IN_PROGRESS   | AWS::S3::BucketPolicy      | StagingBucketPolicy 
 CDKToolkit | 10/12 | 1:04:08 PM | CREATE_COMPLETE      | AWS::IAM::Role             | LookupRole 
 CDKToolkit | 11/12 | 1:04:08 PM | CREATE_COMPLETE      | AWS::S3::BucketPolicy      | StagingBucketPolicy 
 CDKToolkit | 12/12 | 1:04:08 PM | CREATE_COMPLETE      | AWS::CloudFormation::Stack | CDKToolkit 
  ✅  Environment aws://000000000000/eu-west-3 bootstrapped.
[INFO] 
[INFO] --- exec:3.3.0:exec (deploy-to-localstack) @ customer-service-ecs-cdk ---
__  ____  __  _____   ___  __ ____  ______ 
 --/ __ \/ / / / _ | / _ \/ //_/ / / / __/ 
 -/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \   
--\___\_\____/_/ |_/_/|_/_/|_|\____/___/   
2025-11-06 13:04:13,146 INFO  [io.quarkus] (main) customer-service-ecs-cdk 1.0-SNAPSHOT on JVM (powered by Quarkus 3.29.0) started in 0.270s. 
2025-11-06 13:04:13,151 INFO  [io.quarkus] (main) Profile prod activated. 
2025-11-06 13:04:13,151 INFO  [io.quarkus] (main) Installed features: [cdi]
2025-11-06 13:04:15,181 INFO  [io.quarkus] (main) customer-service-ecs-cdk stopped in 0.007s
[Warning at /QuarkusCustomerManagementStack/CustomerService/TaskDef/web] Proper policies need to be attached before pulling from ECR repository, or use 'fromEcrRepository'. [ack: @aws-cdk/aws-ecs:ecrImageRequiresPolicy]
[Warning at /QuarkusCustomerManagementStack/CustomerService/Service] minHealthyPercent has not been configured so the default value of 50% is used. The number of running tasks will decrease below the desired count during deployments etc. See https://github.com/aws/aws-cdk/issues/31705 [ack: @aws-cdk/aws-ecs:minHealthyPercent]

✨  Synthesis time: 2.51s

QuarkusCustomerManagementStack: start: Building QuarkusCustomerManagementStack Template
QuarkusCustomerManagementStack: success: Built QuarkusCustomerManagementStack Template
QuarkusCustomerManagementStack: start: Publishing QuarkusCustomerManagementStack Template (000000000000-eu-west-3-d65912ef)
QuarkusCustomerManagementStack: fail: exception while calling s3 with unknown operation: Unable to parse request (not well-formed (invalid token): line 1, column 0), invalid XML received:

Follows a very long JSON payload in which I can see, among others, this:

"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
...
"CDK bootstrap stack version 6 required. Please run \'cdk bootstrap\' with a recent version of the CDK CLI."

Given that my version of CDK CLI is the last one (2.1031.1), the last message is probably missleading. The bootstrap version associated to the CDK 2.222.0 is 20, as shown below:

aws cloudformation describe-stacks \
    --stack-name CDKToolkit \
    --query "Stacks[].Outputs[?OutputKey == 'BootstrapVersion'].OutputValue" \
    --output text
20

Accordingly, I dont know where this "CDK bootstrap version 6" comes from as it doesn't make much sense.

What am I missing here ?

Many thanks in advance.

Nicolas

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: integration/cdkIssues related to AWS Cloud Development Kitstatus: backlogTriaged but not yet being worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions