daemons
Creates, updates, deletes, gets or lists a daemons resource.
Overview
| Name | daemons |
| Type | Resource |
| Id | aws.ecs.daemons |
Fields
The following fields are returned by SELECT queries:
- describe_daemon
- list_daemons
| Name | Datatype | Description |
|---|---|---|
cluster_arn | string | The Amazon Resource Name (ARN) of the cluster that the daemon is running in. |
created_at | string (date-time) | The Unix timestamp for the time when the daemon was created. |
current_revisions | array | The current daemon revision details, including the running task counts per capacity provider. |
daemon_arn | string | The Amazon Resource Name (ARN) of the daemon. |
deployment_arn | string | The Amazon Resource Name (ARN) of the most recent daemon deployment. |
status | string | The status of the daemon. (ACTIVE, DELETE_IN_PROGRESS) |
updated_at | string (date-time) | The Unix timestamp for the time when the daemon was last updated. |
| Name | Datatype | Description |
|---|---|---|
daemon_summaries_list | array | The list of daemon summaries. |
next_token | string | The nextToken value to include in a future ListDaemons request. When the results of a ListDaemons request exceed maxResults, this value can be used to retrieve the next page of results. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_daemon | select | region | Describes the specified daemon. | |
list_daemons | select | region | Returns a list of daemons. You can filter the results by cluster or capacity provider. | |
create_daemon | insert | region, daemonName, daemonTaskDefinitionArn, capacityProviderArns | Creates a new daemon in the specified cluster and capacity providers. A daemon deploys cross-cutting software agents such as security monitoring, telemetry, and logging independently across your Amazon ECS infrastructure. Amazon ECS deploys exactly one daemon task on each container instance of the specified capacity providers. When a container instance registers with the cluster, Amazon ECS automatically starts daemon tasks. Amazon ECS starts a daemon task before scheduling other tasks. Daemons are essential for instance health - if a daemon task stops, Amazon ECS automatically drains and replaces that container instance. ECS Managed Daemons is only supported for Amazon ECS Managed Instances Capacity Providers. | |
update_daemon | update | region, daemonArn, daemonTaskDefinitionArn, capacityProviderArns | Updates the specified daemon. When you update a daemon, a new deployment is triggered that progressively rolls out the changes to the container instances associated with the daemon's capacity providers. For more information, see Daemon deployments in the Amazon Elastic Container Service Developer Guide. Amazon ECS drains existing container instances and provisions new instances with the updated daemon. Amazon ECS automatically launches replacement tasks for your services. Updating a daemon triggers a rolling deployment that drains and replaces container instances. Plan updates during maintenance windows to minimize impact on running services. ECS Managed Daemons is only supported for Amazon ECS Managed Instances Capacity Providers. | |
delete_daemon | delete | region | Deletes the specified daemon. The daemon must be in an ACTIVE state to be deleted. Deleting a daemon stops all running daemon tasks on the associated container instances. Amazon ECS drains existing container instances and provisions new instances without the deleted daemon. Amazon ECS automatically launches replacement tasks for your Amazon ECS services. ECS Managed Daemons is only supported for Amazon ECS Managed Instances Capacity Providers. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_daemon
- list_daemons
Describes the specified daemon.
SELECT
cluster_arn,
created_at,
current_revisions,
daemon_arn,
deployment_arn,
status,
updated_at
FROM aws.ecs.daemons
WHERE region = '{{ region }}' -- required
;
Returns a list of daemons. You can filter the results by cluster or capacity provider.
SELECT
daemon_summaries_list,
next_token
FROM aws.ecs.daemons
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_daemon
- Manifest
Creates a new daemon in the specified cluster and capacity providers. A daemon deploys cross-cutting software agents such as security monitoring, telemetry, and logging independently across your Amazon ECS infrastructure. Amazon ECS deploys exactly one daemon task on each container instance of the specified capacity providers. When a container instance registers with the cluster, Amazon ECS automatically starts daemon tasks. Amazon ECS starts a daemon task before scheduling other tasks. Daemons are essential for instance health - if a daemon task stops, Amazon ECS automatically drains and replaces that container instance. ECS Managed Daemons is only supported for Amazon ECS Managed Instances Capacity Providers.
INSERT INTO aws.ecs.daemons (
daemonName,
clusterArn,
daemonTaskDefinitionArn,
capacityProviderArns,
deploymentConfiguration,
tags,
propagateTags,
enableECSManagedTags,
enableExecuteCommand,
clientToken,
region
)
SELECT
'{{ daemonName }}' /* required */,
'{{ clusterArn }}',
'{{ daemonTaskDefinitionArn }}' /* required */,
'{{ capacityProviderArns }}' /* required */,
'{{ deploymentConfiguration }}',
'{{ tags }}',
'{{ propagateTags }}',
{{ enableECSManagedTags }},
{{ enableExecuteCommand }},
'{{ clientToken }}',
'{{ region }}'
RETURNING
created_at,
daemon_arn,
deployment_arn,
status
;
# Description fields are for documentation purposes
- name: daemons
props:
- name: region
value: "{{ region }}"
description: Required parameter for the daemons resource.
- name: daemonName
value: "{{ daemonName }}"
description: |
The name of the daemon. Up to 255 letters (uppercase and lowercase), numbers, underscores, and hyphens are allowed.
- name: clusterArn
value: "{{ clusterArn }}"
description: |
The Amazon Resource Name (ARN) of the cluster to create the daemon in.
- name: daemonTaskDefinitionArn
value: "{{ daemonTaskDefinitionArn }}"
description: |
The Amazon Resource Name (ARN) of the daemon task definition to use for the daemon.
- name: capacityProviderArns
value:
- "{{ capacityProviderArns }}"
description: |
The Amazon Resource Names (ARNs) of the capacity providers to associate with the daemon. The daemon deploys tasks on container instances managed by these capacity providers.
- name: deploymentConfiguration
description: |
Optional deployment parameters that control how the daemon rolls out updates, including the drain percentage, alarm-based rollback, and bake time.
value:
drainPercent: {{ drainPercent }}
alarms:
alarmNames:
- "{{ alarmNames }}"
enable: {{ enable }}
bakeTimeInMinutes: {{ bakeTimeInMinutes }}
- name: tags
description: |
The metadata that you apply to the daemon to help you categorize and organize them. Each tag consists of a key and an optional value. You define both of them. 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 Web Services 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.
value:
- key: "{{ key }}"
value: "{{ value }}"
- name: propagateTags
value: "{{ propagateTags }}"
description: |
Specifies whether to propagate the tags from the daemon to the daemon tasks. If you don't specify a value, the tags aren't propagated. You can only propagate tags to daemon tasks during task creation. To add tags to a task after task creation, use the TagResource API action.
valid_values: ['DAEMON', 'NONE']
- name: enableECSManagedTags
value: {{ enableECSManagedTags }}
description: |
Specifies whether to turn on Amazon ECS managed tags for the tasks in the daemon. For more information, see Tagging your Amazon ECS resources in the Amazon Elastic Container Service Developer Guide.
- name: enableExecuteCommand
value: {{ enableExecuteCommand }}
description: |
Determines whether the execute command functionality is turned on for the daemon. If true, the execute command functionality is turned on for all tasks in the daemon.
- name: clientToken
value: "{{ clientToken }}"
description: |
An identifier that you provide to ensure the idempotency of the request. It must be unique and is case sensitive. Up to 36 ASCII characters in the range of 33-126 (inclusive) are allowed.
UPDATE examples
- update_daemon
Updates the specified daemon. When you update a daemon, a new deployment is triggered that progressively rolls out the changes to the container instances associated with the daemon's capacity providers. For more information, see Daemon deployments in the Amazon Elastic Container Service Developer Guide. Amazon ECS drains existing container instances and provisions new instances with the updated daemon. Amazon ECS automatically launches replacement tasks for your services. Updating a daemon triggers a rolling deployment that drains and replaces container instances. Plan updates during maintenance windows to minimize impact on running services. ECS Managed Daemons is only supported for Amazon ECS Managed Instances Capacity Providers.
UPDATE aws.ecs.daemons
SET
daemonArn = '{{ daemonArn }}',
daemonTaskDefinitionArn = '{{ daemonTaskDefinitionArn }}',
capacityProviderArns = '{{ capacityProviderArns }}',
deploymentConfiguration = '{{ deploymentConfiguration }}',
propagateTags = '{{ propagateTags }}',
enableECSManagedTags = {{ enableECSManagedTags }},
enableExecuteCommand = {{ enableExecuteCommand }}
WHERE
region = '{{ region }}' --required
AND daemonArn = '{{ daemonArn }}' --required
AND daemonTaskDefinitionArn = '{{ daemonTaskDefinitionArn }}' --required
AND capacityProviderArns = '{{ capacityProviderArns }}' --required
RETURNING
created_at,
daemon_arn,
deployment_arn,
status,
updated_at;
DELETE examples
- delete_daemon
Deletes the specified daemon. The daemon must be in an ACTIVE state to be deleted. Deleting a daemon stops all running daemon tasks on the associated container instances. Amazon ECS drains existing container instances and provisions new instances without the deleted daemon. Amazon ECS automatically launches replacement tasks for your Amazon ECS services. ECS Managed Daemons is only supported for Amazon ECS Managed Instances Capacity Providers.
DELETE FROM aws.ecs.daemons
WHERE region = '{{ region }}' --required
;