Skip to main content

Amazon ECS ExecModule

Overview​

AwsEcsModule reads service inventory and deployment details from Amazon Elastic Container Service (Amazon ECS). Use it to reconcile an inventory against a specific cluster, check how many tasks are running during a release, or add the deployment state and task definition to an incident record.

The connector reads the ECS control plane. Task counts and rollout state can help a workflow decide what to investigate. Use application probes and load balancer metrics to assess what users are experiencing.

Usage​

  1. Create an Amazon ECS connection in the Integration Account Console. Verify the connection and confirm its status is READY.
  2. In Workflow Studio, add Amazon ECS to a task and select the connection under General > Connection.
  3. Set the region and exact cluster. Run list_services to discover service ARNs or describe_services with up to ten known service identifiers.
  4. Check status before using the output. Continue a list while hasMore is true. When describing services, inspect failures even when status is success.

Inputs​

InputTypeRequiredDefaultPurpose
operationstringNolist_servicesSelect list_services or describe_services.
regionstringYes—Commercial AWS or AWS GovCloud region hosting the cluster.
clusterstringYes—Exact cluster name or full ECS cluster ARN in the selected region and partition. Specify a cluster even when its name is default.
pageSizeintegerNo100Request 1–100 service ARNs per list page. Use for list_services.
nextTokenstringNo—Opaque continuation token from the preceding list_services result.
servicesstring arrayFor describe—Provide 1–10 distinct service names or full service ARNs in the selected region and partition. Use for describe_services.

Outputs​

OutputMeaning
statussuccess or error for the request. A successful describe request can still contain individual service failures.
operation / region / clusterRequested scope when available.
serviceArnsService ARNs from one list page.
hasMore / nextTokenWhether AWS returned another list page and the token to continue.
servicesDescribed service rows with available serviceName, serviceArn, status, desiredCount, runningCount, pendingCount, and deployments.
failuresPer-service describe failures with an ARN and reason when safe to return. Free-form AWS failure details are omitted.
requestIdAWS request reference when available.
errorRedacted information for a failed request, including retryability.

A deployment row can include id, status, rolloutState, taskDefinition, desiredCount, pendingCount, runningCount, and failedTasks. Treat missing deployment fields as unavailable. For example, AWS supplies rolloutState for supported ECS rolling deployments. AWS deployment fields

IntegrationAccount Requirements​

Use a verified Amazon ECS connection with account name AWS and status READY. Put the access key ID and secret access key in the protected AWS Access Key ID and AWS Secret Access Key fields. The module uses that key pair to sign requests with AWS Signature Version 4. This connection uses an access key pair without a session token.

Grant ecs:ListServices for discovery and ecs:DescribeServices for service details as needed. Scope ecs:ListServices with the ecs:cluster condition and restrict ecs:DescribeServices to the service ARNs the workflow needs. Amazon ECS IAM actions and resource types

Configuration​

The module derives the ECS HTTPS endpoint from the selected AWS region. Keep the credentials in the Integration Account. Run separate invocations for each account, region, and cluster.

Operations​

  • list_services reads one page of service ARNs for an explicit cluster. Use the ARNs to reconcile an inventory or feed a describe step in batches of up to ten. AWS ListServices API
  • describe_services reads service status, task counts, and selected deployment fields for known services. A service-level failure leaves other returned service rows available for processing. AWS DescribeServices API

Errors and Failure Modes​

  • VALIDATION_ERROR indicates an unsupported operation, invalid region or identifier, or an input that belongs to the other operation. Verify that the service identifiers belong to the selected cluster.
  • INTEGRATION_ACCOUNT_ERROR calls for checking the connection's verification, readiness, and protected key fields.
  • For an AWS authorization or lookup error, check the IAM permissions, region, and cluster scope. Use the AWS request ID for investigation when available.
  • If failures contains a service, reconcile that identifier against the cluster inventory before deciding whether to retry. A missing service has no verified deployment state.
  • Retry transient AWS or network errors with backoff when the error is marked retryable. Keep concurrency bounded across scheduled scans.

Example​

A release workflow can describe the checkout service and record the current task counts and rollout state alongside the release record.

{
"operation": "describe_services",
"region": "us-west-2",
"cluster": "commerce-prod",
"services": ["checkout"]
}

A result can contain the following service and deployment snapshot.

{
"status": "success",
"operation": "describe_services",
"region": "us-west-2",
"cluster": "commerce-prod",
"services": [
{
"serviceName": "checkout",
"serviceArn": "arn:aws:ecs:us-west-2:111122223333:service/commerce-prod/checkout",
"status": "ACTIVE",
"desiredCount": 4,
"runningCount": 3,
"pendingCount": 1,
"deployments": [
{
"status": "PRIMARY",
"rolloutState": "IN_PROGRESS",
"taskDefinition": "arn:aws:ecs:us-west-2:111122223333:task-definition/checkout:42"
}
]
}
],
"failures": []
}

Use serviceArn to correlate records. In this example, the primary rollout is still in progress. A workflow could wait for another sample within a bounded window and route a persistent mismatch to the service owner.

Notes​

  • Keep the connection, region, cluster, and page size fixed when following a list token. AWS may return fewer ARNs than requested. Follow hasMore to determine whether to continue.
  • ECS API throttling applies per account and region. Pace polling and batches across workflows that share the same connection. Amazon ECS API throttling
  • Both operations are read-only and can be repeated safely. Results can change as services and deployments change. Service creation, scaling, updates, and deletion are outside the connector's scope.