LaunchType

class aws_cdk.aws_ecs.LaunchType(value)

Bases: Enum

The launch type of an ECS service.

ExampleMetadata:

infused

Example:

import aws_cdk.aws_ecs as ecs

# cluster: ecs.ICluster
# task_definition: ecs.TaskDefinition


rule = events.Rule(self, "Rule",
    schedule=events.Schedule.rate(cdk.Duration.hours(1))
)

rule.add_target(targets.EcsTask(
    cluster=cluster,
    task_definition=task_definition,
    launch_type=ecs.LaunchType.FARGATE
))

Attributes

EC2

The service will be launched using the EC2 launch type.

EXTERNAL

The service will be launched using the EXTERNAL launch type.

FARGATE

The service will be launched using the FARGATE launch type.