RuntimePlatform
- class aws_cdk.aws_ecs.RuntimePlatform(*, cpu_architecture=None, operating_system_family=None)
Bases:
object
The interface for Runtime Platform.
- Parameters:
cpu_architecture (
Optional
[CpuArchitecture
]) – The CpuArchitecture for Fargate Runtime Platform. Default: - Undefined.operating_system_family (
Optional
[OperatingSystemFamily
]) – The operating system for Fargate Runtime Platform. Default: - Undefined.
- ExampleMetadata:
infused
Example:
# Create a Task Definition for the Windows container to start task_definition = ecs.FargateTaskDefinition(self, "TaskDef", runtime_platform=ecs.RuntimePlatform( operating_system_family=ecs.OperatingSystemFamily.WINDOWS_SERVER_2019_CORE, cpu_architecture=ecs.CpuArchitecture.X86_64 ), cpu=1024, memory_limit_mi_b=2048 ) task_definition.add_container("windowsservercore", logging=ecs.LogDriver.aws_logs(stream_prefix="win-iis-on-fargate"), port_mappings=[ecs.PortMapping(container_port=80)], image=ecs.ContainerImage.from_registry("mcr.microsoft.com/windows/servercore/iis:windowsservercore-ltsc2019") )
Attributes
- cpu_architecture
The CpuArchitecture for Fargate Runtime Platform.
- Default:
Undefined.
- operating_system_family
The operating system for Fargate Runtime Platform.
- Default:
Undefined.