Skip to content

Commit

Permalink
feat(ecsoperator): Add execution role arn
Browse files Browse the repository at this point in the history
  • Loading branch information
devsjc committed Mar 4, 2025
1 parent 945cdee commit cb15ab3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/airflow_dags/plugins/operators/ecs_run_task_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
AWS_ACCOUNT_ID: str = os.getenv("AWS_ACCOUNT_ID", "")
ECS_SUBNET: str = os.getenv("ECS_SUBNET", "")
ECS_SECURITY_GROUP: str = os.getenv("ECS_SECURITY_GROUP", "")
ECS_EXECUTION_ROLE_ARN: str = os.getenv("ECS_EXECUTION_ROLE_ARN", "")
AWS_REGION: str = os.getenv("AWS_REGION", "eu-west-1")

@dataclasses.dataclass
Expand Down Expand Up @@ -109,6 +110,7 @@ def setup_operator(self) -> EcsRegisterTaskDefinitionOperator:
"cpu": str(self.container_cpu),
"memory": str(self.container_memory),
"requiresCompatibilities": ["FARGATE"],
"executionRoleArn": ECS_EXECUTION_ROLE_ARN,
"tags": [
{"key": "name", "value": self.name},
{"key": "environment", "value": ENV},
Expand Down

0 comments on commit cb15ab3

Please sign in to comment.