EcsEc2LaunchTarget

class aws_cdk.aws_stepfunctions_tasks.EcsEc2LaunchTarget(*, placement_constraints=None, placement_strategies=None)

Bases: object

Configuration for running an ECS task on EC2.

See

https://docs.aws.amazon.com/AmazonECS/latest/userguide/launch_types.html#launch-type-ec2

Parameters
  • placement_constraints (Optional[List[PlacementConstraint]]) – Placement constraints. Default: - None

  • placement_strategies (Optional[List[PlacementStrategy]]) – Placement strategies. Default: - None

Methods

bind(_task, *, task_definition, cluster=None)

Called when the EC2 launch type is configured on RunTask.

Parameters
  • _task (EcsRunTask) –

  • task_definition (ITaskDefinition) – Task definition to run Docker containers in Amazon ECS.

  • cluster (Optional[ICluster]) – A regional grouping of one or more container instances on which you can run tasks and services. Default: - No cluster

Return type

EcsLaunchTargetConfig