Hello
I'm trying to use Docker Registry block to authenticate with a Amazon ECR instance, but the credentials AWS provides only last 12 hours. Has anyone solved this? How do I get a Docker Registry block to work with ECR permanently?
m
Mitch
07/28/2023, 6:08 PM
ANy update on this? I need to do the same
Mitch
08/16/2023, 4:01 PM
Hey @Mike Safruk - did you figure out how to do this in a prefect.yaml to get aws creds, then ecr creds so it can access the image?
m
Mike Safruk
08/16/2023, 8:19 PM
Hey, I couldn't figure out how to do it with Prefect Blocks. I ended up using a IAM user with ECR access with permanent credentials so it wouldn't expire. I use Ubuntu Docker hosts to run my flow code, so I put those credentials in the ~/.aws/credentials files and used https://github.com/awslabs/amazon-ecr-credential-helper so it doesn't have to authenticate to the ECR in Docker first with the command anymore. Then when Prefect runs a flow on my Ubuntu hosts, it is set to pull the docker image down automatically and it works because of the way I set it up above. Hope that helps.
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.