BottlerocketEcsVariant Enum
Amazon ECS variant.
Example
ts
declare const cluster: ecs.Cluster;
cluster.addCapacity('bottlerocket-asg', {
instanceType: new ec2.InstanceType('p3.2xlarge'),
machineImage: new ecs.BottleRocketImage({
variant: ecs.BottlerocketEcsVariant.AWS_ECS_2_NVIDIA,
}),
});
python
# cluster: ecs.Cluster
cluster.add_capacity("bottlerocket-asg",
instance_type=ec2.InstanceType("p3.2xlarge"),
machine_image=ecs.BottleRocketImage(
variant=ecs.BottlerocketEcsVariant.AWS_ECS_2_NVIDIA
)
)
java
Cluster cluster;
cluster.addCapacity("bottlerocket-asg", AddCapacityOptions.builder()
.instanceType(new InstanceType("p3.2xlarge"))
.machineImage(BottleRocketImage.Builder.create()
.variant(BottlerocketEcsVariant.AWS_ECS_2_NVIDIA)
.build())
.build());
csharp
// Install: dotnet add package Amazon.CDK.Lib
Cluster cluster;
cluster.AddCapacity("bottlerocket-asg", new AddCapacityOptions {
InstanceType = new InstanceType("p3.2xlarge"),
MachineImage = new BottleRocketImage(new BottleRocketImageProps {
Variant = BottlerocketEcsVariant.AWS_ECS_2_NVIDIA
})
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var cluster Cluster
cluster.AddCapacity(jsii.String("bottlerocket-asg"), &AddCapacityOptions{
InstanceType: ec2.NewInstanceType(jsii.String("p3.2xlarge")),
MachineImage: ecs.NewBottleRocketImage(&BottleRocketImageProps{
Variant: ecs.BottlerocketEcsVariant_AWS_ECS_2_NVIDIA,
}),
})
Members
| Member | Description |
|---|---|
AWS_ECS_1 | aws-ecs-1 variant. |
AWS_ECS_1_NVIDIA | aws-ecs-1-nvidia variant. |
AWS_ECS_2 | aws-ecs-2 variant. |
AWS_ECS_2_NVIDIA | aws-ecs-2-nvidia variant. |
Referenced by
BottleRocketImageProps.variantvariantvariantVariantVariant