copilot-cli icon indicating copy to clipboard operation
copilot-cli copied to clipboard

Support EC2 launch type

Open srrengar opened this issue 4 years ago • 17 comments

In addition to the existing Fargate pattern, I'd like to deploy my container to ECS backed by EC2 instances. This will allow me to run windows applications for example.

srrengar avatar Jul 07 '20 23:07 srrengar

We would like to use Copilot Cli but we need to support EC2 back as well

JohGirard avatar Jul 31 '20 09:07 JohGirard

EC2 support would be much appreciated

ramnamy avatar Aug 22 '20 12:08 ramnamy

I'm not seeing this in the Roadmap at all. Is that because it's not planned or too difficult to integrate? I'm sure Fargate is great for many scenarios but EC2 launch type is still something many will want/need to use. It's like flying the jet on only 1 engine.

dfuentes77 avatar Mar 17 '21 00:03 dfuentes77

I have at least 1 EC2 instance(spot or standard) attached to ECS cluster always free, ASG care about it. It is already there and ready to take load.
If instance does meat Copilot requirements, I would like Copilot to launch task/service on it. I would expect this to speedup and simplify my feature branch testing via custom CI/CD.

the-smallest-coder avatar Nov 10 '21 10:11 the-smallest-coder

I would really love to have this functionality. What is needed, in order for this to be considered for the roadmap? Are there any workarounds that people have, in order to use an EC2 Capacity Provider for an app / service that was launched with copilot?

tomkerswill avatar Jun 22 '22 12:06 tomkerswill

Looking forward for this feature to avoid these custom hacks. @tomkerswill We were able to make it work with below steps.

  • Create EC2 ECS ASG and Capacity Provider (Referenced from here) (VPC trunking enabed via user data- our addon -> may be a capability we can add to EnvManifest)
  • If using private subnets, ensure deployment is done to private network (so NATs are created)
  • Link capacity provider to ECS cluster manually (CFN doesn't allow to append new providers for cluster created by copilot env stack)
  • Patched copilot to use EC2 instead of FARGATE.

gautam-nutalapati avatar Aug 05 '22 20:08 gautam-nutalapati

@gautam-nutalapati how about for operational commands, did you find that there are any paper cuts there? for example like rolling new AMIs?

efekarakus avatar Aug 05 '22 20:08 efekarakus

@efekarakus I haven't seen any paper cuts yet, but it may be too early to see any in our case as it has been just couple of months since we started implementing this. I read through the article, and I couldn’t think of any side effects. At least not yet 🙂 , will keep posting in this thread in case we do find any.

gautam-nutalapati avatar Aug 22 '22 19:08 gautam-nutalapati

Wasted three days until I realised it does not support EC2 launch type.

fade2black avatar Jan 23 '23 14:01 fade2black

Hi @fade2black, I am so sorry about the loss of time 🙇

Can you tell us more about why you'd like to use the EC2 launch type over AWS Fargate? This feature has a lot of 👍 so it's definitely one of our most requested asks.

If the concern is pricing, would Fargate Spot meet your needs: https://aws.github.io/copilot-cli/docs/manifest/lb-web-service/#count-spot?

edit:

Wasted three days until I realised

We definitely don't want folks to spend 3 days to figure out how to launch an application, if you have any feedback on frictions faced along the way, we'd really appreciate any feedback here: https://github.com/aws/copilot-cli/discussions/categories/general

efekarakus avatar Jan 23 '23 19:01 efekarakus

+1 for this - our main use case would be for a flatfile CMS we use for many clients which just doesn't lend itself to being containerized

ssyberg avatar Mar 15 '23 13:03 ssyberg

+1 for GPUs

gartmeier avatar Apr 12 '23 20:04 gartmeier

@efekarakus A major limitation of Fargate is the caching story. In the AI/Robotics domain the images produced can be very large due to the size of the libraries. For instance the Nvidia ISaaC SDK will produce minimally a 7GB image. This makes Fargate very painful to use for these types of applications.

bearrito avatar May 26 '23 20:05 bearrito

+1 for ECS on EC2. Especially since AWS stopped maintaining ecs-cli there is no easy and obvious way to deploy to ECS and we end up creating custom deployment scripts/tools for each client. If copilot is not the alternative to ecs-cli, then what is?

altonotch avatar Jul 23 '23 17:07 altonotch

Can you tell us more about why you'd like to use the EC2 launch type over AWS Fargate? This feature has a lot of 👍 so it's definitely one of our most requested asks.

@efekarakus, running stateful applications that require a large amount of memory. EC2 container instances seem like a cheaper approach, if properly sized.

yegeniy avatar Sep 21 '23 16:09 yegeniy

following!

ssyberg avatar Oct 23 '23 16:10 ssyberg