Sha256: 1517a42415a2adec939f15cd73a51b6458b4981a1141ed85fb16dd279f47782d

Contents?: true

Size: 1.13 KB

Versions: 30

Compression:

Stored size: 1.13 KB

Contents

---
title: Create ecsTaskExecutionRole with AWS CLI
---

Here are commands you can copy and paste to create the `ecsTaskExecutionRole` IAM role:

    cat > /tmp/task-execution-assume-role.json <<EOL
    {
      "Version": "2012-10-17",
      "Statement": [
        {
          "Sid": "",
          "Effect": "Allow",
          "Principal": {
            "Service": "ecs-tasks.amazonaws.com"
          },
          "Action": "sts:AssumeRole"
        }
      ]
    }
    EOL
    aws iam create-role --role-name ecsTaskExecutionRole --assume-role-policy-document file:///tmp/task-execution-assume-role.json
    aws iam attach-role-policy --role-name ecsTaskExecutionRole --policy-arn arn:aws:iam::aws:policy/service-role/AmazonECSTaskExecutionRolePolicy

This is based from [Tutorial: Creating a Cluster with a Fargate Task Using the Amazon ECS CLI](https://docs.amazonaws.cn/en_us/AmazonECS/latest/userguide/ecs-cli-tutorial-fargate.html).

Also for a tutorial on how to create this `ecsTaskExecutionRole` via the AWS IAM Console: [Amazon ECS Task Execution IAM Role
](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_execution_IAM_role.html).

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
ufo-5.0.7 docs/_docs/aws-ecs-task-execution-role.md
ufo-5.0.6 docs/_docs/aws-ecs-task-execution-role.md
ufo-5.0.5 docs/_docs/aws-ecs-task-execution-role.md
ufo-5.0.4 docs/_docs/aws-ecs-task-execution-role.md
ufo-5.0.3 docs/_docs/aws-ecs-task-execution-role.md
ufo-5.0.2 docs/_docs/aws-ecs-task-execution-role.md
ufo-5.0.1 docs/_docs/aws-ecs-task-execution-role.md
ufo-5.0.0 docs/_docs/aws-ecs-task-execution-role.md
ufo-4.6.3 docs/_docs/aws-ecs-task-execution-role.md
ufo-4.6.2 docs/_docs/aws-ecs-task-execution-role.md
ufo-4.6.1 docs/_docs/aws-ecs-task-execution-role.md
ufo-4.6.0 docs/_docs/aws-ecs-task-execution-role.md
ufo-4.5.11 docs/_docs/aws-ecs-task-execution-role.md
ufo-4.5.10 docs/_docs/aws-ecs-task-execution-role.md
ufo-4.5.9 docs/_docs/aws-ecs-task-execution-role.md
ufo-4.5.8 docs/_docs/aws-ecs-task-execution-role.md
ufo-4.5.7 docs/_docs/aws-ecs-task-execution-role.md
ufo-4.5.6 docs/_docs/aws-ecs-task-execution-role.md
ufo-4.5.5 docs/_docs/aws-ecs-task-execution-role.md
ufo-4.5.4 docs/_docs/aws-ecs-task-execution-role.md