https://prefect.io logo
Title
n

Nathan Evans

07/13/2021, 5:56 PM
trying to run an ecs agent, getting
AuthorizationError: No agent API token provided
my task definition has a PREFECT__CLOUD__API_KEY, and its set to a service account api key. any ideas?
k

Kevin Kho

07/13/2021, 5:59 PM
Hi @Nathan Evans, are you using Server or Cloud?
n

Nathan Evans

07/13/2021, 6:00 PM
cloud, sorry did i post this in the wrong place?
k

Kevin Kho

07/13/2021, 6:02 PM
Yes but no worries! Iā€™m just asking because the answer can change depending on that. I think you can do this:
prefect agent ecs start -t <token>
and that should work.
šŸ™Œ 1
n

Nathan Evans

07/13/2021, 6:06 PM
that seems to work, thank you so much @Kevin Kho
šŸ‘ 1
is there any way to supply it as an environment variable? it'd be nice to hydrate it via aws secret manager
z

Zanie

07/13/2021, 6:07 PM
This looks like the 0.15.0 error resolved in 0.15.1 https://github.com/PrefectHQ/prefect/pull/4751
:upvote: 1
n

Nathan Evans

07/13/2021, 6:08 PM
ah, im using a pretty old version of prefect prefecthq/prefect:0.14.13-python3.8
will update, thanks folks
z

Zanie

07/13/2021, 6:08 PM
Ah yeah API_KEY isn't supported in 0.14.x, you can use your API key as
PREFECT__CLOUD__AUTH_TOKEN
though and it'll work in 0.14.x