(batch): The following parameters can't be updated for Fargate compute environment thrown on fresh deployment
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
### 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,
});
```
2. Deploy this to an AWS account
3. Change the maxVcpu value to be 2048 or something different.
4. 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_
Contributor guide
Research direction
Start with the TypeScript FargateComputeEnvironment construct and reproduce the deployment after changing maxvCpus from 512 to 2048. Inspect the generated CloudFormation and AWS Batch update behavior; done means the maxVcpus change deploys successfully without sending parameters that Fargate cannot update.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- cloud, infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100