Skip to main content

Can Fargate resize pods on demand?

Created
Active
Viewed 97 times
2 replies
0

Say i configure a container with 2 vCPU and 4 GB memory on Fargate. If the task needs more memory down the lane, can Fargate auto size the container to use 8GB instead of 4? And maybe 4 vCPU instead of 2?

  • 940
  • 2
  • 13
  • 41

2 replies

Sorted by:
78720472
1

Is this while the containers are running ?

Basically we can resize the pods by updating the task definition and restarting the service/task but it cannot resize automatically.

78741842
0

ECS can scale horizontally as well as vertically. Check this: Optimize Amazon ECS service auto scaling
If you want to increase the RAM or CPU, you should monitor the cloudwatch metrics.

  1. Create an alarm based on CPU/RAM usage.

  2. Attach SNS to your alarm that can trigger a lambda

  3. write a lambda function to update your task definition.