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
30
votes
2 answers

How to translate docker-compose.yml to Dockerrun.aws.json for Django

I am following the instructions at https://docs.docker.com/compose/django/ to get a basic dockerized django app going. I am able to run it locally without a problem but I am having trouble to deploy it to AWS using Elastic Beanstalk. After reading…
29
votes
6 answers

AWS Secrets Manager can’t find the specified secret

I'm using AWS Fargate and storing sensitive data with Secrets Manager. Task definition should get environment variables from secrets store - name: "app" image: "ecr-image:tag" essential: true secrets: - name: "VAR1" valueFrom:…
29
votes
1 answer

AWS Fargate startup time

Currently I'm researching on how our dockerised microservices could be orchestrated on AWS. The Fargate option of ECS looks promising eliminating the need of managing EC2 instances. Although it's a surprisingly long time needed to start a "task" in…
esboych
  • 985
  • 2
  • 10
  • 16
29
votes
6 answers

How to diagnose ECS Fargate task failing to start?

I'm trying to launch/run a Dockerfile on AWS using their ECS service. I can run my docker image locally just fine, but it's failing on the Fargate launch type. I've uploaded my Docker image to ECR, and I've created a cluster/service/task from…
Cerin
  • 60,957
  • 96
  • 316
  • 522
29
votes
1 answer

What is difference between REPLICA and DAEMON service type in Amazon EC2 Container Service?

When I created service in Amazon EC2 Container Service, there were 2 options for service type: REPLICA and DAEMON. What is the exact difference between them? Replica services place and maintain a desired number of tasks across your cluster.…
Sang
  • 4,049
  • 3
  • 37
  • 47
28
votes
1 answer

How to understand Amazon ECS cluster

I recently tried to deploy docker containers using task definition by AWS. Along the way, I came across the following questions. How to add an instance to a cluster? When creating a new cluster using Amazon ECS console, how to add a new ec2…
Allan Jiang
  • 11,063
  • 27
  • 104
  • 165
27
votes
4 answers

AWS ECS Fargate and port mapping

I have two containers and they expose the same port. I want to run them in the same task as they are part of the same system. But I cannot do this with Fargate because there are no port mapping and the host port should be the same as container port…
Anton Zherdev
  • 674
  • 1
  • 8
  • 10
27
votes
5 answers

AWS ECS 503 Service Temporarily Unavailable while deploying

I am using Amazon Web Services EC2 Container Service with an Application Load Balancer for my app. When I deploy a new version, I get 503 Service Temporarily Unavailable for about 2 minutes. It is a bit more than the startup time of my…
vargen_
  • 2,590
  • 3
  • 24
  • 30
27
votes
4 answers

How to create a new docker image from a running container on Amazon?

Here is my problem: I have a task running a Docker image on Amazon ECS but I would like to make a new Docker image from the running instance of the container. I see the id of the instance on Amazon ECS; I have made an AMI but I would like to make a…
Bussiere
  • 500
  • 13
  • 60
  • 119
27
votes
1 answer

Creating an ALB Target Group in CloudFormation

I'm trying to create an Application Load Balancer in CloudFormation, with a target group that forwards traffic to EC2 instances. Here is the relevant snippet, where ELBSubnets, ECSCluster, taskdefinition, and VpcId are passed in as…
MungeWrath
  • 780
  • 1
  • 6
  • 12
26
votes
2 answers

`aws ecs execute-command` results in `TargetNotConnectedException` `The execute command failed due to an internal error`

I am running a Docker image on an ECS cluster to shell into it and run some simple tests. However when I run this: aws ecs execute-command \ --cluster MyEcsCluster \ --task $ECS_TASK_ARN \ --container MainContainer \ --command "/bin/bash"…
clay
  • 18,138
  • 28
  • 107
  • 192
26
votes
1 answer

Understanding of CPU units in AWS ECS

I'm trying to understand meaning of vCPU and CPU units and connection of these concepts to physical CPU. I have ECS cluster with one cluster instance, which is m5ad.large EC2 instance. Here is output of lscpu command on this instance: CPU…
IceBro
  • 361
  • 1
  • 3
  • 3
26
votes
1 answer

Need help troubleshooting a .NET Core 2.1 API in a linux Docker

We have a bad situation with an API we are running in a Linux Docker on AWS ECS. The API is running with ASP.NET Core 2.1 now, but we also had the problem on ASP.NET 2.0 (we hoped upgrading to 2.1 would fix it, but it didn't). The problem:…
Søren Pedersen
  • 764
  • 8
  • 20
26
votes
4 answers

Auto Scale Fargate Service Based On SQS ApproximateNumberOfMessagesVisible

I would like to scale out my aws fargate containers based on the size of the SQS queue. It appears that I can only scale based on the container's CPU or Memory usage. Is there a way to create a policy that would scale out and in based on queue size?…
25
votes
3 answers

Error : Network Configuration must be provided when networkMode 'awsvpc' is specified

I have this task definition code, which has a problem: { "family": "ikg-api", "taskRoleArn": "", "executionRoleArn": "arn:aws:iam::913xxxx371:role/ecsTaskExecutionRole", "networkMode": "awsvpc", "containerDefinitions": [ { …
user11810899