Area: Deployment Issues
Sub-Area: Remote Executor Configuration (AWS ECS / Fargate)
Applies to: Cloud
Issue
You run a DataHub Cloud Remote Executor on AWS ECS/Fargate and see one or more of these problems:
- The container is running, but the executor does not show under your pool in Data Sources > Executors.
-
${SECRET_NAME}references in a recipe do not resolve from AWS Secrets Manager. - The container fails to start after you move to a newer executor image, because a custom task definition
commandcallsdockerize.
These problems come from the pool and mode environment variables, the AWS Secrets Manager settings and IAM policy, or a custom startup command written for an older image.
Error Messages
Executor container logs:
-
Starting datahub executor coordinator(on a container that should run as a remote executor) Timeout waiting for GMS at <url>Discovery: failed to sending status to GMS: <error>Discovery disabled: backend is not discovery-capable.Secret '<NAME>' not found in secret stores or environment, using empty stringSecret 'datahub-<NAME>' not found in AWS Secrets ManagerFailed to batch fetch secrets from AWS Secrets Manager: <error>
Ingestion run log:
Secret masking enabled: registered 0 secret(s)
You Might Be Asking
- Why doesn't my executor show in the Executors tab when the container is running?
- Should I use
DATAHUB_EXECUTOR_WORKER_IDorDATAHUB_EXECUTOR_POOL_ID? - Why aren't my AWS Secrets Manager secrets substituted into my recipe?
- Which IAM permissions does the executor need for AWS Secrets Manager?
- Which executor image version should I use with my DataHub Cloud version?
Solution
1. Set the pool ID and the executor mode
Use DATAHUB_EXECUTOR_POOL_ID on every deployment type (Docker, custom ECS, Kubernetes). DATAHUB_EXECUTOR_WORKER_ID is a legacy variable. The executor reads it only when DATAHUB_EXECUTOR_POOL_ID is not set. If you set both, DATAHUB_EXECUTOR_POOL_ID wins.
The value must match the Pool Identifier shown in Data Sources > Executors exactly, including case. The executor reports its status under this ID, and the Executors tab lists executors whose reported pool ID equals the pool's identifier. A mismatch means the executor does not appear under your pool.
Also set DATAHUB_EXECUTOR_MODE. If it is not set, the container starts as a coordinator, not a remote executor, and logs Starting datahub executor coordinator. Use worker for pools on the SQS channel, or kafka-worker for pools on the Kafka channel. The Channel column in Data Sources > Executors shows each pool's channel.
docker run -it \
--env DATAHUB_GMS_URL="https://<your-company>.acryl.io/gms" \
--env DATAHUB_GMS_TOKEN="<remote-executor-access-token>" \
--env DATAHUB_EXECUTOR_POOL_ID="<pool-identifier-exactly-as-in-ui>" \
--env DATAHUB_EXECUTOR_MODE=worker \
--name datahub-executor-worker \
<executor-image>:<version-tag>
ECS task definition environment block:
"environment": [
{ "name": "DATAHUB_GMS_URL", "value": "https://<your-company>.acryl.io/gms" },
{ "name": "DATAHUB_EXECUTOR_POOL_ID", "value": "<pool-identifier-exactly-as-in-ui>" },
{ "name": "DATAHUB_EXECUTOR_MODE", "value": "worker" }
]
Generate the token in Settings > Access Tokens > Generate new token > Remote Executor. The URL must end in /gms. See Configuring Remote Executor.
2. Check connectivity, the token, and registration
- At startup the executor waits for
<DATAHUB_GMS_URL>/health. If it gets no answer within 240 seconds, it logsTimeout waiting for GMS at <url>and exits. Run the same check from the executor's subnet:
curl -sS -o /dev/null -w "%{http_code}\n" \
https://<your-company>.acryl.io/gms/health
Expect 200.
- Check that DataHub accepts the token:
curl -sS -o /dev/null -w "%{http_code}\n" \
-H "Authorization: Bearer <DATAHUB_GMS_TOKEN>" \
-H "Content-Type: application/json" \
-d '{"query":"{ __typename }"}' \
https://<your-company>.acryl.io/api/graphql
Expect 200. A 401 means DataHub did not accept the token (missing, expired, or revoked). Generate a new Remote Executor token.
-
Read the executor container logs (in ECS, the task's CloudWatch log stream):
-
Starting datahub executor workermeans the container started as a remote executor. - The executor sends its status every 30 seconds (
DATAHUB_EXECUTOR_DISCOVERY_INTERVAL). Each time, it logs aDiscovery: sending status updateline. -
Discovery: failed to sending status to GMS: <error>means the status write failed. The text after the colon gives the cause. Check the URL and token as in steps 1 and 2. -
Discovery disabled: backend is not discovery-capable.means your DataHub Cloud instance did not report support for executor status. Contact DataHub Support.
-
-
In Data Sources > Executors, check the pool's status. A ready pool shows Provisioned. If it shows Provisioning queued or Provisioning... and stays there, or shows Provisioning failed and a retry does not fix it, contact DataHub Support.
3. Supply recipe secrets from AWS Secrets Manager
The executor resolves each ${NAME} in a recipe at run time. You can supply values in two ways, and both work for recipe secrets.
Option A: Runtime lookup in AWS Secrets Manager. The executor looks up ${NAME} as the secret named <prefix>NAME. It is off by default.
- Set these on the executor container:
DATAHUB_EXECUTOR_AWS_SM_ENABLED=true
DATAHUB_EXECUTOR_AWS_SM_REGION=<aws-region>
# Optional. Default is datahub-
DATAHUB_EXECUTOR_AWS_SM_PREFIX=datahub-
-
Name each secret
<prefix><NAME>. With the default prefix,${SNOWFLAKE_PASSWORD}resolves to the secretdatahub-SNOWFLAKE_PASSWORD. Variable names may use only letters, digits, and underscores. To use no prefix, setDATAHUB_EXECUTOR_AWS_SM_PREFIXto an empty string. -
Store each value as plain text, not as a key/value JSON pair. If a value is a JSON object, the run reports
Secret variable ${<NAME>} appears to contain a JSON document while string is expected. -
Attach this policy to the ECS task role (the role the container runs as, not the task execution role).
BatchGetSecretValuemust be granted on"*".ListSecretsis not needed.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowBatchGetSecretValueApi",
"Effect": "Allow",
"Action": "secretsmanager:BatchGetSecretValue",
"Resource": "*"
},
{
"Sid": "AllowPrefixedSecretsRead",
"Effect": "Allow",
"Action": "secretsmanager:GetSecretValue",
"Resource": "arn:aws:secretsmanager:<region>:<account-id>:secret:datahub-*"
}
]
}
If you use a custom prefix, change datahub-* to match it.
- Confirm the lookup in the executor container logs while a run starts. Executor v2.2.0-cloud and later log:
-
Resolving N secret(s) across M store(s): [...]. The list must include'aws-sm'. If it doesn't,DATAHUB_EXECUTOR_AWS_SM_ENABLEDis nottrueon the running task. -
Store 'aws-sm' resolved X/N secret(s)when AWS supplied values. -
Secret 'datahub-<NAME>' not found in AWS Secrets Managerwhen no secret has that exact name. Check the name and the prefix. -
Failed to batch fetch secrets from AWS Secrets Manager: <error>when the AWS call fails, for example because the IAM policy denies it. -
Secret '<NAME>' not found in secret stores or environment, using empty stringwhen no source had a value. The run continues with an empty string.
-
The line Secret masking enabled: registered N secret(s) is in the ingestion run log, not the executor startup log. It comes from log masking for that run. It does not show whether the AWS integration is on. Use the executor container log lines above instead.
Values are cached for 6 hours by default. Set DATAHUB_EXECUTOR_SECRET_CACHE_TTL (seconds, must be greater than 0) to change it. After you rotate a secret, the executor uses the new value once the cache entry expires. Restart the executor to pick it up at once.
Option B: Inject secrets into the container at deploy time. List the secret in the ECS task definition secrets block (or the CloudFormation SECRET_NAME=SECRET_ARN parameter). ECS sets it as an environment variable, and the executor resolves ${NAME} from the container's environment. The value only changes when you restart the task.
"secrets": [
{
"name": "SNOWFLAKE_PASSWORD",
"valueFrom": "arn:aws:secretsmanager:<region>:<account-id>:secret:<your-secret-name>"
}
]
Use this same block for DATAHUB_GMS_TOKEN, so the token is not stored in plain environment values.
If the same name has a value in more than one place, the executor uses the first match in this order: AWS Secrets Manager (Option A), DataHub UI Secrets, files mounted in /mnt/secrets, then container environment variables (Option B).
4. Remove dockerize from custom startup commands
Executor images from v1.1.0-cloud on use a Wolfi base. They do not include dockerize or apt-get. The image's own start script waits for <DATAHUB_GMS_URL>/health before it starts. If your task definition overrides command or entryPoint with a call to dockerize, the container fails at startup. Remove the override and use the image's default command.
You don't need an executor tag that matches your DataHub Cloud version exactly. The release notes for each DataHub Cloud version list the Remote Executor versions it supports. Pick one from that list. For example, the DataHub Cloud v2.2.0 release notes list v2.2.0-cloud and several v2.1.x-cloud executors.
5. Terraform deployments
The Terraform tab in Configuring Remote Executor uses the public remote-ingestion-executor module. It builds the same ECS/Fargate deployment as the CloudFormation template. Set the pool through datahub.executor_pool_id. Set create_task_exec_iam_role = true, because the module defaults it to false and the task does not launch without that role. Put each secret you inject in secrets, and put its ARN in task_exec_secret_arns so the task execution role can read it.
module "remote_executor" {
source = "git::https://github.com/acryldata/datahub-terraform-modules.git//remote-ingestion-executor?ref=v2.1.0"
cluster_name = "datahub-remote-executor"
datahub = {
url = "https://<your-company>.acryl.io/gms"
executor_pool_id = "<pool-identifier-exactly-as-in-ui>"
}
create_task_exec_iam_role = true
task_exec_secret_arns = [
aws_secretsmanager_secret.datahub_pat.arn,
aws_secretsmanager_secret.snowflake_password.arn,
]
secrets = [
{ name = "DATAHUB_GMS_TOKEN", valueFrom = aws_secretsmanager_secret.datahub_pat.arn },
{ name = "SNOWFLAKE_PASSWORD", valueFrom = aws_secretsmanager_secret.snowflake_password.arn },
]
subnet_ids = ["subnet-XXXXXXXX"]
assign_public_ip = false
}
Module tags (v2.1.0) and executor image tags (v2.1.0-cloud) are versioned separately. Set the image with datahub.image_tag.