Skip to content
v2.278.0

RuntimePlatform Struct ​

The interface for Runtime Platform.

Example ​

ts
declare const cluster: ecs.Cluster;
const applicationLoadBalancedFargateService = new ecsPatterns.ApplicationLoadBalancedFargateService(this, 'Service', {
  cluster,
  memoryLimitMiB: 512,
  taskImageOptions: {
    image: ecs.ContainerImage.fromRegistry('amazon/amazon-ecs-sample'),
  },
  minHealthyPercent: 100,
  runtimePlatform: {
    cpuArchitecture: ecs.CpuArchitecture.ARM64,
    operatingSystemFamily: ecs.OperatingSystemFamily.LINUX,
  },
});
python
# cluster: ecs.Cluster

application_load_balanced_fargate_service = ecs_patterns.ApplicationLoadBalancedFargateService(self, "Service",
    cluster=cluster,
    memory_limit_mi_b=512,
    task_image_options=ecsPatterns.ApplicationLoadBalancedTaskImageOptions(
        image=ecs.ContainerImage.from_registry("amazon/amazon-ecs-sample")
    ),
    min_healthy_percent=100,
    runtime_platform=ecs.RuntimePlatform(
        cpu_architecture=ecs.CpuArchitecture.ARM64,
        operating_system_family=ecs.OperatingSystemFamily.LINUX
    )
)
java
Cluster cluster;

ApplicationLoadBalancedFargateService applicationLoadBalancedFargateService = ApplicationLoadBalancedFargateService.Builder.create(this, "Service")
        .cluster(cluster)
        .memoryLimitMiB(512)
        .taskImageOptions(ApplicationLoadBalancedTaskImageOptions.builder()
                .image(ContainerImage.fromRegistry("amazon/amazon-ecs-sample"))
                .build())
        .minHealthyPercent(100)
        .runtimePlatform(RuntimePlatform.builder()
                .cpuArchitecture(CpuArchitecture.ARM64)
                .operatingSystemFamily(OperatingSystemFamily.LINUX)
                .build())
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
Cluster cluster;

var applicationLoadBalancedFargateService = new ApplicationLoadBalancedFargateService(this, "Service", new ApplicationLoadBalancedFargateServiceProps {
    Cluster = cluster,
    MemoryLimitMiB = 512,
    TaskImageOptions = new ApplicationLoadBalancedTaskImageOptions {
        Image = ContainerImage.FromRegistry("amazon/amazon-ecs-sample")
    },
    MinHealthyPercent = 100,
    RuntimePlatform = new RuntimePlatform {
        CpuArchitecture = CpuArchitecture.ARM64,
        OperatingSystemFamily = OperatingSystemFamily.LINUX
    }
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var cluster Cluster

applicationLoadBalancedFargateService := ecsPatterns.NewApplicationLoadBalancedFargateService(this, jsii.String("Service"), &ApplicationLoadBalancedFargateServiceProps{
	Cluster: Cluster,
	MemoryLimitMiB: jsii.Number(512),
	TaskImageOptions: &ApplicationLoadBalancedTaskImageOptions{
		Image: ecs.ContainerImage_FromRegistry(jsii.String("amazon/amazon-ecs-sample")),
	},
	MinHealthyPercent: jsii.Number(100),
	RuntimePlatform: &RuntimePlatform{
		CpuArchitecture: ecs.CpuArchitecture_ARM64(),
		OperatingSystemFamily: ecs.OperatingSystemFamily_LINUX(),
	},
})

Properties ​

cpuArchitectureoptionalCpuArchitecturecpu_architectureoptionalCpuArchitecturecpuArchitectureoptionalCpuArchitectureCpuArchitectureoptionalCpuArchitectureCpuArchitectureoptionalCpuArchitecture = Undefined. #
The CpuArchitecture for Fargate Runtime Platform.
operatingSystemFamilyoptionalOperatingSystemFamilyoperating_system_familyoptionalOperatingSystemFamilyoperatingSystemFamilyoptionalOperatingSystemFamilyOperatingSystemFamilyoptionalOperatingSystemFamilyOperatingSystemFamilyoptionalOperatingSystemFamily = Undefined. #
The operating system for Fargate Runtime Platform.