enum CpuManufacturer
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.EC2.CpuManufacturer |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsec2#CpuManufacturer |
Java | software.amazon.awscdk.services.ec2.CpuManufacturer |
Python | aws_cdk.aws_ec2.CpuManufacturer |
TypeScript (source) | aws-cdk-lib » aws_ec2 » CpuManufacturer |
CPU manufacturers supported by EC2 instances.
Restricts the acceptable CPU vendor for selected instance types.
Example
declare const vpc: ec2.Vpc;
declare const infrastructureRole: iam.Role;
declare const instanceProfile: iam.InstanceProfile;
const cluster = new ecs.Cluster(this, 'Cluster', { vpc });
// Create a Managed Instances Capacity Provider
const miCapacityProvider = new ecs.ManagedInstancesCapacityProvider(this, 'MICapacityProvider', {
infrastructureRole,
ec2InstanceProfile: instanceProfile,
subnets: vpc.privateSubnets,
securityGroups: [new ec2.SecurityGroup(this, 'MISecurityGroup', { vpc })],
instanceRequirements: {
vCpuCountMin: 1,
memoryMin: Size.gibibytes(2),
cpuManufacturers: [ec2.CpuManufacturer.INTEL],
acceleratorManufacturers: [ec2.AcceleratorManufacturer.NVIDIA],
},
propagateTags: ecs.PropagateManagedInstancesTags.CAPACITY_PROVIDER,
});
// Optionally configure security group rules using IConnectable interface
miCapacityProvider.connections.allowFrom(ec2.Peer.ipv4(vpc.vpcCidrBlock), ec2.Port.tcp(80));
// Add the capacity provider to the cluster
cluster.addManagedInstancesCapacityProvider(miCapacityProvider);
const taskDefinition = new ecs.TaskDefinition(this, 'TaskDef', {
memoryMiB: '512',
cpu: '256',
networkMode: ecs.NetworkMode.AWS_VPC,
compatibility: ecs.Compatibility.MANAGED_INSTANCES,
});
taskDefinition.addContainer('web', {
image: ecs.ContainerImage.fromRegistry('amazon/amazon-ecs-sample'),
memoryReservationMiB: 256,
});
new ecs.FargateService(this, 'FargateService', {
cluster,
taskDefinition,
minHealthyPercent: 100,
capacityProviderStrategies: [
{
capacityProvider: miCapacityProvider.capacityProviderName,
weight: 1,
},
],
});
Members
| Name | Description |
|---|---|
| INTEL | Intel CPUs (e.g., Xeon families). |
| AMD | AMD CPUs (e.g., EPYC families). |
| AWS | AWS-designed CPUs (e.g., Graviton families). |
| APPLE | Apple CPUs (e.g., M1, M2). |
INTEL
Intel CPUs (e.g., Xeon families).
AMD
AMD CPUs (e.g., EPYC families).
AWS
AWS-designed CPUs (e.g., Graviton families).
APPLE
Apple CPUs (e.g., M1, M2).

.NET
Go
Java
Python
TypeScript (