aws-cdk-lib.aws_ecs.RuntimePlatform

interface RuntimePlatform

LanguageType name
.NETAmazon.CDK.AWS.ECS.RuntimePlatform
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsecs#RuntimePlatform
Javasoftware.amazon.awscdk.services.ecs.RuntimePlatform
Pythonaws_cdk.aws_ecs.RuntimePlatform
TypeScript (source)aws-cdk-lib » aws_ecs » RuntimePlatform

The interface for Runtime Platform.

Example

// Create a Task Definition for the Windows container to start
const taskDefinition = new ecs.FargateTaskDefinition(this, 'TaskDef', {
  runtimePlatform: {
    operatingSystemFamily: ecs.OperatingSystemFamily.WINDOWS_SERVER_2019_CORE,
    cpuArchitecture: ecs.CpuArchitecture.X86_64,
  },
  cpu: 1024,
  memoryLimitMiB: 2048,
});

taskDefinition.addContainer('windowsservercore', {
  logging: ecs.LogDriver.awsLogs({ streamPrefix: 'win-iis-on-fargate' }),
  portMappings: [{ containerPort: 80 }],
  image: ecs.ContainerImage.fromRegistry('mcr.microsoft.com/windows/servercore/iis:windowsservercore-ltsc2019'),
});

Properties

NameTypeDescription
cpuArchitecture?CpuArchitectureThe CpuArchitecture for Fargate Runtime Platform.
operatingSystemFamily?OperatingSystemFamilyThe operating system for Fargate Runtime Platform.

cpuArchitecture?

Type: CpuArchitecture (optional, default: Undefined.)

The CpuArchitecture for Fargate Runtime Platform.


operatingSystemFamily?

Type: OperatingSystemFamily (optional, default: Undefined.)

The operating system for Fargate Runtime Platform.