0

We use AWS fargate with containers. To reduce price we are looking for options. So question how to use AWS EC2 reserved instances with fargate?

As I understand steps look like this:

  • purchase reserved instance(s)
  • create new fargate cluster with supporting EC2 instance with some instance type (micro...)
  • create services/EC2 based tasks Question is, will this setup use reserved instances?

Looking for info...

1 Answers1

0

Fargate is used to run containers without running EC2 instances. You can't run Fargate on EC2. I think you just have your terminology wrong, but I get the general idea of what you're trying to do. If you have enough containers it can be cheaper to run EC2 instances rather than Fargate containers.

You can use ECS to run containers on EC2 instances. You can create an autoscaling cluster of EC2 instances. Start by reading the documentation here. I would copy it in here but it's a lot of steps.

Tim
  • 31,888
  • 7
  • 52
  • 78
  • Main idea is use reserved EC2 instances. Main question does ECS support reserved EC2 instances and how to use them (maybe need to use specific configuration/attach them into cluster?). – Inom Turdikulov Apr 05 '23 at 19:59
  • Yes it does. Read the ECS docs for how to use EC2, reserved instances are a billing construct, ECS doesn't care one way or another. Savings Plans are a newer model than reserved instances, compute savings plans can apply to fargate. – Tim Apr 05 '23 at 20:59