compose-cli
                                
                                
                                
                                    compose-cli copied to clipboard
                            
                            
                            
                        Configuration option to use EC2 instead of Fargate in ECS
Description
Currently Fargate containers are used by default in ECS service. EC2 containers are supported but are used automatically only if GPU resources are requested.
There is no configuration option to manually force deployment to EC2 instead of Fargate.
Feature Request Please add configuration option which type of container (LaunchType) should be used for service (EC2 / FARGATE).
Justification In some architecture cases EC2 containers are preferred over Fargate from pricing perspective.
P.S. As I see from code there is function which decides which type of container should be created and it checks only gpu config.
func requireEC2(s types.ServiceConfig) bool { return gpuRequirements(s) > 0 }
EC2 support was introduced only to workaround lack of GPU support on Fargate, with the plan it would be removed once Fargate offer this option. From a technical perspective, EC2 support brings significant extra complexity that I'd prefer to avoid. I didn't know about pricing impacts, need to get a Product decision on this topic
Hi,
we use EC2 launch types, because from a princing perspective they are more convenient when the workload does not scale often. In our use case for most of the time our services run in a fixed number of replicas, and only on fixed spike periods need to be scaled up.
Running the same configuration in FARGATE would be expensive, wihout any benefits.
Most of the benefit of FARGATE can be replicated using awsvpc and cloudmap, we tested it. And using the right ec2 instance. For a microservices scenario, we used a1.medium, that enabled us to run up 10 task defintion (derived from docker-compose) on just 2 GB of RAM.
From our perspective a limited support for EC2 ( some advanced features may be missing ) would be sufficient
That's rally sad AWS doesn't make Fargate more attractive by pricing policy. I would expect Fargate allows better resource allocation/concentration and as such should offer lower costs vs plain dedicated EC2 instances.
Hi. Is there any update on this? We also would like to specify EC2 instances for our launch configuration but there isn't any sort of option for it. Thanks!
Fargate also only supports 4 CPUs and 30G memory, I have routine batch jobs that eat 36 CPUs and 72G memory.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed because it had not recent activity during the stale period.
I would also like to use this feature, it is a dealbreaker forcing me to use other tools.
In my scenario, we have around 8 containers (microservices) we are wanting to run that would all fit nicely on a very cheap t4g.nano costing around $3 per month. For the same containers to run on Fargate this would cost orders of magnitude more with no benefits.
Is it possible to reconsider the addition of EC2 support?