https://github.com/neilkuan/ecs-bottlerocket-capacityprovider-sample
Demo use Bottlerocket Capacity Provider to Scaling AutoScaling Group for ECS tasks scaling out.
https://github.com/neilkuan/ecs-bottlerocket-capacityprovider-sample
aws ecs fargate
Last synced: over 1 year ago
JSON representation
Demo use Bottlerocket Capacity Provider to Scaling AutoScaling Group for ECS tasks scaling out.
- Host: GitHub
- URL: https://github.com/neilkuan/ecs-bottlerocket-capacityprovider-sample
- Owner: neilkuan
- License: apache-2.0
- Created: 2021-06-27T15:39:10.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2025-03-15T00:21:11.000Z (over 1 year ago)
- Last Synced: 2025-03-15T01:24:05.016Z (over 1 year ago)
- Topics: aws, ecs, fargate
- Language: TypeScript
- Homepage:
- Size: 6.11 MB
- Stars: 8
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Demo use Bottlerocket Capacity Provider to Scaling AutoScaling Group for ECS tasks scaling out.
### key point, need to define `machineImageType` in `AddAutoScalingGroupCapacityOptions`.
```ts
const capacityProvider = new ecs.AsgCapacityProvider(this, 'AsgCapacityProvider', { autoScalingGroup, machineImageType: ecs.MachineImageType.BOTTLEROCKET });
// addAsgCapacityProvider option need to add { machineImageType: ecs.MachineImageType.BOTTLEROCKET }.
// see https://github.com/aws/aws-cdk/blob/6b2d0e0c867651cd632be9ca99c6e342fb3c1067/packages/%40aws-cdk/aws-ecs/lib/cluster.ts#L348-L374
ecsC.addAsgCapacityProvider(capacityProvider, { machineImageType: ecs.MachineImageType.BOTTLEROCKET });
```