By using AWS re:Post, you agree to the Terms of Use
/Does AWS have no equivalent of GCP cloud run for scale to 0 huge savings in staging/preproduction?/

Does AWS have no equivalent of GCP cloud run for scale to 0 huge savings in staging/preproduction?


NOTE: I am looking to stay in AWS but in comparing bills to my previous successful startup(using GCP), I am seeing massive differences in cost due to cloud run going to 0 instances and amazon staying on.

Duplicating production to preproduction and staging can be expensive and using cloud run at our previous company(15 microservices), our preproduction and staging environments would frequently just scale to 0 and we would pay ZERO over weekends over all the nights, etc. I am looking at our current bill and this company is identical in all the technologies and identical in usage(I mean it could not be more apples to apples which is sort of crazy to me).

I dug deeper and none of our systems are scaling back to 0. (much like AWS lambdas does). Is there no solution in AWS for this?

What I tried: Elastic Beanstalk defaulted min=1 instance max=5 instances so I changed it to min=0. It successfully scaled back to 0 and then when I sent web request in, I got a 503 :( instead of request taking a while and spinning a server back up.

AWS EKS, we tried setting to 0 and in that case it went down to 0 and then a web request just timed out instead of waiting for an instance to spin up and serve the request

The ideal situation:
Servers instances spin down to 0 when not in use When a request comes in, an instance spins up and serves that request(first request takes longer, yes) and then the 2nd request is lightning fast.

Does AWS have no cloud run type of system? I know they have lambdas but having APIs with 5-10 methods/lambdas is a much easier way to architect a system and leads to better reviews in our monorepo on those contracts between systems.

2 Answers

You mention Lambda (which does what you're asking for - no cost unless it's running); what's the blocker there for using it in this situation?

Yes, you might have to do a little work to rearchitect things but it will be much lower cost; and the startup delays for a "cold" Lambda function are very low so that's an advantage over starting a container or instance.

answered a month ago
  • hmmm, thinking. Perhaps I am wrong but I was thinking 100 lambdas is way worse to reason about and architect than 10 services with 10 methods each(where there are logical groupings). Drawing an architecture of lambdas sounds like a nightmare for a web of 100 things instead of 10. Sounds hard to maintain as well without a ton of extra work. Creating all the routing amongst 100 lambdas sounds painful as well instead of routing between 10 micro-services. (metrics sounds like a huge win in lambdas though of course). In our current state, it may just be easier to switch to GCP cloud run than create all this stuff. Does AWS have nothing to compare to cloud run?

    If we were to switch, we would want to launch a microservice 5 times (once for each method it has) I guess and keep it all as a single project (not sure we should go that path as I feel we may run into new issues there?)

  • While we recommend that Lambda functions are small and have a single task (this is good practice because you limit your blast radius when making changes; it's easier to update small bits of code); there's nothing stopping you having large Lambda functions that do multiple things. But the effort to break things down into microservices is worth it in the end. And using automation (of any sort - full CI/CD or something in between) is going to make your life easier regardless of how often you make changes. I strongly recommend that you reach out to your local AWS Solutions Architect (they're happy to help!) and discuss your intended design with them.


I found the answer. AWS App Runner is 99% the same as GCP Cloud Run but there is an open ticket as it does not scale to 0. Using it, sure enough, it is the serverless, basically configurationless with just launch a docker image and go(no fiddling with kubernetes and launch in record time). To bad it doesn't go to 0 as that saved us tons of money. I am going to trial it and see how much it costs over a week and may just end up switching to GCP like our previous company(no point in leaving money on the table).

answered a month ago
  • I came here to say that App Runner is what you are looking for. It does not scale to 0 but it does scale to 0.5 (as I like to say). Meaning that the App Runner charges a minimum (low) fee for provisioned container instances (1 minimum) and a fee for active container instances (that is, when they are doing work). Check out the details at . This service is designed to not have cold starts in its current configuration. Note that at $0.007 per hour for the provisioned container instance you are paying roughly 30 pennies over an entire week-end when the app is not in use.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions