Questions tagged [amazon-ecs]

Amazon EC2 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
0answers
15 views

Managed ECS scaling out despite capacity being available

I have an ECS cluster which is utilising managed scaling using the CapacityProviderReservation metric provided. My task definition is confused in to have No task mmemory or cpu reservation Memory ...
0
votes
0answers
37 views

AWS ECS cloudformation error CannotPullContainerError

I have created a cloudformation template with Ecs Cluster, Auto scaling group, Application load balancer and Target group. I have copied the Autoscaling group, launch template, role definition and ...
0
votes
0answers
10 views

AKS CI Failed: started a new tast on each push to Github, instead of replacing the running task

I wanted to rebuild the Docker image for an API service and run an instance in replace of the original task every time I push to the Github repo. Now I have two parallel tasks instead, and the public ...
1
vote
1answer
44 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 ...
1
vote
1answer
44 views

Swap space use for AWS ECS Cluster instances

I'm in the process of trying to optimise and consolidate our AWS instances. Part of this involves standardising (where possible) our instance classes, to make optimal use of reservations. We have a ...
0
votes
0answers
39 views

ECS-CLI: Getting “is used but no declaration was found in the volumes section” on Windows

I'm trying to run ecs-cli compose up on Windows 10 to run docker-jitsi in the cloud. Here is docker-compose.yml sample: https://github.com/jitsi/docker-jitsi-meet/blob/master/docker-compose.yml When ...
0
votes
1answer
37 views

AWS ECS CannotStartContainerError: Error response from daemon

I'm trying to start a task with a container with the following command: /bin/sh -c "export KAFKA_LISTENERS=\"PLAINTEXT://$$(hostname -i):9092\" && start-kafka.sh" But I'm getting this error ...
3
votes
1answer
31 views

How to send HTTP requests between AWS ECS services

Currently, I'm trying to figure out how to configure communication between ECS services. I'm planning to have the following setup: Backend service Fronted service One application load balancer I ...
0
votes
0answers
16 views

AWS ECS, service discovery, SRV record keeps updating

I do not understand the point of AWS implementation of service discovery in ECS when using bridge mode. Service discovery is about solving dynamically generated containers accessibility (in tasks). ...
0
votes
0answers
15 views

AWS ECS: Looking for guidance for architectural approach, container networking

I'm trying to to figure out the best approach to deploying a docker based application in ECS. I've attempted to sketch out the general topography below. And below is my docker compose file: ...
0
votes
0answers
15 views

CPU + Memory utilisation suddenly drop to 0 on AWS EC2

I have a ECS task running on an EC2 instance within a VPC, therefore my debugging options are limited. It runs on a single thread (& core) at 100% utilization, then suddenly everything drops (...
1
vote
1answer
115 views

ECS container not starting: error looking up volume plugin amazon-ecs-volume-plugin

I have a EC2 + EFS + ECS setup on which I run a few docker containers. My EC2 instance died, and a new one spun up, but when starting the tasks on the new instance, I get the following error message ...
0
votes
0answers
10 views

create a CloudWatch Alarm when an ECS service unable to consistently start tasks successfully

If I release a new Docker image with a bug to my ECS Service, then the service will attempt to start new Tasks but will keep the old version around if the new tasks fail to start. In that scenario, ...
0
votes
1answer
23 views

How set a fixed private IP for ECS containers?

I have a Task Definition called kafka-zookeeper, it has an Apache Kafka broker and a Zookeeper node in it. Those containers need to communicate with each other (that's easy) and with the kafka and ...
0
votes
1answer
144 views

Can't retrieve instance metadata on AWS Fargate tasks

I have a docker compose configuration that I'm deploying in an ECS Fargate cluster. The tasks are configured with assign_public_ip: ENABLED, and they seem to be getting a public IP, but I'm struggling ...
0
votes
1answer
18 views

Troubleshooting fargate autoscaling

I've set up an AWS Fargate cluster to run a service and autoscale its tasks based on the SQS queue. All great so far. The service has got a desired tasks of 1, but then it never actually launches the ...
1
vote
1answer
34 views

AWS: ECS/ALB setup, converting a docker-compose file, port mapping to mulitple containers

I know this is not an 'original question'. The general topic is covered extensively. Neverthless i'm struggling with my particular setup: I'm trying to basically convert the following docker-compose ...
5
votes
2answers
187 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 ...
0
votes
1answer
142 views

Does Amazon manage time synchronization on ECS/Fargate containers?

I'm trying to use NTP to synchronize local time in ECS containers using the ntpdate command, but it gives me this error: ntpdate[770]: Can't adjust the time of day: Operation not permitted ...
1
vote
1answer
78 views

Load balancing for Host network is not working when access within the instance

I have designed this infrastructure. ECS SG: Ingress: 0.0.0.0/0 Egress: 0.0.0.0/0 ECS Cluster ASG SG: Ingress: 0.0.0.0/0 Egress: 0.0.0.0/0 Now when I SSH to instance EC2 No 1. Sometimes I have ...
0
votes
0answers
26 views

How to get instance id from ECS

I want to connect my route 53 domain to ECS flask app, the app works perfect on the ip I get from ECS, the problem is that the instance id of the ec2 instance is not working. I need to connect route ...
0
votes
0answers
19 views

Connect domain name from route53 to ecs

I have a domain name bought and "owned" on route 53, I have a flask app that serves a simple html webpage, in the ip that I get from the ECS the app works perfect. The problem that I have is that I ...
1
vote
1answer
194 views

Flask app on ECS that pull images from s3 bucket

I have a flask app that I want to pull images to display from an s3 bucket. How do I implement the credentials parts? what I mean is: Do I use boto3 with aws credentials to pull the images from the ...
0
votes
1answer
71 views

Setting IgnoredUID for AWS for AppMesh Envoy Sidecar in ECS

I'm configuring an ECS Task Definition to use AWS AppMesh for virtual networking. I'm using Envoy, which AWS recommends running as a sidecar; they have native support for it using the ...
2
votes
2answers
662 views

Is reverse proxy still required between AWS ALB and application server?

Context Web application with application server, i.e. Ruby on Rails with puma. Running within a container on AWS ECS with Fargate. Traffic is routed by AWS Application Load Balancer directly to ...
1
vote
0answers
29 views

should I do task definition for nginx and nodejs seperate or together?

I want to up four nodejs containers and one nginx container on my ec2 with ecs. So I know that I need to create task definition for nodejs image, and service to run this task. In the service I set ...
0
votes
0answers
53 views

symfony 3.4 console command in docker env vars in crontab

I have a symfony 3.4 command to run with crontab in a aws ECS docker container. I've tried everything but seems that symfony is not reading env vars at all if runned in crontab. My crontab test is the ...
0
votes
0answers
41 views

AWS ECS Container user permissions do not match Docker behaviour

I've recently a big difference when running an application on AWS ECS vs docker or docker-compose; The application does not have permissions to write! The expectation is to have the same behaviour in ...
1
vote
3answers
303 views

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,...
1
vote
2answers
53 views

Create / Destroy EC2 instances for ECS tasks

I have various Fargate tasks. They work fine. I then have a few additional tasks that require more disc space than silly old Fargate will allow. These have to run on EC2 instances that I have assigned ...
1
vote
1answer
1k views

Docker volume permissions in ECS

I'm migrating an existing application from running on bare EC2 instances to a containerized setup with ECS. I have two situations where I need to share data between containers. One is an EFS share ...
0
votes
0answers
15 views

Flask Microservice deployment strategy

I going to deploy my microservice on an AWS ECS cluster. My plan is AWS ALB -> AWS ECS -> [Flask uWSGI server container] My question is do I need to add nginx for every uWSGI? If yes then why?
0
votes
0answers
12 views

Configuring APP MESH with ECS

I have a service running on port 80 in ECS. Inorder to add it in APP mesh, when lanching the service with the envoy. It's blocking the request to the database server on port 5432. What's the standard ...
0
votes
0answers
18 views

Accessing Elastic Beanstalk endpoint from AWS Batch (ECS)

I have an Elastic Beanstalk App with a load-balancer on a VPC with a security group which has white-listed inbound IPs. This works great for accessing the provided hostname endpoint (xxx.region....
0
votes
1answer
258 views

How to route to Cloudfront+s3 and rest to ALB in Route53?

The project has a domain name foobar.com pointing to a legacy system, hosting and serving mainly static files. The project got more complex over time and in AWS ALB certain /routes are pointed to ...
0
votes
0answers
17 views

Logs of a stopped task in ECS

My application is deployed to ECS and yesterday we updated the service. Today I noticed that I needed some information in the task that was running for months and that was stopped last night with the ...
1
vote
1answer
53 views

Production-ready Node/React app - memory utilization issues

I have an app that is deployed on AWS using ECS and recently facing some issues with memory utilization. To give you a little background: Our app is Node.js (specifically Sails.js) backend with ...
0
votes
0answers
28 views

POST Body content being cut

I've been having a frustrating issue where the request body length is being reported as some number of bytes in the header (e.g 306358) but when measuring the body length in php it's always 196608 ...
0
votes
0answers
23 views

How can I temporarily suspend a service in a ECS cluster?

What is the best way to temporarily suspending a service inside a ec2 cluster? Here is the service definition: I think it might work if I set the 'Number of tasks' to 0. But I am not sure what are ...
2
votes
1answer
31 views

AWS ECS Policy: Lock down permissions to services depending on owner

I'm pretty new to AWS so please bear with me. I currently have this ecs.yaml: ... ECSSendMessageToSQSRole: Type: AWS::IAM::Role Properties: AssumeRolePolicyDocument: Statement: -...
0
votes
0answers
101 views

AWS ECS container communication

How does one properly configure two containers to communicate between themselves on AWS ECS? I've tried Service Discovery for tasks with default and awsvpc network modes. The only way I could make it ...
0
votes
0answers
30 views

Start ECS before Lambda schedule

I have an AWS lambda function that needs to connect to a headless chrome instance running in a container on ECS. As the AWS lambda function is executed every hour with execution times around 2 ...
0
votes
0answers
64 views

Why must we use a GPU-optimized AMI when creating an AWS ECS cluster with Spot?

When creating an AWS ECS cluster with the EC2 Linux + Networking template, if I select On-Demand Instance for the Provisioning Model, I get a choice between Amazon Linux 2 AMI or Amazon Linux 1 AMI ...
1
vote
2answers
331 views

Is it possible to scale up an AWS ECS cluster when a Scheduled Task runs?

I have an AWS ECS cluster whose only purpose is to run a scheduled task every 12 hours. Currently, I leave the cluster scaled to 1 instance so the task has somewhere to run. I would instead like to ...
0
votes
0answers
24 views

Docker container + redis + mysql deployment on aws

I'm trying to deploy php web app(contained in docker image) acompanied with instance of mysql and instance of redis. Public access is required for app instance, but not desired for database and redis. ...
0
votes
0answers
114 views

assign a public ip to aws container task

I am using aws cluster with EC2 launch type where I an launching the tasks. In FARAGATE cluster we have auto assign public ip option enabled, but in EC2 launch type cluster this option is disabled. I ...
4
votes
2answers
2k 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
0answers
105 views

AWS ECS Cluster Autoscaling

I am trying to setup a scaling policy in ECS Cluster, so that EC2 instance that make up ECS cluster and task runnning in ECS Service could scale up and down based on the scalling policy i specified. I ...
2
votes
0answers
374 views

How does a unix socket shared through a Docker volume work compared to TCP?

I'm wondering how Docker manages a unix socket when it's shared across containers and how it affects the performance compared to just using TCP. What I'm trying to accomplish is setting up docker-...
0
votes
1answer
310 views

What is the right way to put Nginx in front of a Node.js Docker app for AWS ECS deployment?

We have a Node.js/Express application that is deployed as Docker containers into AWS ECS. This app has a few static resources (CSS, JS), and I would like requests for these assets to bypass Node.js ...