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 applications on a managed cluster of Amazon EC2 instances.

239 questions
8
votes
5 answers

AWS ECS service not starting any tasks

I've set up a cluster, container, task and service on ECS. After I created the service, it appears to be running with '3 desired tasks', however no tasks are being created as pending or running. Effectively it seems to be doing nothing. My task…
7
votes
2 answers

Is Fargate a good fit for independent containers that have low resource utilization?

I'm new to docker and ECS, so I might not use the right terms. Please let me know if I need to clarify. My Scenario: I have a number of independent containers. Each container represents a web site. Each container should run all the time, but might…
Felix
  • 173
  • 5
7
votes
1 answer

How to turn off access log for only a certain url in this nginx configuration?

This is a nginx configuration server { listen $PORT; location ~ ^/documents/(.*)$ { proxy_pass http://127.0.0.1:5000/$1; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header…
Anthony Kong
  • 3,288
  • 11
  • 57
  • 96
6
votes
4 answers

HealthCheck on ECS task without an ELB

We have a Docker container(Spring Boot) that runs in an ECS cluster. We run it without Elastic Load Balancing. We want to update the service without downtime, so when the new task is up and healthy, the old task stops. We have been trying to add a…
chris_fitz
  • 61
  • 1
  • 1
  • 3
6
votes
1 answer

AWS ECS: Unable to place task

I am trying to set up an AWS service with autoscaling. I have created a cluster with an application loadbalancer and created a task using a docker image that should be open on port 8080 for use. I have created a service based on that task for which…
5
votes
3 answers

Best way to log to two different CloudWatch log streams from an ECS container?

We are running our services on AWS's ECS platform, and we send our logs to AWS CloudWatch. We have two types of logs, any container can produce either type: the usual application logs (access, error, whatnot); these must be easily viewable by devs…
Bass
  • 601
  • 5
  • 8
5
votes
1 answer

What is the best way to run cronjob in AWS ECS?

I have a web app powered by Laravel that is set up on AWS ECS. I would need to run an artisan command as a cronjob. I'm looking at "Scheduled Tasks" in ECS Cluster configuration. I can launch new tasks following the "Scheduled Tasks (Cron)"…
Sivaji
  • 101
  • 1
  • 5
5
votes
1 answer

AWS ALB resolves to 2 IPs. What are they?

I have set up an AWS ALB for my application. The ALB is connected to AWS ECS cluster which has 2 instances. The 2 instances are in private subnets. When I resolve the IP of the ALB DNS name, I get 2 IPs. Those IPs can be used to access my…
Neron Joseph
  • 287
  • 1
  • 5
  • 10
5
votes
1 answer

ALB Connection Draining is always reaching the "Deregistration Delay"

I'm using ECS along with ALB to expose my containers to the internet. When I'm updating a container image (I'm using CloudFormation to update the tasks and services), the target group set the connections to the old containers to Draining. The issue…
5
votes
2 answers

HEALTHCHECK in ECS Container

I'm struggling setting up the correct HEALTHCHECK for a Container inside Task Definition in Amazon ECS. I've tried multiple solutions and can't get the simplest "always true" healthcheck to actually work. My Healthcheck looks like this: […
5
votes
3 answers

how to pull docker image on ECR using cloudformation template

I want to use docker image hosted on ECR and i want to automate the pull operation using cloudformation template. I attached IAM role with ECR full access to ec2 instance and it doesn't work. i am doing docker pull…
5
votes
1 answer

How to mount Amazon EFS as data volume in ECS task?

Userdata on launch configuration: #!/bin/bash echo ECS_CLUSTER=prodcluster >> /etc/ecs/ecs.config sudo yum install -y nfs-utils sudo mkdir /home/ec2-user/web_file_uploads sudo chmod 777 /home/ec2-user/web_file_uploads sudo mount -t nfs4 -o…
sithumc
  • 199
  • 1
  • 8
5
votes
1 answer

Autoscaling health checks fail in Amazon-provided ECS CloudFormation template.

I am attempting to stand up a new ECS cluster using the CloudFormation ECS Service template AWS provided here as a guide. My ECS instances boot within the AutoScaling group, but then fail a health check and are always terminated. The output…
5
votes
1 answer

ECS Stopped Task not Releasing Port

I have an ECS cluster with ELB. Last night I saw that a task was stuck in restarting loop. From the service Events log, it said: "service xxxxx was unable to place a task because no container instance met all of its requirements. The closest…
billyklh
  • 51
  • 2
5
votes
1 answer

Grace Period? - AWS EC2 Container Service and Elastic Load Balancers

When an elastic load balancer (ELB) is associated with an auto-scaling group, it is possible to specify a grace period during which new EC2 instances will not be terminated even if they are marked as unhealthy by the ELB. Is it possible to specify a…
1
2
3
15 16