Area: Deployment Issues
Sub-Area: Remote Executor / AWS ECS Setup
Applies to: Cloud
Issue
You deploy a DataHub Remote Executor on AWS ECS with the DataHub CloudFormation template. Two failures can show up, one after the other.
First, the ECS task stops right away with a CannotPullContainerError and a 403 Forbidden from ECR. The executor image lives in a private DataHub Cloud ECR registry, and your AWS account doesn't have pull access yet.
Second, after the image pulls and the stack deploys, the executor still gets no work. Its logs show a GraphQL validation error on previousChannel. This happens when the executor image is newer than your DataHub Cloud version. The template uses the latest executor version unless you set one.
Error Messages
CannotPullContainerError: ... datahub-executor:<image-tag> ... 403 ForbiddenGraphError: Error executing graphql query: [{'message': "Validation error (FieldUndefined@[listExecutorConfigs/executorConfigs/previousChannel]) : Field 'previousChannel' in type 'ExecutorConfigs' is undefined", ...}]
You Might Be Asking
- Why does my ECS task get a 403 Forbidden error when it pulls the DataHub executor image from ECR?
- My CloudFormation stack deployed, but my executor pool gets no work. What went wrong?
- Which executor image tag should I use?
- Why do my executor logs show a
FieldUndefinederror onpreviousChannel?
Solution
Part 1: Get ECR pull access for your AWS account
DataHub Cloud has to grant your AWS account access to the private ECR registry before ECS can pull the Remote Executor image. See Deploy on Amazon ECS.
- Find your AWS account ID:
aws sts get-caller-identity --query Account --output text
- Send the account ID to your DataHub Cloud representative or to DataHub Support. You can share it through a secure secret-sharing service such as One Time Secret.
- After DataHub confirms that access is in place, restart the failed ECS task or deploy the stack again.
Part 2: Match the executor image to your DataHub Cloud version
The executor asks DataHub for its pool configuration through the listExecutorConfigs GraphQL query. Newer executor images request the previousChannel field. DataHub Cloud v1.1.3 doesn't have that field, and v2.0.0 has it. When the server rejects the query, the executor can't load its pool configuration, so it never picks up work. It keeps retrying and logs the error above.
- Find your DataHub Cloud version. In the left navigation bar, open the Resources menu (the question mark icon). The version is the last item in the menu.
- Set the template's
ImageTagparameter to the executor image for that version. Executor image tags look likev2.4.2-cloud. - To change the tag on a stack you already deployed, follow the CloudFormation update steps:
- In the AWS CloudFormation console, select your Remote Executor stack and click Update.
- Choose Replace current template, then Upload a template file, and upload the latest CloudFormation template.
- Change
ImageTag. Parameters you don't change keep their previous values. Click Next. - Acknowledge the IAM capabilities when prompted, then click Update stack.
- When the update finishes, go to Data Sources > Executors in DataHub and check that your executor reports status in its pool.
Part 3: Assign ingestion sources to the pool
In DataHub, go to Data Sources. Create or edit a source. On the Connection Details page, expand Advanced Settings and pick your Executor Pool. See Assigning Ingestion Sources to an Executor Pool.
You can also deploy a recipe to a pool with the CLI. --name is required unless your recipe has a deployment block with a name:
datahub ingest deploy \
--name "<source-name>" \
--executor-id <your-pool-id> \
-c <path-to-your-recipe.yaml>
ingest deploy replaces the source's whole configuration. If you update an existing source and leave out an option such as --schedule, the CLI removes that setting. See ingest deploy.
Additional Notes
- ECR access is granted per AWS account ID. Each AWS account that pulls the executor image needs its own access.
- Use the executor image that matches your DataHub Cloud version. An executor image newer than your DataHub Cloud version fails with the
previousChannelvalidation error. - The
ExecutorPoolIdstack parameter must match the Pool Identifier of a pool you created under Data Sources > Executors.remoteis only the example name in the docs. You can use any pool name.
Related Documentation
- Configuring Remote Executor
- Deploy on Amazon ECS
- Assigning Ingestion Sources to an Executor Pool
- DataHub CLI: ingest deploy
Tags: remote-executor, ecs, ecr, aws, cloudformation, 403-forbidden, image-version-mismatch, graphql-validation-error, executor-pool, ingestion