skip to Main Content

Aws Fargate pricing calculator

Hi I am new to Fargate and confused about its calculation.

  1. How is the 'Average duration' calculated and charged ? is it calculated and charged only for the time between request arriving and return of response or pods are continually running and are charged for 24*7*365 ?

  2. Also does fargate fetches image from ECR every time a request arrives ?

  3. Do fargate costs even when there is no request and nothing is processing ?

What is the correct way of calculating Average duration section ?

This can make huge difference in cost.

2

Answers


  1. You can learn more details from AWS Fargate Pricing and from AWS Pricing Calculator. When you read details from first link that I mentioned, you will find the explanation for duration and there are 3 example in the link.

    Login or Signup to reply.
  2. How is the ‘Average duration’ calculated and charged ? is it calculated and charged only for the time between request arriving and return of response or pods are continually running and are charged for 247365 ?

    Fargate is not a request-based service. Fargate runs your pod for the entire time you ask it to run that pod. It doesn’t deploy pods when a request comes in, the pods are running 24/7 (or as long as you have it configured to run).

    Fargate is "serverless" in the sense that you don’t have to manage the EC2 server the container(s) are running on yourself, Amazon manages the EC2 server for you.

    Also does fargate fetches image from ECR every time a request arrives ?

    Fargate pulls from ECR when a pod is deployed. It has to be deployed and running already in order to accept requests. It does not deploy a pod when a request comes in like you are suggesting.

    Do fargate costs even when there is no request and nothing is processing ?

    Fargate charges for the amount of RAM and CPU you have allocated to your pod, regardless of if they are actively processing requests or not. Fargate does not care about the number of requests. You could even use Fargate for doing things like back-end processing services that don’t accept requests at all.


    If you want an AWS service that only runs (and charges) when a request comes in, then you would have to use AWS Lambda.

    You could also look at AWS App Runner, which is in kind of a middle ground between Lambda and Fargate. It works like Fargate, but it suspends your containers when requests aren’t coming in, in order to save some money on the CPU charges.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search