Actions, resources, and condition keys for Amazon Elastic Container Service
Amazon Elastic Container Service (service prefix: ecs) provides the following
service-specific operations, resources, actions, and condition keys for use in IAM permission
policies.
References:
-
Learn how to configure this service.
-
View a list of the API operations available for this service.
-
Learn how to secure this service and its resources by using IAM permission policies.
-
View the programmatic service authorization reference
for this service.
Topics
API operations defined by Amazon Elastic Container Service
The following table maps API operations to the IAM actions they authorize. Only condition keys that have static values for the given API and action are listed; for the full set of condition keys supported by each action, see the Actions table.
| Operation | IAM action | Condition key | Possible value(s) | Access level |
|---|---|---|---|---|
|
ContinueServiceDeployment |
Write |
|||
|
CreateCapacityProvider |
Write |
|||
Write |
||||
Tagging, Write |
||||
iam:PassedToService |
ecs.amazonaws.com |
Write |
||
|
CreateCluster |
Write |
|||
Tagging, Write |
||||
|
CreateDaemon |
Write |
|||
Tagging, Write |
||||
iam:PassedToService |
ecs-tasks.amazonaws.com |
Write |
||
|
CreateExpressGatewayService |
Write |
|||
Write |
||||
Write |
||||
Tagging, Write |
||||
iam:PassedToService |
ecs-tasks.amazonaws.com, ecs.amazonaws.com |
Write |
||
|
CreateService |
Write |
|||
Tagging, Write |
||||
iam:PassedToService |
ecs-tasks.amazonaws.com, ecs.amazonaws.com |
Write |
||
|
CreateTaskSet |
Write |
|||
Tagging, Write |
||||
iam:PassedToService |
ecs-tasks.amazonaws.com |
Write |
||
|
DeleteAccountSetting |
Write |
|||
|
DeleteAttributes |
Write |
|||
|
DeleteCapacityProvider |
Write |
|||
Write |
||||
|
DeleteCluster |
Write |
|||
|
DeleteDaemon |
Write |
|||
|
DeleteDaemonTaskDefinition |
Write |
|||
|
DeleteExpressGatewayService |
Write |
|||
|
DeleteService |
Write |
|||
|
DeleteTaskDefinitions |
Write |
|||
|
DeleteTaskSet |
Write |
|||
|
DeregisterContainerInstance |
Write |
|||
|
DeregisterTaskDefinition |
Write |
|||
|
DescribeCapacityProviders |
Read |
|||
|
DescribeClusters |
Read |
|||
|
DescribeContainerInstances |
Read |
|||
|
DescribeDaemon |
Read |
|||
|
DescribeDaemonDeployments |
Read |
|||
|
DescribeDaemonRevisions |
Read |
|||
|
DescribeDaemonTaskDefinition |
Read |
|||
|
DescribeExpressGatewayService |
Read |
|||
|
DescribeServiceDeployments |
Read |
|||
|
DescribeServiceRevisions |
Read |
|||
|
DescribeServices |
Read |
|||
|
DescribeTaskDefinition |
Read |
|||
|
DescribeTaskSets |
Read |
|||
|
DescribeTasks |
Read |
|||
|
DiscoverPollEndpoint |
Write |
|||
|
ExecuteCommand |
Write |
|||
|
GetTaskProtection |
Read |
|||
|
ListAccountSettings |
Read |
|||
|
ListAttributes |
List |
|||
|
ListClusters |
List |
|||
|
ListContainerInstances |
List |
|||
|
ListDaemonDeployments |
List |
|||
|
ListDaemonTaskDefinitions |
List |
|||
|
ListDaemons |
List |
|||
|
ListServiceDeployments |
List |
|||
|
ListServices |
List |
|||
|
ListServicesByNamespace |
List |
|||
|
ListTagsForResource |
Read |
|||
|
ListTaskDefinitionFamilies |
List |
|||
|
ListTaskDefinitions |
List |
|||
|
ListTasks |
List |
|||
|
PutAccountSetting |
Write |
|||
|
PutAccountSettingDefault |
Write |
|||
|
PutAttributes |
Write |
|||
|
PutClusterCapacityProviders |
Write |
|||
|
RegisterContainerInstance |
Write |
|||
Tagging, Write |
||||
|
RegisterDaemonTaskDefinition |
Write |
|||
Tagging, Write |
||||
iam:PassedToService |
ecs-tasks.amazonaws.com |
Write |
||
|
RegisterTaskDefinition |
Write |
|||
Tagging, Write |
||||
iam:PassedToService |
ecs-tasks.amazonaws.com |
Write |
||
|
RunTask |
Write |
|||
Tagging, Write |
||||
iam:PassedToService |
ecs-tasks.amazonaws.com, ecs.amazonaws.com |
Write |
||
|
StartTask |
Write |
|||
Tagging, Write |
||||
iam:PassedToService |
ecs-tasks.amazonaws.com, ecs.amazonaws.com |
Write |
||
|
StopServiceDeployment |
Write |
|||
|
StopTask |
Write |
|||
|
SubmitAttachmentStateChanges |
Write |
|||
|
SubmitContainerStateChange |
Write |
|||
|
SubmitTaskStateChange |
Write |
|||
|
TagResource |
Tagging, Write |
|||
|
UntagResource |
Tagging, Write |
|||
|
UpdateCapacityProvider |
Write |
|||
Write |
||||
iam:PassedToService |
ecs.amazonaws.com |
Write |
||
|
UpdateCluster |
Write |
|||
|
UpdateClusterSettings |
Write |
|||
|
UpdateContainerAgent |
Write |
|||
|
UpdateContainerInstancesState |
Write |
|||
|
UpdateDaemon |
Write |
|||
iam:PassedToService |
ecs-tasks.amazonaws.com |
Write |
||
|
UpdateExpressGatewayService |
Write |
|||
Write |
||||
iam:PassedToService |
ecs-tasks.amazonaws.com, ecs.amazonaws.com |
Write |
||
|
UpdateService |
Write |
|||
iam:PassedToService |
ecs-tasks.amazonaws.com, ecs.amazonaws.com |
Write |
||
|
UpdateServicePrimaryTaskSet |
Write |
|||
|
UpdateTaskProtection |
Write |
|||
|
UpdateTaskSet |
Write |
Actions defined by Amazon Elastic Container Service
You can specify the following actions in the Action element of an IAM
policy statement. Use policies to grant permissions to perform an operation in Amazon. When
you use an action in a policy, you usually allow or deny access to the API operation or CLI
command with the same name. However, in some cases, a single action controls access to more
than one operation. Alternatively, some operations require several different actions.
| Actions | Description | Resource types (*required) | Condition keys | Access level |
|---|---|---|---|---|
Grants permission to continue a paused service deployment |
Write |
|||
Grants permission to create a new capacity provider. Capacity providers are associated with an Amazon ECS cluster and are used in capacity provider strategies to facilitate cluster auto scaling |
Write |
|||
Grants permission to create a new Amazon ECS cluster |
Write |
|||
Grants permission to create a new daemon in a specified cluster |
Write |
|||
Grants permission to create a new Amazon ECS Express Gateway service with cluster and task definition |
Write |
|||
Grants permission to run and maintain a desired number of tasks from a specified task definition via service creation |
Write |
|||
Grants permission to create a new Amazon ECS task set |
Write |
|||
Grants permission to modify the ARN and resource ID format of a resource for a specified IAM user, IAM role, or the root user for an account. You can specify whether the new ARN and resource ID format are disabled for new resources that are created |
Write |
|||
Grants permission to delete one or more custom attributes from an Amazon ECS resource |
Write |
|||
Grants permission to delete the specified capacity provider |
Write |
|||
Grants permission to delete the specified cluster |
Write |
|||
Grants permission to delete a specified daemon within a cluster |
Write |
|||
Grants permission to delete the specified daemon task definition |
Write |
|||
Grants permission to delete a specified Express Gateway service |
Write |
|||
Grants permission to delete a specified service within a cluster |
Write |
|||
Grants permission to delete the specified task definitions by family and revision |
Write |
|||
Grants permission to delete the specified task set |
Write |
|||
Grants permission to deregister an Amazon ECS container instance from the specified cluster |
Write |
|||
Grants permission to deregister the specified task definition by family and revision |
Write |
|||
Grants permission to describe one or more Amazon ECS capacity providers |
Read |
|||
Grants permission to describes one or more of your clusters |
Read |
|||
Grants permission to describes Amazon ECS container instances |
Read |
|||
Grants permission to describe the specified daemon running in your cluster |
Read |
|||
Grants permission to describe one or more of your daemon deployments |
Read |
|||
Grants permission to describe one or more of your daemon revisions |
Read |
|||
Grants permission to describe a daemon task definition |
Read |
|||
Grants permission to describe the specified Express Gateway service |
Read |
|||
Grants permission to describe one or more of your service deployments |
Read |
|||
Grants permission to describe one or more of your service revisions |
Read |
|||
Grants permission to describe the specified services running in your cluster |
Read |
|||
Grants permission to describe a task definition. You can specify a family and revision to find information about a specific task definition, or you can simply specify the family to find the latest ACTIVE revision in that family |
Read |
|||
Grants permission to describe Amazon ECS task sets |
Read |
|||
Grants permission to describe a specified task or tasks |
Read |
|||
Grants permission to get an endpoint for the Amazon ECS agent to poll for updates |
Write |
|||
Grants permission to run a command remotely on an Amazon ECS container |
Write |
|||
Grants permission to retrieve the protection status of tasks in an Amazon ECS service |
Read |
|||
Grants permission to list the account settings for an Amazon ECS resource for a specified principal |
Read |
|||
Grants permission to lists the attributes for Amazon ECS resources within a specified target type and cluster |
List |
|||
Grants permission to get a list of existing clusters |
List |
|||
Grants permission to get a list of container instances in a specified cluster |
List |
|||
Grants permission to get a list of daemon deployments for a specified daemon |
List |
|||
Grants permission to get a list of daemon task definitions that are registered to your account |
List |
|||
Grants permission to get a list of daemons that are running in a specified cluster |
List |
|||
Grants permission to get a list of service deployments for a specified service |
List |
|||
Grants permission to get a list of services that are running in a specified cluster |
List |
|||
Grants permission to get a list of services that are running in a specified Amazon Web Services Cloud Map Namespace |
List |
|||
Grants permission to get a list of tags for the specified resource |
Read |
|||
Grants permission to get a list of task definition families that are registered to your account (which may include task definition families that no longer have any ACTIVE task definitions) |
List |
|||
Grants permission to get a list of task definitions that are registered to your account |
List |
|||
Grants permission to get a list of tasks for a specified cluster |
List |
|||
Grants permission to modify the ARN and resource ID format of a resource for a specified IAM user, IAM role, or the root user for an account. You can specify whether the new ARN and resource ID format are enabled for new resources that are created. Enabling this setting is required to use new Amazon ECS features such as resource tagging |
Write |
|||
Grants permission to modify the ARN and resource ID format of a resource type for all IAM users on an account for which no individual account setting has been set. Enabling this setting is required to use new Amazon ECS features such as resource tagging |
Write |
|||
Grants permission to create or update an attribute on an Amazon ECS resource |
Write |
|||
Grants permission to modify the available capacity providers and the default capacity provider strategy for a cluster |
Write |
|||
Grants permission to register an EC2 instance into the specified cluster |
Write |
|||
Grants permission to register a new daemon task definition from the supplied family and containerDefinitions |
Write |
|||
Grants permission to register a new task definition from the supplied family and containerDefinitions |
Write |
|||
Grants permission to start a task using random placement and the default Amazon ECS scheduler |
Write |
|||
Grants permission to start a new task from the specified task definition on the specified container instance or instances |
Write |
|||
Grants permission to stop an ongoing service deployment |
Write |
|||
Grants permission to stop a running task |
Write |
|||
Grants permission to send an acknowledgement that attachments changed states |
Write |
|||
Grants permission to send an acknowledgement that a container changed states |
Write |
|||
Grants permission to send an acknowledgement that a task changed states |
Write |
|||
Grants permission to tag the specified resource |
Tagging, Write |
|||
Grants permission to untag the specified resource |
Tagging, Write |
|||
Grants permission to update the specified capacity provider |
Write |
|||
Grants permission to modify the configuration or settings to use for a cluster |
Write |
|||
Grants permission to modify the settings to use for a cluster |
Write |
|||
Grants permission to update the Amazon ECS container agent on a specified container instance |
Write |
|||
Grants permission to the user to modify the status of an Amazon ECS container instance |
Write |
|||
Grants permission to modify the parameters of a daemon |
Write |
|||
Grants permission to modify the parameters of an Express Gateway service |
Write |
|||
Grants permission to modify the parameters of a service |
Write |
|||
Grants permission to modify the primary task set used in a service |
Write |
|||
Grants permission to modify the protection status of a task |
Write |
|||
Grants permission to update the specified task set |
Write |
Permission-only actions for Amazon Elastic Container Service
The following actions are defined by Amazon Elastic Container Service but are not directly invocable through any API operation. They can only be used in IAM policy statements to grant or deny permissions.
| Actions | Description | Resource types (*required) | Condition keys | Access level |
|---|---|---|---|---|
Grants permission to allow vended log delivery for a specified resource |
Permissions management, Write |
|||
Grants permission to an agent to connect with the Amazon ECS service to report status and get commands |
Write |
|||
Grants permission to collect system logs from the container instances |
Write |
|||
Grants permission to start a telemetry session |
Write |
Resource types defined by Amazon Elastic Container Service
The following resource types are defined by this service and can be used in the
Resource element of IAM permission policy statements.
| Resource types | ARN | Condition keys |
|---|---|---|
arn:${Partition}:ecs:${Region}:${Account}:capacity-provider/${CapacityProviderName} |
||
arn:${Partition}:ecs:${Region}:${Account}:cluster/${ClusterName} |
||
arn:${Partition}:ecs:${Region}:${Account}:container-instance/${ClusterName}/${ContainerInstanceId} |
||
arn:${Partition}:ecs:${Region}:${Account}:daemon/${ClusterName}/${DaemonName} |
||
arn:${Partition}:ecs:${Region}:${Account}:daemon-deployment/${ClusterName}/${DaemonName}/${DaemonDeploymentId} |
||
arn:${Partition}:ecs:${Region}:${Account}:daemon-revision/${ClusterName}/${DaemonName}/${DaemonRevisionId} |
||
arn:${Partition}:ecs:${Region}:${Account}:daemon-task-definition/${DaemonTaskDefinitionFamilyName}:${DaemonTaskDefinitionRevisionNumber} |
||
arn:${Partition}:ecs:${Region}:${Account}:service/${ClusterName}/${ServiceName} |
||
arn:${Partition}:ecs:${Region}:${Account}:service-deployment/${ClusterName}/${ServiceName}/${ServiceDeploymentId} |
||
arn:${Partition}:ecs:${Region}:${Account}:service-revision/${ClusterName}/${ServiceName}/${ServiceRevisionId} |
||
arn:${Partition}:ecs:${Region}:${Account}:task/${ClusterName}/${TaskId} |
||
arn:${Partition}:ecs:${Region}:${Account}:task-definition/${TaskDefinitionFamilyName}:${TaskDefinitionRevisionNumber} |
||
arn:${Partition}:ecs:${Region}:${Account}:task-set/${ClusterName}/${ServiceName}/${TaskSetId} |
Condition keys for Amazon Elastic Container Service
Amazon Elastic Container Service defines the following condition keys that can be used in the
Condition element of an IAM policy.
| Condition keys | Description | Type |
|---|---|---|
Filters access by the tags that are passed in the request |
String |
|
Filters access by the tag key-value pairs attached to the resource |
String |
|
Filters access by the tag keys that are passed in the request |
ArrayOfString |
|
Filters access by the name of a resource-creating API action |
String |
|
Filters access by the tag key-value pairs attached to the resource |
String |
|
Filters access by the Amazon ECS account setting name |
String |
|
Filters access by the public IP assignment configuration of your Amazon ECS task or Amazon ECS service that uses awsvpc network mode |
Bool |
|
Filters access by the ARN of an Amazon ECS capacity provider |
ArrayOfARN |
|
Filters access by the ARN of an Amazon ECS cluster |
ARN |
|
Filters access by the required compatibilities field provided in the request |
ArrayOfString |
|
Filters access by the ARN of an Amazon ECS container instance |
ARN |
|
Filters access by the name of an Amazon ECS container which is defined in the ECS task definition |
String |
|
Filters access by the ARN of an Amazon ECS daemon |
ARN |
|
Filters access by the ARN of an Amazon ECS daemon task definition |
ARN |
|
Filters access by the Amazon ECS managed Amazon EBS volume capability of your ECS task or service |
String |
|
Filters access by the enableECSManagedTags configuration of your Amazon ECS task or Amazon ECS service |
Bool |
|
Filters access by the execute-command capability of your Amazon ECS task or Amazon ECS service |
String |
|
Filters access by the enable field value in the Service Connect configuration |
String |
|
Filters access by the VPC lattice capability of your Amazon ECS service |
String |
|
Filters access by the Amazon KMS key id provided in the request |
String |
|
Filters access by the ARN of an Amazon ECS gateway |
ARN |
|
Filters access by the instance metadata tags propagation setting of your Amazon ECS capacity provider |
Bool |
|
Filters access by the ARN of Amazon Web Services Cloud Map namespace which is defined in the Service Connect Configuration |
ARN |
|
Filters access by the privileged field provided in the request |
String |
|
Filters access by the tag propagation configuration of your Amazon ECS task or Amazon ECS service |
String |
|
Filters access by the ARN of an Amazon ECS service |
ARN |
|
Filters access by the subnet configuration of your Amazon ECS task or Amazon ECS service that uses awsvpc network mode |
ArrayOfString |
|
Filters access by the ARN of an Amazon ECS task |
ARN |
|
Filters access by the task cpu, as an integer with 1024 = 1 vCPU, provided in the request |
Numeric |
|
Filters access by the ARN of an Amazon ECS task definition |
ARN |
|
Filters access by the task memory, as an integer representing MiB, provided in the request |
Numeric |