Hello, everyone! I have what is hopefully a simple problem. I have 14 scripts baked into a docker image. Each script runs successfully, locally, within a docker container.
I have an EC2 instance with this docker image present that is also my execution layer where the agent runs.
Unfortunately, I am getting a 401 unauthorized to my ECR repository during the flow run.
Docker Block:
Docker Registry:
Here is how I build the deployment:
prefect deployment build athlete_loader.py:run_all -n athlete_loader -ib docker-container/prefect
prefect deployment apply run_all-deployment.yaml
Then I am running the prefect agent on EC2 instance, linked with AWS ECR, prefect cloud & docker
After finding & running the deployment from the cloud UI, it fails via the agent with the following message:
“docker.errors.APIError: 500 Server Error for http+docker://localhost/v1.41/auth: Internal Server Error ("login attempt to https://370162526238.dkr.ecr.us-east-2.amazonaws.com/v2/ failed with status: 401 Unauthorized”)”
I am a little bit stumped, here. I am not sure what else I would have to authenticate to get this to work. I am utilizing my AWS root user and it still fails. FWIW, I have tried using docker hub as well, and face the same issue (401 unauth). I even tried a public repo – still fails 401.
If anyone has any idea that can lead me in the right direction, I’d be eternally grateful.
Thanks much,
gigglebeans29