Search code examples
amazon-web-servicesdockeramazon-ec2amazon-ecsdocker-image

Creating a ECS cluster in AWS, how does the "image url" work?



I am very new to working with AWS but am trying to set up a EC2 service, connected to a github action which deploys my python app to my service. I am currently creating a ECS cluster [as described by github][1]. During the creation of said cluster the setup asks me for an Image (`repository-url/image:tag`).
What does that mean exactly? I've been looking online for multiple hours but dont understand where I can find said image.
Filling in `12345.dkr.ecr.us-east-2.amazonaws.com/My-Repo:latest` returns a `CannotPullContainerError: inspect image has been retried 1 time(s): failed to resolve ref, not found`.
Could someone help me understand?

Edit: I am completely new to AWS so I apologise if any info is missing and can add whatever is needed to the post.

Solution

  • That would be the docker image (docker image repository and image tag) to deploy to your ECS service. You can't just make that up, it has to be a repository, and image that already exists. You should be creating a docker image that contains your Python app, and pushing that image to an image repository somewhere, such as AWS ECR. You need to be doing that before you look into deploying anything on AWS ECS.

    Also, you may be overcomplicating things a lot by using EC2 instead of Fargate.