Skip to main content
18 votes
Accepted

Simple CI/CD Containers in AWS

I would keep the ECS container instances (I'm talking about the Docker hosts - I don't like AWS terminology here) and the deployment as two separate things. Get your ECS stack up and running. You can ...
Alexandre's user avatar
  • 1,965
11 votes
Accepted

How to get environment variables in ECS container?

Environment variables are defined inside the container and some are passed in the task definition. So you can use describe-task-definition to see the extra variables. To get the default environment ...
Jiri Klouda's user avatar
  • 5,837
8 votes

Using volumes on AWS fargate

Yes, I opened a support ticket and the AWS representative said that Fargate is really intended as a stateless container solution. I took that to mean it's more of a self-made Lambda rather than a ...
Harsh Manvar's user avatar
8 votes
Accepted

How to deploy multiple dependent micro services

Such question could be an indication of a poor architectural slicing into microservices. From What are Microservices?: These services are built around business capabilities and independently ...
Dan Cornilescu's user avatar
6 votes
Accepted

How to move EC2 instance to another ECS cluster

You need to follow these steps: Set ECS_CLUSTER=devcluster in /etc/ecs/ecs.config Stop all tasks/containers Remove checkpoint file - /var/lib/ecs/data/ecs_agent_data.json Start ECS agent again as ...
lagivan's user avatar
  • 176
6 votes

AWS ECS/EKS: EC2 vs Fargate mode

Update 12/05/2020: Fargate prices have been greatly reduced over the last months and are now comparable with EC2 prices for the same CPU / RAM configurations. That makes Fargate a valid option for ...
MLu's user avatar
  • 1,011
6 votes
Accepted

Is AWS Fargate suitable for web applications?

Fargate is absolutely suitable for web apps. We have many customers that use it that way (and many others that use it in a more "batchy" way). Fargate is a managed compute engine and AWS ...
mreferre's user avatar
  • 256
5 votes
Accepted

Update ECS task definition with new image from ECR

Options are: Use CodeBuild to push the new image. Make sure the task definition is using the "latest" tag. You'll need to force the deployment of the task definition to pick the new image. Use ...
aromero's user avatar
  • 211
5 votes
Accepted

Best way to launch 100 identical Docker machines on AWS?

Look at AWS Fargate - it lets you run your Docker containers without having to spin up the EC2 instances for an ECS cluster. You simply schedule the Tasks (or Services), each gets is own IP address ...
MLu's user avatar
  • 1,011
5 votes
Accepted

Blue/green deployment with micro services and DNS

You should have 3 names when you're willing to do a blue/green deployment. Two set of names, one for blue, one for green, which will works as is, and a production entrypoint which will point to ...
Tensibai's user avatar
  • 11.4k
5 votes

What's the benefit of using Nginx to serve a Flask API on AWS?

Unless you are using the AWS API Gateway, you'll still need some way of "serving" your Flask API. You will also need to provision an EC2 instance and run something to serve your API. Instead of ...
Wesley Rolnick's user avatar
5 votes
Accepted

Startup of ECS Fargate task fails with ResourceInitializationError mount.nfs4 Connection timed out

Underlying reason: The ECS service's network access security group did not have permission to access EFS. Solution: Add an inbound rule for type NFS in the security group as described in this ...
stoft's user avatar
  • 273
4 votes

Amazon ECS Basic Definitions and Terms

AWS provide different services and categories them on base of computation, storage, databases, management, Analytics, Messaging, Developer Tools etc. ECS comes under the computing services. Amazon ...
Adiii's user avatar
  • 191
4 votes

Update ECS task definition with new image from ECR

If task definition is using "latest" as image tag in container definition,to update ecs service in order to pull new image from ECR with "latest" tag. You can simply do Force new deployment aws ecs ...
Ashwini Gaddagi's user avatar
4 votes

Configure VPC for ECR access

This error CannotPullContainerError usually occurs when you have no access to the Internet from ECS and thus it doesn't able to pull an image from registry. Make sure you have networking configured ...
Most Wanted's user avatar
4 votes
Accepted

In what way does a new ECS Fargate service not satisfy the task definition's required capabilities?

This is by design because AWS have yet to upgrade LATEST to point to v1.4.0 (as per 2020-06-23, see AWS ECS Developer Guide). Set the service platform version explicitly to 1.4.0 (instead of LATEST).
stoft's user avatar
  • 273
4 votes

Is AWS Fargate suitable for web applications?

But from what I've understood Fargate is more suitable for container that have a limited lifetime? That's not strictly correct, Fargate capabilities include tasks which are suitable for short-term ...
Sathyajith Bhat's user avatar
3 votes
Accepted

ECS auto deploy with ECR

I don't think you can trigger re-deployment based on ECS image being updated. You can however do it as part of your Jenkins pipeline - after you push to ECR as a next step in the pipeline can run a ...
MLu's user avatar
  • 1,011
3 votes

How can I push multiple containers, created with docker-compose, to a registry

Just make sure the images you build all have the right names in terms of registry prefix and so on. If not you need to rename them accordingly. Otherwise this task is pretty easy. To push all Images ...
Marvin Winkler's user avatar
3 votes

Simple CI/CD Containers in AWS

For simple use case described I would suggest checking Elastic Beanstalk for Docker, it's not the minimal solution like bare ECS usage, but you can benefit from auto-managed and configured services ...
rombob's user avatar
  • 657
3 votes
Accepted

Docker image registries

It depends on several factors. If your images can be public or must be private. If you can make a public image, docker hub could work. With ECR you will have a fine grain control of your permissions,...
RuBiCK's user avatar
  • 305
3 votes

Get tagging to work on AWS CLI

I think this is because your ECS service was created before tagging was available for ECS services. See this blog post by AWS on how to migrate to the new ARN format. https://aws.amazon.com/blogs/...
Levi's user avatar
  • 1,064
3 votes

Accessing a AWS docker instance via localhost only?

Have you tried using awsvpc mode? https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html You can follow this tutorial - https://docs.aws.amazon.com/AmazonECS/latest/userguide/...
Meir Gabay's user avatar
3 votes
Accepted

Why do I need a Nat Gateway for ECS containers using AWSVPC?

While this is completely possible, it would mean that your instance would be accessible from the internet. Public subnet means that your instances are accessible directly from the outside. Private ...
Kaymaz's user avatar
  • 355
2 votes

How to move EC2 instance to another ECS cluster

The way a cluster becomes aware of the EC2 instances associated to it, is a configuration file used by the ECS agent. You can modify this file, located at /etc/ecs/ecs.config, and name a different ...
Evgeny Zislis's user avatar
2 votes
Accepted

AWS Task definition memory for Ubuntu docker image

There are two important parameters that you can use wisely to deal with AWS ECS task definition. memory: The hard limit (in MiB) of memory to present to the container. If your container ...
sithumc's user avatar
  • 272
2 votes

What is the best way to find the Auto Scaling Group of an ECS cluster?

Example in AWS cli that should work to get the ASG name a=curl 'http://169.254.169.254/latest/meta-data/instance-id'; aws autoscaling describe-auto-scaling-instances --instance-ids $a --query '...
Vorsprung's user avatar
  • 320
2 votes

Is running load balanced autoscale apps cheaper on AWS Kubernetes than just using EC2 resources?

From your comment I assume a cpu load under 5% in average considering all instances together. Each of your actual instance can be a pod on a kubernetes node, using quite larger instances you can ...
Tensibai's user avatar
  • 11.4k
2 votes
Accepted

How to use ecs service dicovery

The goal can be achieved via several solutions. We can use service with awsvpc as network mode, so your service can get a real "A" DNS record and ENI interface, you must pay attention with this ...
Mohamed's user avatar
  • 61
2 votes

Best way to launch 100 identical Docker machines on AWS?

Why don't you use Terraform for the purpose? It can launch as many instances you want, create network for you, create security groups, ECS, IAMs or whatever you want to create and terminate easily ...
deosha's user avatar
  • 253

Only top scored, non community-wiki answers of a minimum length are eligible