Thread
#prefect-community
    Seonghwan Hong

    Seonghwan Hong

    1 year ago
    I use aws ecr for prefect docker storage. I log in to ECR periodically with the following command "`aws ecr get-login-password --region yourregion | docker login --username AWS --password-stdin yourregistryid.dkr.ecr.yourregion.amazonaws.com`" because the ECR token is expired after 12 hours. But In prefect agent, docker client is not updated when the token is expired. So every 12 hours, I have got 404 error and have to restart my agent.
    CA Lee

    CA Lee

    1 year ago
    Hello, how are you running your Prefect ECS agent? You should provide your agent with access to ECR using IAM, and specify that in a task-definitions.yaml file (you can also specify a local file path). Agent:
    prefect agent ecs start -t token \
    	-l label
    	--cluster cluster_arn \
    	--task-definition <s3://bucket/task-definition.yaml>
    task-definition:
    cpu: 1 vCPU
    memory: 2 GB
    networkMode: awsvpc
    taskRoleArn: arn:aws:iam::.../ECS-Task-S3-ECR-Full-Access
    executionRoleArn: arn:aws:iam::.../ECS-Task-ECS-Full-Access
    Seonghwan Hong

    Seonghwan Hong

    1 year ago
    Hello. I use
    docker
    agent..