094459 commented on a change in pull request #22093:
URL: https://github.com/apache/airflow/pull/22093#discussion_r822855405
##########
File path: docs/apache-airflow-providers-amazon/operators/ecs.rst
##########
@@ -46,6 +46,149 @@ Before using EcsOperator *cluster*, *task definition*, and
*container* need to b
:start-after: [START howto_operator_ecs]
:end-before: [END howto_operator_ecs]
+Using Operator
+--------------
+
+
+Launch Types
+--------------
+
+You can use this Operator to run ECS Tasks in ECS Clusters with launch types
of EC2, Fargate and EXTERNAL, using the "launch_type" parameter. Bear in mind
that the different launch types will require different parameters to be
supplied.
+
+```
+launch_type="EC2|Fargate|EXTERNAL"
+```
+
+*Example Operator for launch_type of EC2 and EXTERNAL*
+
+```
+ hello_world = EcsOperator(
+ task_id="hello_world",
+ dag=dag,
+ aws_conn_id="aws_default",
+ cluster="ecs-cluster-name",
+ task_definition="ecs-task-definition",
+ launch_type="EC2|EXTERNAL",
+ overrides={ "containerOverrides": [
+ {
+ "name": "hello-world-container",
+ "command" : [ "echo","hello world from Airflow" ],
+ }
+ ] },
+ tags={
+ "Customer": "X",
+ "Project": "Y",
+ "Application": "Z",
+ "Version": "0.0.1",
+ "Environment": "Development",
+ }
+ )
Review comment:
What about IAM Permissions, these are not code and they are specific to
the Operator - these feel like they should go in the How To doc. I don't feel
they should go in the partials folder as they are not useful in any other doc.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]