EcsOptimizedImage

class aws_cdk.aws_ecs.EcsOptimizedImage

Bases: object

Construct a Linux or Windows machine image from the latest ECS Optimized AMI published in SSM.

Methods

get_image(scope)

Return the correct image.

Parameters

scope (Construct) –

Return type

MachineImageConfig

Static Methods

classmethod amazon_linux()

Construct an Amazon Linux AMI image from the latest ECS Optimized AMI published in SSM.

Return type

EcsOptimizedImage

classmethod amazon_linux2(hardware_type=None)

Construct an Amazon Linux 2 image from the latest ECS Optimized AMI published in SSM.

Parameters

hardware_type (Optional[AmiHardwareType]) – ECS-optimized AMI variant to use.

Return type

EcsOptimizedImage

classmethod windows(windows_version)

Construct a Windows image from the latest ECS Optimized AMI published in SSM.

Parameters

windows_version (WindowsOptimizedVersion) – Windows Version to use.

Return type

EcsOptimizedImage