# ask-community

Armando Belardo

06/22/2023, 1:09 AM
Hi there, is there a way to pass in the
field to a task definition spun up in ECS by a code location deployment? I'm basically following: But don't see an option to pass in the secret arn for the task definition to be able to pull the corresponding container it needs, so my deploys keep failing Thank you!
So getting this error, which makes sense since the task definition is trying to pull from a GitHub container registry and so needs the
field in it's
Copy code
dagster_cloud.workspace.ecs.client.EcsServiceError: ECS service failed because task arn:aws:ecs:us-east-2:ID:task/TD failed: CannotPullContainerError: pull image manifest has been retried 1 time(s): failed to resolve ref <|>: failed to authorize: failed to fetch anonymous token: unexpected status: 401 Unauthorized

No task logs.

For more information about the failure, check the ECS console for logs for task arn:aws:ecs:us-east-2:ID:task/TD in cluster clustername.

  File "/dagster-cloud/dagster_cloud/workspace/user_code_launcher/", line 1342, in _reconcile
  File "/dagster-cloud/dagster_cloud/workspace/ecs/", line 446, in _wait_for_new_server_ready
    task_arn = self.client.wait_for_new_service(
  File "/dagster-cloud/dagster_cloud/workspace/ecs/", line 441, in wait_for_new_service
    return self.check_service_has_running_task(
  File "/dagster-cloud/dagster_cloud/workspace/ecs/", line 557, in check_service_has_running_task
    self._raise_failed_task(task, container_name, logger)
  File "/dagster-cloud/dagster_cloud/workspace/ecs/", line 476, in _raise_failed_task
    raise EcsServiceError(
I looked at the code and it didn't actually look like this was exposed, so wrote up some PRs to add expose it I'm not sure how to test them, but they're simple enough if someone wanted to replicate them!