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.

Filter by
Sorted by
Tagged with
0 votes
1 answer
4k views

Different stdout with supervisord using docker vs docker-compose

I have a service running inside docker using nginx and php-fpm. I have been beating my head against the wall to get all of the logs to redirect to stdout. The approach that I took was to use ...
1 vote
1 answer
78 views

NAT gateway costs on AWS

I have a django app on AWS using ECS Fargate behind a VPC. A NAT gateway is required with this setup, but most of the costs are from the NAT gateway. How I can reduce this? My docker image is 600 MB. ...
1 vote
1 answer
179 views

Migrate AWS ECS cluster IPV4 to IPV6

I'm trying to avoid this new cost (public IPv4) in aws for small projects because it will represent a big percentage of the cost. In my ECS cluster, I use EC2 instances as capacity providers, ...
4 votes
1 answer
4k views

Unable to start task in ecs. Tasks are in PENDING state

My tasks are in PENDING status That's what I can see in the events There is not many information in the service events. Here is the task definition in json { "requiresAttributes": [ { ...
0 votes
1 answer
4k views

ALB & Target group timeouts with unhealthy status on dynamic port

I launched a beanstalk multi container instance and its working fine. I then tried to setup dynamic port mapping and set the host port to 0. I allowed port range 32768 - 60999 for ec2 instance ...
1 vote
2 answers
907 views

terraform: Configuring load-balancer to use dynamic port of ECS task/service in AWS

This is sort-of a general question for how dynamic port assignments are supposed to work, though my specific context is trying to figure-out if there is a natural way for a target-group to know the ...
0 votes
1 answer
39 views

No SSH access to EC2 instance launched by ASG, while I can access an otherwise identical instance

I'm trying to SSH to an EC2 instance that's part of an ASG associated with an ECS service. To help narrow down the problem, I created new instance from the same launch template. I've carefully ...
0 votes
0 answers
84 views

FROM php:7.4-fpm-alpine app.dockerfile results in fastcgi error when adding sh file to run as an entrypoint

I am using AWS ECS Faragate to generate and deploy docker containers into tasks. I'm using the docker image FROM php:7.4-fpm-alpine for my app container. I have been working on a workaround for cron ...
1 vote
1 answer
178 views

Can't get nginx resolver to work

I'm facing issue with nginx when a container in network change his IP , i can access it in Linux OS But nginx didnt resolve the new IP... I searched alot about a solution and i see that nginx tell us ...
0 votes
1 answer
442 views

Amazon ECS container showing strange CPU usage after deployment

I'll preface this by saying I'm fairly new to working with AWS. Yesterday I deployed a new version of one of our services to our test environment. Most people are on holidays at the moment, so there ...
0 votes
0 answers
32 views

AWS: access private API from public web application

I have: Private API running on an ECS cluster behind an internal load balancer. This API is used by other services inside the VPC. A public Next.js web application. What I need: Give private API ...
1 vote
0 answers
60 views

AWS Batch on Fargate is not allocating the correct number of vCPUs

I have a web application offloading some resource-intensive tasks to AWS Batch, backed by Fargate. It's a very simple setup - a single queue, a single job definition, and a single compute environment. ...
2 votes
1 answer
85 views

What are the differences between the migration options for Elastic Beanstalk Multi-container Docker environments to AL2?

We're running an Elastic Beanstalk Multi-container Docker environment on Amazon Linux 1, which has been deprecated and needs to be migrated to Amazon Linux 2. The documentation presents two options ...
0 votes
0 answers
116 views

How to Put SSL In Front of ECS Fargate Container

What is the best way to put an SSL cert in front an ECS Fargate Container? I have letsencrypt certs that are being updated every 90 days and uploaded to the SecretsManager and the Certificate Manager. ...
5 votes
3 answers
550 views

How to choose between Elastic Container Service (ECS) or Elastic Container Registry (ECR), Elastic Beanstalk, and Lambda?

Background: I've worked with EC2 and RDS. Recently I received a query from a client in which he wants to develop both mobile and web applications using Amazon Web Services, and need advice on which ...
-4 votes
1 answer
223 views

Why run multiple containers of the same docker image in single EC2 instance

I am new to docker and my question is based on the following Reddit thread: https://www.reddit.com/r/docker/comments/p7d12j/why_run_multiple_docker_instances_of_1_image_in/ Some comments in the thread ...
7 votes
1 answer
5k views

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 ...
1 vote
0 answers
551 views

ECS deployment gets stuck on In progress

So I created this ecs cluster with ec2 a few months ago and it worked for a while,I made some changes a long the way and it stopped working. The service wasnt ready for production so I didnt mind. But ...
0 votes
0 answers
85 views

RDS is not connecting with ECS Fargate through secret manager

I am facing an issue with my Laravel application deployment on AWS ECS. The deployment process involves Jenkins, AWS ECR, and ECS. The new task is created, but there's an "Access Denied" ...
0 votes
0 answers
142 views

Issue with Laravel ECS Deployment: Access denied for user 'forge'@'10.0.20.124'

I am facing an issue with my Laravel application deployment on AWS ECS. The deployment process involves Jenkins, AWS ECR, and ECS. The new task is created, but there's an "Access Denied" ...
4 votes
2 answers
5k views

Do I need an internal Load Balancer for my ECS Services?

I have an ECS cluster with 3 services(FARGATE), the 3 services are in private subnets. 1 is the web app that is publicly accessible through an Internet-facing Load Balancer and the 2 others are only ...
2 votes
1 answer
5k views

How to reference container hostname or ip from another container in the same ECS task in cloud formation

I'm trying to setup an AWS ECS cluster which has a single task that has 3 separate containers for prometheus, promscale, and prometheus-ecs-discovery. I'm trying to figure out how to dynamically set ...
0 votes
0 answers
308 views

Understanding CPU Utilisation Graph for a task running AWS Fargate

I have a task defined with 0.5vCPU. It has two containers with 0.25vCPU Can someone explain to me what the below CPU Utilization graph represents? The above graph is from Health and Metrics section ...
1 vote
0 answers
158 views

Unable to push metrics to Datadog ECS service from other services in the same ECS cluster

I have some services (say alpha, bravo and charlie, all of which are Spring boot) running in my ECS cluster as separate services. I also have deployed a service that runs Datadog agent, named dd-agent ...
0 votes
0 answers
106 views

How to use separated load balancers for frontend and backend in ECS?

I have the following terraform configuration for a load balancer running in ECS AWS for my django app container deployed in ECS: resource "aws_lb" "api" { name = &...
3 votes
1 answer
4k views

How to restart a single container in AWS ECS Task Definition

In my AWS ECS Cluster, there is one service running two tasks. Each Task has 5 containers. Two of them are not essential. Among these two, one of the containers fails some times, but I am not sure how ...
0 votes
1 answer
146 views

AWS ALB Healthchecks Against ECS Services Periodically Failure For No Discernable Reason

We completely host a constellation of services in AWS (no external dependencies as far as these services go). We periodically receive healthcheck failures (502 as public services try to contact the ...
0 votes
0 answers
43 views

Kubernets: what exactly needs to be installed on each server/node and how?

I have coded AWS instances that can serve as nodes where my containers will run. So by default each of these instances have docker installed. This part is working fine. Eventually i would like to ...
1 vote
1 answer
189 views

WireGuard default route in AWS ECS container

I have a container inside an AWS ECS instance. I want to establish a connection to a WireGuard server from that container. The connection itself works but I have issues with routing all the traffic ...
0 votes
0 answers
83 views

ECS: downtime due to unhealthy containers killed before replacement

I have an ECS cluster configured with ELB healthchecks and autoscaling policy on average CPU. When there is a spike in traffic, some containers stop responding to ELB healthchecks and are marked as ...
2 votes
0 answers
636 views

Why can't my ECS Fargate cluster write to my mounted EFS volume, all deployed with Terraform?

I've got a Terraform deployment that deploys a Docker image into ECS Fargate. It attaches an EFS volume to the container. When I SSH into the container, I see the volume mounted, but I am unable to ...
0 votes
1 answer
769 views

Run containers using EC2 reserved instance in fargate ECS

We use AWS fargate with containers. To reduce price we are looking for options. So question how to use AWS EC2 reserved instances with fargate? As I understand steps look like this: purchase reserved ...
0 votes
0 answers
662 views

Getting 504 response timeouts via AWS ALB, but not directly

Our production environment contains 2 ALBs: a public facing ALB and a private one. Both of these ALBs support HTTP/2. Now I have a target group which supports HTTP/1.1 containing an ECS service. The ...
4 votes
3 answers
8k views

How to add a domain name to an ECS container (EC2/ECS Service) without a load balancer?

I'm searching for a way to add a domain name to an ECS service (EC2 not Fargate). To be clear I'm looking for a solution which DNS resolves a domain name A or AAAA name (possibly CNAME if it and ...
0 votes
0 answers
887 views

AWS ECS: Networking between container Nginx and PHP-FPM on the same host

So I have spent the past two weeks learning about ECS and trying to setup a very basic task with an nginx container and and a PHP app in another container. It seems like I'm very close, but I'm now ...
1 vote
2 answers
2k views

How to make my ECS Task pull my ECR image

I am trying to create a ECS task and be able to access and pull from ECR, but I am getting an error. How can I resolve this issue? Raw error: Cannotpullcontainererror: pull image manifest has been ...
0 votes
1 answer
115 views

How can I create an ecs service for my deploy

I’m learning CI/CD pipelines and I’ve come up with a question. I have a CloudFormation file that creates some static resources for my app (ECR repository, ECS Cluster and some roles) When creating my ...
0 votes
1 answer
2k views

502 bad gateway - aws application load balancer, ecs

I'm having a simple app that I've been experimenting with to learn aws. I first created a http version of a docker image pushed to ecr, ecs using it to create services, and tasks, application load ...
0 votes
1 answer
298 views

Will aws elb address change over time?

I have created a load balancer pointing at my api instances. I got an automatically generated url which looks something like this: xxx-xx-xxxxxxxxxx.us-east-2.elb.amazonaws.com I want to connect it to ...
1 vote
1 answer
2k views

How to pass arguments into scheduled task on AWS Fargate?

I have a docker container (derived from PHP-CLI) that may be launched like this locally: docker run php-cli-container php public/index.php argument1 argument2 I uploaded the container to Amazon AWS ...
0 votes
1 answer
253 views

Force ECS to wait for previous container to have exited before deploying new task version

I have a couple of ECS services that cannot under any circumstances run two instances of a container (embedded elasticsearch, mysql). Is there any way to force ECS to wait until the container has ...
0 votes
0 answers
411 views

What defines the AWS ECS task re-creation timeout

I have an AWS ECS Service with 2 REPLICA tasks in it. When I manually stop one of the tasks, the new one is created in almost exactly 5 minutes. Similar 5 minute timeout happens when one or more tasks ...
9 votes
5 answers
21k views

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. ...
0 votes
1 answer
367 views

Redis on AWS task

I have an API that have some heavy processing endpoints. To avoid problems, I created a queue system using redis. Now I put this API into a docker, and I'm using ECS to deploy service that creates a ...
1 vote
2 answers
3k views

Amazon ECS [Fargate] - How do you restart all Tasks in a Service?

We have a task that loads some configuration from database. After the settings are updated on db we would like to be able to restart all the tasks in a service so that the settings propagate to all ...
41 votes
11 answers
78k views

How do you restart all Tasks of a Service?

We have a task that loads some configuration files from an external data source. After the settings are uploaded we would like to be able to restart all the tasks in a service so that the settings ...
1 vote
0 answers
169 views

which ECS task network mode?

I have an Application Load Balancer in a private subnet (used by API Gateway) that targets an ECS task. I want that task to only be accessible from inside the VPC, not from the internet, but I do have ...
0 votes
1 answer
2k views

ECS containers on EC2 cannot mount EFS volumes

I have created an ECS cluster backed by an EC2 auto-scaling group and launched a service in it that uses EFS for NFS storage. The service is running in awsvpc network mode so that I'm able to control ...
0 votes
2 answers
2k views

Network Load Balancer to Fargate/ECS Cluster - how to map multiple ports/target groups to one service?

Here is my setup: Route53 Alias Record -> Network Load Balancer -> Fargate/ECS Cluster The containers in the cluster have their own TLS certificates and have ports 80 and 443 open. The http server ...
1 vote
1 answer
4k views

(ServiceNotFoundException) when calling the UpdateService operation through CircleCI

As stated, running this through the aws-ecs orb for circleci. Error An error occurred (ServiceNotFoundException) when calling the UpdateService operation: I've already looked at https://discuss....

1
2 3 4 5