Rant: does anyone use AWS App Runner in production?

Hey everyone,

Over the past few days, I’ve been experimenting with App Runner as an alternative to my Heroku app. Some might wonder why I decided to switch. Well, for a few years now, I’ve been running some critical parts of my app on Lambdas, and I’ve been quite satisfied with them. I’ve never encountered any issues. I thought it would make sense to consolidate all my infrastructure in one place and take advantage of direct access to AWS services like X-ray. I was really excited to give App Runner a try. It was introduced two years ago, so I expected it to be quite mature. However, I couldn’t have been more wrong…

Firstly, when I tried to create a service in App Runner, I made a mistake and named the file apprunner.yml instead of apprunner.yaml. After going through the process of naming service, connecting it to the repository, and configuring everything, I had to wait for five minutes, only to receive a “creation failed” error. It took me a while to figure out the issue, but in order to try again, I had to delete the old service and create a new one. It was quite frustrating.

Secondly, once I managed to get the service to the “Created” state, I noticed how slow the deployments were. I started with a basic node/express app, which takes around 30 seconds to deploy on Heroku, but on App Runner, it took roughly 3 to 5 minutes. I thought to myself, maybe I’ll get used to it. Perhaps it will be faster once I dockerize it, or maybe there are some caching options that I can utilize. I decided to give it another chance.

So, I continued working on my app, pushing updates every few minutes, and so far, every build succeeded. But then… I saw a “Rollback Successful” message. I clicked on the deployment logs to investigate, and here’s what I found:

05-31-2023 12:04:04 PM \[AppRunner\] Failed to deploy your application source code.

05-31-2023 12:00:40 PM \[AppRunner\] Starting to build your application source code.

The deployment failed, and there were no logs available to help me debug the issue. There’s an open issue on GitHub that has been around for over a year, but there doesn’t seem to be a solution in sight.

Afterwards, I connected the same repository to Heroku and received feedback that helped me resolve the issue, at least on Heroku’s side. However, App Runner is still failing to deploy.

Rant aside, now I’d like to ask: are any of you currently using App Runner in production? Have you encountered similar issues? Or perhaps you gave up on it due to similar reasons? Is Fargate any better?

Thank you all!

I need to preface this by saying that I am probably not a typical r/aws user - I’m a backend dev who only recently started branching in to devops and am therefore learning for the first time about the specifics of AWS even though I’ve been deploying things to ec2 for a long time now.

From my perspective, the more “bundled up” an AWS service is, the more frustrating it is to actually use in production. I imagine some of this comes from actual complexity that becomes opaque and obtuse, like your “Rollback Successful” message with no logs. Some of it probably comes from AWS culture which relies heavily on certain repeated patterns that I haven’t quite grok’ed yet, and you may have something similar going there.

As far as Fargate goes, I can say I was able to recently (yesterday) get my first Fargate nginx service up and running using terraform in about a half an hour using chatgpt and cross-referencing with the docs. It was an absurd amount of tf code compared to the 10 or so lines of yaml it would take in a k8s cluster, mostly due to having to set up the load balancers and target groups and health checks, etc… but once the boilerplate was done, the actual process of deploying it with terraform was totally painless. Pretty much instant. I don’t know how much of that was thanks to the terraform aws provider covering the inconsistencies in the API vs how much was fargate being well made, but… yeah, I think fargate was pretty good. Haven’t touched App Runner and a quick look at it now makes me feel like it’s not something I would want to use. ECS+Fargate is really solid.

Hopefully others can give a more experienced answer.

never used AppRunner. My experience with AWS stuff is that the more things it does or the more “specialized” it is, the bigger mess it is. For example, Aurora RDS is a shitshow and I would not use it again over just normal RDS.

Fargate is fine but I only used it for a short while before I found that I needed to fine tune a lot more than what it could do, switched to EKS but that’s probably overkill for what you are describing and not that cheap. Eventually landed on DigitalOcean kubernetes which was better priced for me. Sounds like you should try Fargate or if Heroku works just keep using that.

Aurora RDS is a shitshow

Always happy to see others confirming my biases! You can basically go through the list of supposed advantages Aurora has over plain Postgres and disprove every one of them in about 5 minutes of testing. My favorite recent discovery is that a controlled failover does not kick out connections to the old primary–this is failover 101 stuff! Lol.

We’ve recently switched away from Terraform to CDK, and it’s quite a bit easier to use in my opinion.

But in order to define VPVs, route tables, load balancers and so on there will just always be a bunch of boilerplate.

What did you need to fine tune?

I’m not looking to defend Fargate, it’s a basic container runner that works when it works.

But fine tuning is always where there’s something interesting to be learned.

I’m currently holding off bringing in CDK simply because I’m leveraging some cross-cloud terraform provider action and I don’t know if CDK has much to help in that scenario. For instance, I use AWS SecretsManager to connect to my email provider (protonmail) and my vpn service (tailscale), and probably others soon too.

I personally expect I will someday migrate to something like Pulumi instead and build it all as a single integrated python package, down to and including using dagger.io for CI/CD.

I just don’t see CDK plugging in to that… am I wrong? It’s definitely top of my mind these days so I appreciate your thoughts.

Gave up, it’s why for this kind of service I go to an other provider that can scale to zero if you see what i mean… Anyway you should dockerize it, it’s easier to debug and run everywhere.

Which aspects of CDK you find easier to use? Haven’t really used it myself. Just formatted to always use Terraform already.

CDK can do some wild things, where you can customise how parameters are gathered and applied to an absurd degree. This is also it’s biggest challenge. Some programmer can go absolutely batshit writing these weird construct libraries that magically define your infrastructure and gets it provisioned, but it requires some insight into how that developer did that to modify it later.

CDK is basically just whatever programming language you prefer that it supports, that gets executed, and which methods are called against the CDK SDK emits Cloudformation code. So if you can program it, you can do it.

An example from our CDK codebase, where we define all our CodeBuild and Pipeline projects, we basically have this (accept some pseudocode):

var gitRepos = await LoadOrgRepos(“github-org-name”);
foreach(var repo in gitRepos)
{
codeBuild.Create(repo.Name, buildscript: “./build.yaml”);
}

The codeBuild object is a class we’ve defined ourselves, that exposes a method that creates a CodeBuild project according to the way we want them made, creating the roles, policies and what have you.

The damn thing will even look into the repo via githubs apis, to check which type of project it is according to a convention defined by us.

So, whenever someone creates a new github repo, we run this CDK application and it provisions everything needed on the AWS Build Account.

The advantage is that the DevOps guys just need to maintain the CodeBuild class we’ve created that wraps AWS’s CodeBuild constructs, and the other developers just need to call a method on that class.

So CDK is VERY powerful in that regard, but it’s also possible to code yourself into a corner with it if you’re not careful.

Terraform is much more forgiving in that regard. When you open up a Terraform solution, you’re most likely going to have a good idea what you’re looking at.

With CDK, you’re at the mercy of the developer who wrote the CDK project, and it might very well actually require you to be a software developer.

The pros and cons are extremes at both ends really.

It was more that I had a pretty complicated deployment where I needed precise control over routing, pinning, websockets, etc and I found that I needed to use k8s with a custom ingress to get the level of control I wanted. Fargate for just hosting the services itself was fine

CDKTF is nice

Oh really. That’s good to know. I was thinking about using Aurora RDS Serverless it in a new project.

Yeah I do. Using for a backend api.

Didn’t do what you’re doing with using the apprunner.yaml. Opted to go the image route with automatic deployment via ECR.

Ran into the rollback/deployment failures. Lack of good error logs is the main culprit. In my case, the issue was the image architecture. Was pushing images built from my M1 Mac and AppRunner is based on linux/x86. I don’t know how I figured that out but that was my main culprit.

Once I got the app running, it’s been smooth sailing for me

Thanks for the explanation. Feels more like moving from expressing infrastructure as code to programming infrastructure. Neat!

Yeah that’s a good way to put it.

I highly recommend taking a look at CDK at some point. Usually the argument against it is that it isn’t multi cloud, but in my opinion you’re never going to just run the same terraform scripts against another cloud provider, and then magically you got the same shit running. That notion is absurd unless all you’re doing is provisioning a Kubernetes cluster or something.

If you’re knee deep in Amazons proprietary products, you might as well consider CDK if you’re not already invested something else.

Greetings , I’m part of the App Runner team. We are hard at work addressing many of the challenges you have identified. We value your feedback. The best place to get our attention is through our public roadmap and from the official AWS support channels. https://github.com/aws/apprunner-roadmap

Some of the items regarding fast fail, logging and configuration - we have inflight in our roadmap . Your experience is important to us. If you are curious about our public roadmap

In the first ~2.5 months of 2023 (01/06 - 03/16) …
14 cards moved to Just Shipped status.
15 other card status changes occurred.
In the subsequent ~2 months (03/17 - today, 05/19) …
1 card moved to Just Shipped status (1.5 months ago) and more are on their way.

AppRunnerYogi

I would love to hear your thoughts on the mentioned issue: When creating a new app in App Runner, if the creation fails, you need to delete it and start over. This is not a minor omission but rather a foundational feature that should have been included from day one. Any PaaS platform has this ability; it’s not even considered a feature—it is simply expected to be present without explicit mention.

As we are considering a migration from Render to App Runner, I’ve spent about two days of create, delete, create, delete…

This absence raises significant concerns about the level of attention given to App Runner and whether we should trust the service and its future. It would be greatly appreciated if you could provide some insight into this issue and offer information to reassure us regarding a migration to App Runner.

I would not recommend apprunner for anything. Multiple times I’ve had to tell stakeholders that an update isn’t getting released as planned. Deployment is like a lottery, maybe it will succeed, maybe it will roll back and give you 0 logs on the matter. A failed image may be deployed successfully later, or maybe not, enjoy!

Kubernetes

Doesn’t the argument “multi-cloud” imply having terraform used for cross-cloud infrastructure setup? Of course, native services like azure bicep and aws cdk will have some edge when working with their respective providers.