Questions tagged [amazon-ecs]

Amazon Elastic Container Service (ECS) is a highly scalable, high performance container management service that supports Docker containers and allows you to easily run distributed applications on a managed cluster of Amazon EC2 instances.

Amazon ECS eliminates the need for you to install, operate, and scale your own cluster management infrastructure. With simple API calls, you can launch and stop container-enabled applications, query the complete state of your cluster, and access many familiar features like security groups, Elastic Load Balancing, EBS volumes, and IAM roles. You can use Amazon ECS to schedule the placement of containers across your cluster based on your resource needs and availability requirements. You can also integrate your own scheduler or third-party schedulers to meet business or application specific requirements.

There is no additional charge for Amazon EC2 Container Service. You pay for AWS resources (e.g. EC2 instances or EBS volumes) you create to store and run your application.

Infrastructure Integration

Amazon EC2 can facilitate the dynamic spin up of server clusters while Kubernetes can be used as the container orchestration management layer which works well since these two tooling stacks are largely orthogonal.

Benefits

  • Cluster Management Made Easy
  • Flexible Scheduling
  • Performance at Scale
  • Security
  • Extensible

For more details click here

5065 questions
17
votes
2 answers

ECS "InternalError: failed to normalize image reference"

We have a docker images being stored in ECR, some have come from a TC build agent and some have come from builds on local developer machines. All images can be pulled an run locally but when trying to start the images built on the build TC build…
Dan Gardner
  • 1,069
  • 2
  • 13
  • 29
17
votes
3 answers

How to run docker task with Amazon ECS - getting error `STOPPED (CannotStartContainerError: Error response from dae)`

My goal is to execute a benchmark deployed as a docker image. While doing so, I had too many issues, so I decided to first make something extremely trivial work. So I decided to follow the guide in…
Petr Kozelka
  • 7,670
  • 2
  • 29
  • 44
17
votes
1 answer

ECR lifecycle policy exception

In our ECR, we are pushing many images everyday with tag 16_XXXX. Some of the pushed images are not stable version of the application. When there is a stable version, we are retagging the image with tag 16.XXXX. We have set up a lifecycle policy to…
17
votes
1 answer

Install Gitlab runner on ECS Cluster

We are running AWS ECS/ECR with Gitlab CI as CI/CD. Due to load increase we are searching for the best way to autoscale the runner on AWS. I know Gitlab supports Autoscaling for its ci-runner.…
aerioeus
  • 1,348
  • 1
  • 16
  • 41
16
votes
2 answers

How to manage database migrations for a RDS database shared between multiple instances?

I am aware of some potential solutions, but they all feel awful to me. In pipeline (github actions), run a one-off task on fargate to migrate DB before the deployments. Publish some kind of cloudformation event as a deploy hook and use it as a…
16
votes
2 answers

Can AWS Fargate be used without a load balancer?

Initially I expect traffic to my web application to be minimal and I do not want to bear the cost of a load balancer. But if my application gains traction then I may configure a load balancer later. Is it possible to use AWS Fargate without a load…
16
votes
5 answers

AWS ECS: Force redeployment on new latest image in ECR

I know that there are already countless questions in this direction, but unfortunately I was not able to find the right answer yet. If a post already exists, please just share the link here. I have several gitlab CI / CD pipelines. The first…
Stefan
  • 1,253
  • 2
  • 12
  • 36
16
votes
1 answer

How to monitor disk space/file system usage of ecs cluster using fargate

I have created 2 tasks using Fargate and one ECS cluster which is using these 2 tasks in 2 different services. So in short one cluster: 2 services and each services are linked to their own tasks which linked to ECR repo. As per AWS ECS Fargate task…
change198
  • 1,647
  • 3
  • 21
  • 60
16
votes
2 answers

Terraform AWS CloudWatch log group for ECS tasks/containers

I'm trying to create an AWS ECS task with Terraform which will put logs in a specific log group on CloudWatch. The problem is that container definition is in the JSON file and there is no way for me to map the CloudWatch group name from .tf file to…
16
votes
2 answers

aws-vpc containers do not have access to the internet

I created ECS service in AWS ECS cluster. My container uses the awsvpc network mode. The service has no load balancer. But it cannot touch any public internet resources. When I go to the ECS instance and ssh into docker container I cannot wget any…
Daniel Hornik
  • 1,957
  • 1
  • 14
  • 33
16
votes
2 answers

Not able to make AWS ECS services communicate over service discovery

I am trying to make 2 services communicate over service discovery endpoint in AWS ECS service. Example: Service1: runs the Task Definition to run nginx and phpfpm Service2: runs the Task Definition to run redis Now, I need to make service1…
16
votes
4 answers

Shutting down ExecutorService 'applicationTaskExecutor'

I have a Spring-boot application deployed in docker container within in AWS ECS cluster. My application stack is => Spring Boot -- JPA -- MySQL RDS Initially application is deployed and accessible through EC2 public IP. But after few minutes only…
ajoy sinha
  • 1,156
  • 4
  • 14
  • 30
16
votes
1 answer

boto3 lambda call to run ECS task requires hardcoding in a revision number?

Long story short, I don't want to have to hardcode in ECS task definition revision numbers for tasks into my lambda source codes. It's essentially toil updating my source code each time I have an updated task definition. In the boto3 documentation…
Yu Chen
  • 6,540
  • 6
  • 51
  • 86
16
votes
2 answers

AWS - ECS - How can I redeploy an updated Docker image on an existing ECS (with 1 EC2) instance?

First, I created in AWS a repo with a Docker image in it. Then I created a Task Definition and an ECS / EC2 cluster. Finally I created a service using the cluster and the Task definition. Works fine. How can I redeploy an updated Docker image on…
tm1701
  • 7,307
  • 17
  • 79
  • 168
16
votes
3 answers

AWS creation failed: Service already exists. (Service: AWSServiceDiscovery; Status Code: 400; Error Code: ServiceAlreadyExists; Request ID)

I am new to AWS and encountered some problem while trying to create a EC2 service in a ECS cluster. I was able to successfully create a brand new service (service1) in cluster1, but afterwards, I decided to delete cluster1 and create cluster2. The…
DJ_
  • 237
  • 1
  • 2
  • 8