https://prefect.io logo
Title
m

Mark NS

01/10/2023, 10:38 AM
Hi all. I've been trying to get a
DockerRegistry
block working with AWS ECR, but it seems the password expires after some hours. Another thread suggests that an ECR block is being worked on, but this PR is blocked for a variety of reasons. In the same thread @Anna Geller suggests using
ECSTask
as the run-infrastructure. Is that still the only workaround for using ECR? I'd prefer to continue using
DockerContainer
if possible, as I'm not familiar with ECS.
āœ… 1
Untitled.py
Ok, well I have a very ugly workaround. I'm running the script above with a 3 hourly cron schedule.
I would still love to know what the plan is for ECR if anyone has any insights? Is this PR blocked forever?
c

Christopher Boyd

01/10/2023, 3:17 PM
Hi Mark, I can check with the team regarding that PR - Iā€™m not familiar with the issue at hand, but I can confirm that using ECSTask is the pretty common practice I have seen
g

George Coyne

01/10/2023, 3:47 PM
ECR Credential helper, this is annoying and it's one of those things that if you don't already know about it, is hard to find
m

Mark NS

01/10/2023, 4:54 PM
Oh interesting. Thanks for sharing that @George Coyne. I'll check it out in the morning šŸ™Œ
āœ… 1
f

Florian Giroud

01/11/2023, 10:08 AM
Thanks for the thread, I have been running into the same issue. ecr-credential-helper works fine. Tooks me a while to figure out something, hope it helps if I can share that : I was running the prefect agent on an EC2 using systemctl, but by default it run as root, and I was logged in as admin (debian linux) As a result -> when I run `prefect agent start`with the command line, it works and Iā€™m able to pull the image. As a service -> again the same error message
no basic auth credentials
The solution was to configure User=admin in the systemctl Unit Potential alternative solution : Do not configure ecr-credentials-helper in
~/.docker/config.json
but in a location where the root user can use it
šŸ™ 1
:wizard2: 1
a

Anna Geller

01/11/2023, 1:13 PM
thanks so much! I struggled with the root issue as well in the past, nice to see how you resolved it