Jordan Charlier

    Jordan Charlier

    3 weeks ago
    Hi, in Prefect 1.0, can I automate the aws ecr auth ? Thanks !
    Anna Geller

    Anna Geller

    3 weeks ago
    This is a bit painful in 1.0, indeed as we don't have any feature addressing that directly. You can check how Michael addressed that in 2.0 with pretty slick caching logic https://github.com/PrefectHQ/prefect-aws/blob/ecr-block/prefect_aws/ecr.py#L70-L73
    alternatively, you could have a cron script on the same EC2 instance that does aws ecr login every 12 hours to refresh the token
    Jordan Charlier

    Jordan Charlier

    3 weeks ago
    Thanks for your answer. Do i have to restart the agent ?
    Anna Geller

    Anna Geller

    3 weeks ago
    no, it should work without restarting afaik