This is the new Amazon CloudFormation Template Reference Guide. Please update your bookmarks and links. For help getting started with CloudFormation, see the Amazon CloudFormation User Guide.
AWS::ECS::Task
Details on a task in a cluster.
Syntax
To declare this entity in your Amazon CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::ECS::Task" }
YAML
Type: AWS::ECS::Task
Return values
Ref
Fn::GetAtt
Cluster-
The short name or full Amazon Resource Name (ARN) of the cluster to run your task on. If you do not specify a cluster, the default cluster is assumed.
Each account receives a default cluster the first time you use the service, but you may also create other clusters.
Cpu-
The number of CPU units used by the task as expressed in a task definition. It can be expressed as an integer using CPU units (for example,
1024). It can also be expressed as a string using vCPUs (for example,1 vCPUor1 vcpu). String values are converted to an integer that indicates the CPU units when the task definition is registered.If you're using the EC2 launch type or the external launch type, this field is optional. Supported values are between
128CPU units (0.125vCPUs) and196608CPU units (192vCPUs). If you do not specify a value, the parameter is ignored.This field is required for Fargate. For information about the valid values, see Task size in the Amazon Elastic Container Service Developer Guide.
CreatedAt-
The Unix timestamp for the time when the task was created. More specifically, it's for the time when the task entered the
PENDINGstate. DesiredStatus-
The desired status of the task. For more information, see Task Lifecycle.
Group-
The name of the task group that's associated with the task.
LastStatus-
The last known status for the task. For more information, see Task Lifecycle.
LaunchType-
The infrastructure where your task runs on. For more information, see Amazon ECS launch types in the Amazon Elastic Container Service Developer Guide.
Memory-
The amount of memory (in MiB) that the task uses as expressed in a task definition. It can be expressed as an integer using MiB (for example,
1024). If it's expressed as a string using GB (for example,1GBor1 GB), it's converted to an integer indicating the MiB when the task definition is registered.If you use the EC2 launch type, this field is optional.
If you use the Fargate launch type, this field is required. You must use one of the following values. The value that you choose determines the range of supported values for the
cpuparameter.-
512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available
cpuvalues: 256 (.25 vCPU) -
1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available
cpuvalues: 512 (.5 vCPU) -
2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) - Available
cpuvalues: 1024 (1 vCPU) -
Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) - Available
cpuvalues: 2048 (2 vCPU) -
Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) - Available
cpuvalues: 4096 (4 vCPU) -
Between 16 GB and 60 GB in 4 GB increments - Available
cpuvalues: 8192 (8 vCPU)This option requires Linux platform
1.4.0or later. -
Between 32GB and 120 GB in 8 GB increments - Available
cpuvalues: 16384 (16 vCPU)This option requires Linux platform
1.4.0or later.
-
StartedBy-
The tag specified when a task is started. If an Amazon ECS service started the task, the
startedByparameter contains the deployment ID of that service. Tags-
The metadata that you apply to the task to help you categorize and organize the task. Each tag consists of a key and an optional value. You define both the key and value.
The following basic restrictions apply to tags:
-
Maximum number of tags per resource - 50
-
For each resource, each tag key must be unique, and each tag key can have only one value.
-
Maximum key length - 128 Unicode characters in UTF-8
-
Maximum value length - 256 Unicode characters in UTF-8
-
If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
-
Tag keys and values are case-sensitive.
-
Do not use
aws:,AWS:, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
-
TaskArn-
The Amazon Resource Name (ARN) of the task.
TaskDefinition-
The
familyandrevision(family:revision) or full ARN of the task definition to run. If arevisionisn't specified, the latestACTIVErevision is used.The full ARN value must match the value that you specified as the
Resourceof the principal's permissions policy.When you specify a task definition, you must either specify a specific revision, or all revisions in the ARN.
To specify a specific revision, include the revision number in the ARN. For example, to specify revision 2, use
arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName:2.To specify all revisions, use the wildcard (*) in the ARN. For example, to specify all revisions, use
arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName:*.For more information, see Policy Resources for Amazon ECS in the Amazon Elastic Container Service Developer Guide.
TaskIdProperty description not available.