Skip to content

(batch): The following parameters can't be updated for Fargate compute environment thrown on fresh deployment #27054

@bhargav265

Description

@bhargav265

Describe the bug

We are using Fargate compute environment and we are unable to update the max vcpus on CFN.
We get the error

The following parameters can\'t be updated for Fargate compute environment: allocationStrategy, bidPercentage, ec2Configuration, ec2KeyPair, imageId, instanceRole, instanceTypes, launchTemplate, placementGroup, tags, type, updatePolicy, updateToLatestImageVersion. (Service: Batch, Status Code: 400, Request ID: 5bf1284d-eefb-42c1-921a-41e6d0b44565)

Expected Behavior

Should update the maxVcpus directly

Current Behavior

Throws the error

The following parameters can\'t be updated for Fargate compute environment: allocationStrategy, bidPercentage, ec2Configuration, ec2KeyPair, imageId, instanceRole, instanceTypes, launchTemplate, placementGroup, tags, type, updatePolicy, updateToLatestImageVersion. (Service: Batch, Status Code: 400, Request ID: 5bf1284d-eefb-42c1-921a-41e6d0b44565)

Reproduction Steps

  1. Make a Compute environment with some vcpu setting something like:
 new FargateComputeEnvironment(this, batchComputeEnvironmentName, {
            enabled: true,
            maxvCpus: 512,
            vpc: props.vpc,
            computeEnvironmentName: batchComputeEnvironmentName,
        });
  1. Deploy this to an AWS account
  2. Change the maxVcpu value to be 2048 or something different.
  3. Deploy again.

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

V2

Framework Version

No response

Node.js Version

18.16.1

OS

Linux

Language

Typescript

Language Version

No response

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-batchRelated to AWS BatchbugThis issue is a bug.needs-cfnThis issue is waiting on changes to CloudFormation before it can be addressed.p3

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions