Skip to main content

daemons

Creates, updates, deletes, gets or lists a daemons resource.

Overview

Namedaemons
TypeResource
Idaws.ecs.daemons

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
cluster_arnstringThe Amazon Resource Name (ARN) of the cluster that the daemon is running in.
created_atstring (date-time)The Unix timestamp for the time when the daemon was created.
current_revisionsarrayThe current daemon revision details, including the running task counts per capacity provider.
daemon_arnstringThe Amazon Resource Name (ARN) of the daemon.
deployment_arnstringThe Amazon Resource Name (ARN) of the most recent daemon deployment.
statusstringThe status of the daemon. (ACTIVE, DELETE_IN_PROGRESS)
updated_atstring (date-time)The Unix timestamp for the time when the daemon was last updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_daemonselectregionDescribes the specified daemon.
list_daemonsselectregionReturns a list of daemons. You can filter the results by cluster or capacity provider.
create_daemoninsertregion, daemonName, daemonTaskDefinitionArn, capacityProviderArnsCreates 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_daemonupdateregion, daemonArn, daemonTaskDefinitionArn, capacityProviderArnsUpdates 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_daemondeleteregionDeletes 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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

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
;

INSERT examples

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
;

UPDATE examples

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

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
;