API failure reasons - Amazon Elastic Container Service
AWS services or capabilities described in AWS documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with AWS services in China.

API failure reasons

When an API action that you have triggered through the Amazon ECS API, console, or the AWS CLI exits with a failures error message, the following may assist in troubleshooting the cause. The failure will return a reason and the Amazon Resource Name (ARN) of the resource associated with the failure.

Many resources are Region-specific, so when using the console ensure that you set the correct Region for your resources. When using the AWS CLI, make sure that your AWS CLI commands are being sent to the correct region with the --region region parameter.

For more information about the structure of the Failure data type, see Failure in the Amazon Elastic Container Service API Reference.

API action

Failure reason

Cause

DescribeClusters

MISSING

The specified cluster was not found. Verify the spelling of the cluster name.

DescribeInstances

MISSING

The specified container instance was not found. Verify you specified the cluster the container instance is registered to and that the container instance ARN or ID is correct.

DescribeServices

MISSING

The specified service was not found. Verify the correct cluster or region has been specified and that the service ARN or name is valid.

DescribeTasks

MISSING

The specified task was not found. Verify the correct cluster or region has been specified and that the the task ARN or ID is valid.

RunTask or StartTask

RESOURCE:*

The resource or resources requested by the task are unavailable on the container instances in the cluster. If the resource is CPU, memory, ports, or elastic network interfaces, you may need to add additional container instances to your cluster.

For RESOURCE:ENI errors, your cluster does not have any available elastic network interface attachment points, which are required for tasks that use the awsvpc network mode. Amazon EC2 instances have a limit to the number of network interfaces that can be attached to them, and the primary network interface counts as one. For more information about how many network interfaces are supported per instance type, see IP Addresses Per Network Interface Per Instance Type in the Amazon EC2 User Guide for Linux Instances.

For RESOURCE:GPU errors, the number of GPUs requested by the task are unavailable and you may need to add GPU-enabled container instances to your cluster. For more information, see Working with GPUs on Amazon ECS.

AGENT

The container instance that you attempted to launch a task onto has an agent that is currently disconnected. To prevent extended wait times for task placement, the request was rejected.

LOCATION

The container instance that you attempted to launch a task onto is in a different Availability Zone than the subnet(s) you specified in your awsVpcConfiguration.

ATTRIBUTE

Your task definition contains a parameter that requires a specific container instance attribute that is not available on your container instances. For example, if your task uses the awsvpc network mode, but there are no instances in your specified subnets with the ecs.capability.task-eni attribute. For more information about which attributes are required for specific task definition parameters and agent configuration variables, see Task definition parameters and Amazon ECS Container Agent Configuration.

StartTask

MISSING

The container instance you attempted to launch the task onto does not exist. Perhaps the wrong cluster or region has been specified, or the container instance ARN or ID is misspelled.

INACTIVE

The container instance that you attempted to launch a task onto was previously deregistered with Amazon ECS and cannot be used.