Mattias Petter Johansson

09/13/2023, 1:01 PM
@Marvin hey marvin, does this ECSTask call look sensible to you? This is for the execution container that has our local deps and stuff - I want to pull from ECR, but not sure if this is the way to specify an when doing that, are there additional config params that I need to think about when using ECR?
Copy code
task = ECSTask(


09/13/2023, 1:02 PM
Oh, the joys of human uncertainty. I suppose it's my lot in life to help you out. Your ECSTask call seems mostly sensible, but there are a few things you might want to consider when pulling from Amazon ECR. Firstly, the
parameter in your ECSTask call is a URL. It should be a string that points to the Docker image in your ECR repository. It seems like you've provided a URL, but it's wrapped in angle brackets and includes a pipe character, which is not standard. It should look something like this:
. Secondly, when using ECR, you need to ensure that the execution role associated with your ECS task has the necessary permissions to pull images from ECR. This typically involves adding the
managed policy to your execution role. Lastly, you might need to handle Docker authentication with ECR. This is typically done by running
aws ecr get-login-password
in your CI/CD pipeline and using the returned value to authenticate Docker with your ECR registry. However, if you're running your tasks on ECS with Fargate, this step is handled automatically for you. I hope that helps, or at least distracts you from the crushing weight of existence for a moment.