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
25
votes
1 answer

AWS CDK - Vague error while creating an AWS ECS service

I have the following CDK code to create an ECS service. Note: The stack is not fully configured as yet, specifically I don't have the docker image asset or any capacity attached to the cluster. My intention is to what minimum code is needed to set…
nija
  • 455
  • 1
  • 5
  • 8
25
votes
2 answers

AWS Fargate Task - awslogs driver - Intermittent Logs

I am running a one-off Fargate Task that runs a small python script. The Task Definition is configured to use awslogs to send logs to Cloudwatch but I am facing a very strange intermittent issue. Logs will sometimes appear in the newly created…
user10121455
25
votes
3 answers

how to provide environment variables to AWS ECS task definition?

In the task definition on ECS, I have provided environment variable as following: Key as HOST_NAME and the value as something.cloud.com On my local I use this docker run command and I'm able to pass in my env variables, but through task definition…
governingcloud
  • 375
  • 1
  • 4
  • 9
24
votes
4 answers

Persistence in AWS Fargate Containers

I have 2 containers in a Fargate task definition. One of the containers is a database server. I'm wanting to persist the data directory. However, Fargate doesn't support the Source Path field when setting up a volume in the task definition. Does…
Ira Klein
  • 425
  • 3
  • 6
24
votes
2 answers

Is it possible to create an AWS AMI from a Docker image?

I have a Docker image in my AWS ECR which I want to convert to an AWS AMI for creating an instance with the environment. Reason for trying to use an AMI over a Docker container I had to run computationally intensive ML tasks in my Docker container…
Dawny33
  • 10,543
  • 21
  • 82
  • 134
24
votes
1 answer

how to allow ECS task access to RDS

I have an ECS task executed from a Lambda function. This task will perform some basic SQL operations (e.g. SELECT, INSERT, UPDATE) on an RDS instance running MySQL. What is the proper way to manage access from the ECS task to RDS? I am currently…
scagnetti
  • 1,435
  • 3
  • 20
  • 38
24
votes
7 answers

Error registering: NoCredentialProviders: no valid providers in chain ECS agent error

Im trying to use EC2 Container service. Im using terraform for creating it. I have defined a ecs cluster, autoscaling group, launch configuration. All seems to work. Except one thing. The ec2 instances are creating, but they are not register in the…
Aldarund
  • 17,312
  • 5
  • 73
  • 104
23
votes
1 answer

AWS ECS Fargate pull image from a cross account ECR repo

I have 2 AWS accounts: - account A that has an ECR repo. - account b that has an ECS cluster running Fargate. I have created a "cross-account" role in account A with trust relations to account B, also I have attached the…
Anthony Khodr
  • 231
  • 1
  • 2
  • 3
23
votes
3 answers

How to speed up deployments on AWS Fargate?

After migrating from EC2 cluster instances to AWS Fargate, I realized that deployments take a lot longer. Before they would take 1-2 minutes, now some deplyoments take up to 5 minutes. This post claims that their deployments on Fargate even take up…
EagleBeak
  • 6,939
  • 8
  • 31
  • 47
23
votes
4 answers

How to update container image in AWS Fargate

I have pushed the initial docker image into repository and created AWS Fargate using the image, is there any way to update the image as there are certain changes in my docker image.
Ram
  • 407
  • 2
  • 6
  • 12
22
votes
3 answers

The container does not exist in the task definition

on my CI i have configured the deploy on the AWS ECS environment via bash script **deploy.sh** [...] aws ecs register-task-definition --cli-input-json file://./deploy/skeleton.json TASK_DEFINITION_ARN=$(aws ecs --output text list-task-definitions…
Gianmarco Carrieri
  • 771
  • 2
  • 9
  • 20
22
votes
3 answers

When I get 'services has reached steady state', in Amazon ECS does it means some tasks had stopped?

Does this means that my service tasks are stopping or it's ok to get these log messages?
wviana
  • 1,619
  • 2
  • 19
  • 47
22
votes
1 answer

AWS/ECS CPUUtilization average vs maximum

After reading AWS documentation I am still not clear about cloudwatch metrics statistics average and maximum, specifically for ECS CPUUtilization. I have a AWS ECS cluster fargate setup, a service with minimum count of 2 healthy task. I have enabled…
22
votes
4 answers

ecs error: "An error occurred (ClusterNotFoundException) when calling the..."

I've defined a cluster in ECS and failed to clean it up properly. I've terminated EC2 instances that are associated with this cluster which get recreated. No clusters/repos/services appear in my ECS console. In fact, when I go to this service…
scagnetti
  • 1,435
  • 3
  • 20
  • 38
22
votes
3 answers

ECS Service - Automating deploy with new Docker image

I want to automate the deployment of my application by having my ECS service launch with the latest Docker image. From what I've read, the way to deploy a new image version is as follows: Create a new task revision (after updating the image on…
Jake Kreider
  • 950
  • 7
  • 12