Hi all, I am trying to establish a long running ag...
# ask-community
r
Hi all, I am trying to establish a long running agent as a service in ECS as described here: https://docs.prefect.io/orchestration/agents/ecs.html#running-ecs-agent-in-production. But struggling to authenticate my agent. Details in thread
My agent fails to start with the error:
prefect.utilities.exceptions.AuthorizationError: No agent API token provided.
This is suprising me as I have set service API key in the task definition (with the actual key):
Copy code
"environment":
    {
        "name": "PREFECT__CLOUD__API_KEY",
        "value": "<your-key>"
    },
As a work around I tried providing the key as an argument to the container cmd:
"command": ["prefect", "agent", "ecs", "start", "--key", "<your-key>"]
But I am running into
Copy code
Usage: prefect agent ecs start [OPTIONS]
Try 'prefect agent ecs start -h' for help.
Error: no such option: --key
k
@Marvin open “Docs on ECS Agent as a Service use --key on Prefect 0.14.13”
k
Hey @Robin Norgren, key was added in 0.15.0 so can you try bumping your image up?
r
@Kevin Kho, thank you so much! That was it.