Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
8 views

Docker storage re-mounted in read-only mode when container is generating a lot of large file(20G+)

I am getting stuck with an issue for a couple of days, and hope someone here could help or give some hints. So here is the issue: when I am running some docker images which performs large I/O ...
-2
votes
0answers
30 views

How to architect ECS Fargate PHP App [closed]

As Docker runs single process in foreground I use Supervisord to run both Nginx and PHP-FPM on a single container. What would be an alternative / right design for such stack? Should I have separate ...
1
vote
1answer
14 views

How to update the minimum & maximum number of running tasks in ECS

I want to update the min and max number of tasks for a service in ECS in a lambda function (python with boto3). It looks like the closest thing is the desired count: desiredCount, but I don't think ...
0
votes
0answers
16 views

Can I change the docker image deployed using ECS

I used the following tutorial to deploy a docker image using ecs https://aws.amazon.com/getting-started/tutorials/deploy-docker-containers/ But now I was wondering if it is possible to just change ...
1
vote
0answers
16 views

Are there any non-fault reasons why ECS Fargate could stop/restart my task?

I'm evaluating ECS Fargate for a project where I'm planning to run a stateful server. Are there any reasons (other than host faults, or other non-recoverable errors) why ECS/Fargate would restart or ...
1
vote
2answers
114 views

How to add static entries to a AWS Route53 Auto Naming hosted zone?

I am running some of our backend REST services with Amazon ECS (Docker) and they change their public IP on every restart. I'm using AWS Route 53 Auto Naming (aka servicediscovery) to register new A ...
1
vote
2answers
87 views

Redirect ephemeral port to 80

I am starting in AWS and server management in general and just set up a deployment pipeline with ECS and some containers. My container : My host port is 0 and redirected to container port 4200 (...
0
votes
0answers
38 views

java.sql.SQLException: Driver:org.postgresql.Driver@******** returned null for URL:jdbc:postgresql://… --port=5432

I want to deploy a docker image with AWS. I use 2 services:RDS database(POSTGRESQL) and ECS as a container for the deployment. I can connect to the database using https://docs.aws.amazon.com/...
0
votes
0answers
48 views

503 Service Temporarily Unavailable AWS

I followed this tutorial https://medium.com/@remy.dewolf/aws-fargate-first-hands-on-experience-and-review-1b52fca2148e but in the end when I copy-paste the DNS name I get that the service is ...
0
votes
1answer
18 views

Gerrit ssh users on EC2/ECS

I'm trying to deploy gerrit code review to AWS and am running into problems with trying to ssh in once it's deployed. When I've created a new user, what does work is SSH tunneling in like ssh -fNL ...
0
votes
2answers
24 views

ecs instances generated via Auto Scaling group not registering to ecs cluster

I have created an ECS cluster linked to an Autoscaling group with an Application load balancer attached. The Autoscaling deploys the instances, the AMI is correctly choosen (ECS optimized). for ...
0
votes
0answers
33 views

How to secure AWS RDS MySql password for Docker Wordpress

I am relatively new to Wordpress and need help on how to secure AWS RDS mysql password. Currently I am providing the password in Task Definition as environment variables. These are picked up and wp-...
0
votes
0answers
208 views

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 ...
0
votes
0answers
133 views

Nuxt SSR reverse proxy through Nginx on AWS ELB

I'm trying to set up a frontend application using Nuxt on AWS ECS. Architecture EC2: Within each EC2 instance: Nuxt is being served on port 3000 Nginx reverse proxies from port 80 to Nuxt's port ...
0
votes
1answer
131 views

How do you tag EC2 instances spawned by ECS in Terraform?

I have an ECS service that spawns some containers: resource "aws_ecs_service" "rocketchat" { name = "rocketchat-ecs-service" cluster = "${aws_ecs_cluster.rocketchat.id}" ...
0
votes
1answer
120 views

How do I find out the reason a task instance gets deregistered?

We have a bunch of services running in ECS. All of them are set to run at least two instances. With some of the services I notice that at irregular intervals one of the instances gets de-registered. ...
0
votes
0answers
24 views

The idiomatic approach to mounting “configuration” volumes on ECS?

I have a docker container that I would like to "port" to ECS. My Dockerfile contains a VOLUME instruction: VOLUME /app/configuration So using docker on a linux machine, you just point to the ...
1
vote
0answers
28 views

In ECS, how to mount container's user home and host's user home?

In ECS, how can I mount volumes the container's userhome and host's user home? "containerDefinitions": [ { "name": "web", "image": "nginx", "cpu": 99, "memory": 100, "portMappings": [ { "...
1
vote
1answer
79 views

Why does creating a service in AWS ECS require the ecs:CreateService permission on all resources?

I'm trying to create a service on AWS ECS, using CloudFormation. The user trying to create service has a role granting it the ecs:CreateService permission on the cluster that will host the service. ...
3
votes
1answer
561 views

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

Why do I get an “empty reply from server” from AWS ECS?

I have a web service in a Docker image to which I am trying to upload two files: a 6MB file and an 18MB file. When running in my local Docker service, both files upload fine. With the same image in ...
0
votes
0answers
94 views

AWS - ECS with ELB not working, instance IP works though

I've set up an ECS cluster with a single container, with an ELB to serve the traffic to it. The ELB listener is HTTPS/443, and the host listener is HTTP/8080. I.e. when you hit the URL it's HTTPS but ...
3
votes
1answer
250 views

Assigning a domain name to an AWS Fargate task

I have an AWS Fargate task running a web app in a public subnet so it has a public address. My question is how to I connect a domain (through Route 53) to that task, so that nothing breaks when I ...
0
votes
0answers
78 views

Configure CloudWatch stream name using ECS Container Name

I'm using awslogs for Docker containers within ECS, and I would like to use the image name as the stream name in CloudWatch. However, I'm not sure where this logic should be placed. /etc/docker/...
0
votes
1answer
255 views

Routing HTTP traffic to user specific Docker containers dynamically

I am attempting to architect a service which would run user specific java processes within Docker containers in AWS (ECS most likely). One java process per container per user. The only exception to ...
0
votes
1answer
23 views

How do AWS ECS Task Definition updates work?

I have an ECS Service running a task definition. Whenever I push a new task definition out, I know there is some blue-green logic to drain the previous task before rerouting to the new task. What ...
2
votes
3answers
2k views

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

AWS ECS: Service + autoscaling vs User Data launching Task

Trying to wrap my head around ECS using EC2 launch (not Fargate, at least for now). Assume a single long-running task that I want to launch with every container instance. The intended mechanism for ...
3
votes
1answer
305 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 ...
0
votes
0answers
69 views

How to configure routing between docker containers running on single EC2 instance using AWS Network Load Balancer?

I have a setup where I have ECS Cluster with a single EC2 instance with multiple Docker containers registering to a Network Load Balancer target group with random ports. Target group reports targets ...
0
votes
0answers
190 views

How to configure ipv6 for docker which is hosted in Amazon EC2?

I have been facing issue in configuring ipv6 in docker which is on AWS EC2. If i run ping6 google.com is working from the EC2 host. But the same not working inside the container but ipv4 is working on ...
1
vote
1answer
618 views

ECR cross-account pull permissions

We have two AWS accounts. Account A has ECR repositories and Account B is meant to be able to pull from them. I have tried setting the repository permission statements in Account A to allow pulling ...
0
votes
1answer
351 views

AWS ECS Cannot start task

I am trying run a task definition I have in AWS ECS. I have a default cluster, and I've got a Container Instance launched on it, and I'm trying to run a task definition I've got on the instance. The ...
0
votes
1answer
282 views

Fixed IP address, hosting via Docker in AWS ECS

We want to host our software on AWS via Docker using ECS. However, our software must connect to an external service, and they limit our access based on IP address. Is it possible to have fixed IP ...
0
votes
0answers
230 views

Autoscaling AWS ECS services with soft limits

As per the service utilization documentation it is possible to have a Memory utilizations over 100% when using soft limits in the ECS tasks (because you don't want to kill your app with hard limits). ...
1
vote
1answer
1k views

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

Low req/s ratio on EC2 machine on PHP Hello World

I’m having a problem with AWS. Im using Elastic Container Service that is created as on link https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_container_instance.html Instance type ...
0
votes
0answers
141 views

No network connection on Multiple docker container in Elastic Beanstalk

I'm trying to deploy a multiple docker container to Elastic Beanstalk. There is two containers, one for the supervisor+uwsgi+django application and one for the JavaScript frontend. Using docker-...
0
votes
0answers
358 views

ECS Container instance without public ip

I have an ECS Cluster in my private subnet and a NAT instance for external outbound connectivity. Everything works great, but AWS always attaches an public ip (which is not needed) on any new EC2 ...
0
votes
0answers
102 views

Error message: The Auto Scaling group can't be updated in the CloudFormation stack

One of my ec2 instance in my cluster 'prod' seems to have lost connection with the cluster. The 'agent connected' status is false and no task is running on the instance. I therefore have drained the ...
0
votes
0answers
51 views

aws ecs does not spawn new ec2 instance after an instance is drained and deregistered

One of my ec2 instance in my cluster 'prod' seems to have lost connection with the cluster. The 'agent connected' status is false and no task is running on the instance. I therefore have drained the ...
0
votes
1answer
90 views

Is it possible to use IAM roles for ECS tasks in an Elastic Beanstalk application?

I maintain a project running on Elastic Beanstalk on the Multicontainer Docker platform. To securely access the SSM Parameter Store I would like to give specific containers access to specific IAM ...
0
votes
0answers
278 views

service xxx is is unhealthy in target-group yyy due to (reason Request timed out)

This message seems to appear regularly every few days 99fd3f00-8fff-4016-9c7b-6e5a22632352 2017-11-13 10:48:03 +1100 service GoogleDrivePolling (instance i-069d7d12d17bb57ec) (port 32814) is ...
1
vote
0answers
84 views

Cloudformation ECS keep all taskdefinition revisions

In CloudFormation ECS when I update TaskDefinition tag Image:app:2 and make update-stack, I get only the one last new revision a myapp:2. How I can keep all previous revisions in which case manually ...
1
vote
0answers
381 views

How to automate OS/ECS-agent updating on a EC2 instance in ECS Auto Scaling environment?

First off: I feel like I still don't understand some of the fundamental concepts of AWS, so please bear with me, if this question is noobish. I have the following set-up in AWS: 1 ECS-Cluster with 1 ...
0
votes
1answer
381 views

How to set different destination ('region') of an aws cloudwatch logging agent inside a docker image?

Here is my dockerfile. FROM 796678920264.dkr.ecr.us-west-1.amazonaws.com/myproject/base:latest COPY /* / RUN python awslogs-agent-setup.py --non-interactive -c /aws-log.myservice.cfg --region us-...
1
vote
1answer
54 views

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; ...
0
votes
0answers
195 views

AWS Batch CLIENT_ERROR Invalid IamInstaceProfile

Hopefully I'm posting in the correct community! I'm trying to set up a container to run on AWS Batch. I'm not doing anything fancy, more or less just following the default set-up with everything. I'm ...
0
votes
1answer
473 views

Memory utilisation and OOM exception in AWS ECS

Here is a chart of MemoryUtilization from one of my service in an ECS cluster. As you can see the memory shot up to 25% briefly. In this cluster I have 3 t2.medium machines. The specification says ...
0
votes
1answer
166 views

Shutdown old EC2 instances only after creating new one in when changing ECS host ami in autoscaling group

Here is my LaunchConfiguration of my AutoScalingGroup in my ECS-Cluster - using cloudformation. UpdatePolicy: AutoScalingRollingUpdate: MinInstancesInService: 1 MaxBatchSize: 1 ...