airflow.contrib.operators.ecs_operator

Module Contents

class airflow.contrib.operators.ecs_operator.ECSOperator(task_definition, cluster, overrides, aws_conn_id=None, region_name=None, launch_type='EC2', group=None, placement_constraints=None, platform_version='LATEST', network_configuration=None, **kwargs)[source]

Bases: airflow.models.BaseOperator

Execute a task on AWS EC2 Container Service

Parameters
  • task_definition (str) – the task definition name on EC2 Container Service

  • cluster (str) – the cluster name on EC2 Container Service

  • overrides (dict) – the same parameter that boto3 will receive (templated): http://boto3.readthedocs.org/en/latest/reference/services/ecs.html#ECS.Client.run_task

  • aws_conn_id (str) – connection id of AWS credentials / region name. If None, credential boto3 strategy will be used (http://boto3.readthedocs.io/en/latest/guide/configuration.html).

  • region_name (str) – region name to use in AWS Hook. Override the region_name in connection (if provided)

  • launch_type (str) – the launch type on which to run your task (‘EC2’ or ‘FARGATE’)

  • group (str) – the name of the task group associated with the task

  • placement_constraints (list) – an array of placement constraint objects to use for the task

  • platform_version (str) – the platform version on which your task is running

  • network_configuration (dict) – the network configuration for the task

ui_color = #f0ede4[source]
client[source]
arn[source]
template_fields = ['overrides'][source]
execute(self, context)[source]
_wait_for_task_ended(self)[source]
_check_success_task(self)[source]
get_hook(self)[source]
on_kill(self)[source]