Skip to content

Remove IAM actions from minimal policy for AWS FargateCluster #381

@jgdwyer

Description

@jgdwyer

In the interest of minimizing the number of permissions that we need to provide to the cluster manager, I'd like to explore the option of removing the need for iam:ListRoles and iam:ListRoleTags actions if all resources are specified when creating the cluster. Looking at the code, it appears that if the task_role_arn and execution_role_arn are specified, then the iam actions are only needed when attempting to clean up stale resources.

Is there support for skipping the cleanup of stale IAM roles if task_role_arn and execution_role_arn are explicitly specified? It might enable us to reduce the resources needed to ec2, ecs, and logs. (And for FargateCluster we could eliminate the need for ec2 as well).

"ec2:CreateTags",
"ec2:DescribeNetworkInterfaces",
"ec2:DescribeSecurityGroups",
"ec2:DescribeSubnets",
"ec2:DescribeVpcs",
"ecs:DescribeTasks",
"ecs:ListAccountSettings",
"ecs:RegisterTaskDefinition",
"ecs:RunTask",
"ecs:StopTask",
"ecs:ListClusters",
"ecs:DescribeClusters",
"ecs:ListTaskDefinitions",
"ecs:DescribeTaskDefinition",
"ecs:DeregisterTaskDefinition",
"logs:DescribeLogGroups",
"logs:GetLogEvents"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions