Archive · · 8 min read

How To Run Just One Container With AWS App Runner…Hopefully

As a new user in the AWS Cloud, is AWS App Runner the service that'll get your one container up and running quickly? This post explores that question.

How To Run Just One Container With AWS App Runner…Hopefully

I recently explored the new user experience of launching just one container in the AWS Cloud. It didn’t go particularly smoothly.

Now, I did achieve the goal of running a single container but it took a lot of missteps and lot of confusing steps to get things up and running.

As a result of that effort, a lot of people suggested I try AWS App Runner. The service has a tag line of, “Production web applications at scale made easy for developers.”

That’s definitely intimidating and doesn’t imply “run just one container.” But if you’ve ever explored the service, it’s definitely a good fit for this task.

In this twitter thread (re-posted here), I once again put on my new user hat 🧢 and took a look at this AWS service, documenting my experiences as I went.

Have a look 👇 and let me know what you think on Twitter, where I’m @marknca.

Tweet 1/33 👇 Next tweet

after my epic #containers on @awscloud rant the other day, I had a LOT of ppl tell me I should've used App Runner

that's 100% fair as it it the service that probably makes the most sense

☁️🧵 #cloud #devops

Tweet 2/33 👇 Next tweet 👆 Start

btw, this thread is available as a page (probably more usable) at ...

https://markn.ca/2021/how-to-run-just-one-container-with-aws-app-runner-hopefully/

☁️🧵 #cloud #devops

Tweet 3/33 👇 Next tweet 👆 Start

the original twitter thread is available at 👇

now, to put on my new user 🧢 and I'm off on my @awscloud App Runner adventure!

☁️🧵 #cloud #devops

https://twitter.com/marknca/status/1433473472269750276

Tweet 4/33 👇 Next tweet 👆 Start

on the "Containers on AWS" page, App Runner is the last entry in the excellent & much appreciated table

its description?

"Build and run containerized applications on a fully managed service"

that is what I want to do...assuming I can run just 1 container

☁️🧵 #cloud #devops

Tweet 5/33 👇 Next tweet 👆 Start

not a great description in the console's universal search

"Build and run production web applications at scale" << no mention of "containers" at all 😔

...but the containers page said this was the way. I solider on...

☁️🧵 #cloud #devops

Tweet 6/33 👇 Next tweet 👆 Start

the landing page is pretty standard for an @awscloud service

it serves it's purpose & actually mentions "containers" which is nice

☁️🧵 #cloud #devops

Tweet 7/33 👇 Next tweet 👆 Start

I like the clear pricing on compute and storage costs. that's important to know up front

don't like is the extra 💵 as "automatic deployments" and "build" are different vectors that I need to account for that could be pricey & complicated quickly

☁️🧵 #cloud #devops

Tweet 8/33 👇 Next tweet 👆 Start

I click on the orange "Create an App Runner service" to get started but only because it's under the "Get started with App Runner" header

I just want to launch a container, not create a whole new service...

"service" sounds heavy, which I'm trying to avoid

☁️🧵 #cloud #devops

Tweet 9/33 👇 Next tweet 👆 Start

I'm on step 1/3 (according to the left hand side). those steps:

1. Source & deployment 2. Configure service 3. Review & create

...seems straightforward enough

☁️🧵 #cloud #devops

Tweet 10/33 👇 Next tweet 👆 Start

right out of the gate, it looks like I can deploy from source as well. that echoes back to the "build" pricing thing

I only want to run a single container, so I stick with the clear "Container registry" option

I pick "Amazon ECR Public" as the provider

☁️🧵 #cloud #devops

Tweet 11/33 👇 Next tweet 👆 Start

I'll use the "hello-app-runner" container from the public registry as it seems appropriate for this effort

https://gallery.ecr.aws/aws-containers/hello-app-runner

I copy the URI from the page to paste into the "Container Image URI" field in App Runner

☁️🧵 #cloud #devops

Tweet 12/33 👇 Next tweet 👆 Start

sidenote: while accurate, does URI bother everyone else too? I figured we'd all just given up on it and defaulted to URL and considered that a victory given that it's almost in the mainstream vocabulary now

more at https://danielmiessler.com/study/difference-between-uri-url/

☁️🧵 #cloud #devops

Tweet 13/33 👇 Next tweet 👆 Start

back in App Runner, I leave the "Deployment trigger" set to "Manual" and then click that enticing, orange Next button

☁️🧵 #cloud #devops

Tweet 14/33 👇 Next tweet 👆 Start

that drops me into step 2, configure service

thankfully a lot of this page is under toggle switches making these options accessible but not "in my face"

☁️🧵 #cloud #devops

Tweet 15/33 👇 Next tweet 👆 Start

I enter my "Service name" as "HelloWorld", leave everything else as-is, and click the orange Next button...

☁️🧵 #cloud #devops

Tweet 16/33 👇 Next tweet 👆 Start

this brings me to the "Review" page, also known as step 3/3

throwing caution to the wind, I scroll down and click the orange "Create & deploy" button

is this what I want? maybe...

should I do it?

☁️🧵 #cloud #devops

Tweet 17/33 👇 Next tweet 👆 Start

I click... ☁️🧵 #cloud #devops

Tweet 18/33 👇 Next tweet 👆 Start

...and despite trying to make that sound exciting, I'm greeted by the standard "we're doing something you asked for" details page for an App Runner Service 🤣

☁️🧵 #cloud #devops

Tweet 19/33 👇 Next tweet 👆 Start

☁️🧵 #cloud #devops

Tweet 20/33 👇 Next tweet 👆 Start

well that took about 5.5 minutes

☁️🧵 #cloud #devops

Tweet 21/33 👇 Next tweet 👆 Start

now the great news, I have a "Default domain" automatically assigned to my container

I load it up in my browser and...success!

☁️🧵 #cloud #devops

Tweet 22/33 👇 Next tweet 👆 Start

ok, I'm feeling good about this. if I flip back to App Runner, on the Service (ugh) detail page, I get tabs for:

- Activity - Logs - Configuration - Metrics - Custom domains

...looks like there's lot of flexibility here

☁️🧵 #cloud #devops

Tweet 23/33 👇 Next tweet 👆 Start

I've got some nice metrics filling in already. of course not super useful given that I've only loaded the page a handful of times and the container doesn't do anything else

but FUTURE me might use this 😉

☁️🧵 #cloud #devops

Tweet 24/33 👇 Next tweet 👆 Start

the Configuration tab provides access to all of those settings that I ignored earlier. it would be worth the time to dig in and figure out which ones can be changed after launching

☁️🧵 #cloud #devops

Tweet 25/33 👇 Next tweet 👆 Start

I ❤️ the Logs tab (don't judge me, they're useful!). nice to be able to do some simple searching here and then dive into CloudWatch for more complex work

nice touch

☁️🧵 #cloud #devops

Tweet 26/33 👇 Next tweet 👆 Start

ok, first impressions are very positive. once you know about this service and what it does, it's very straight forward

there's a good amount of flexibility but the default path is very smooth & requires minimal effort

biggest challenge: naming (again)

☁️🧵 #cloud #devops

Tweet 27/33 👇 Next tweet 👆 Start

in @awscloud App Runner your create "Services", what are those? = one or more containers

"Services" might tie to micro services but it obscures the core msg that App Runner runs Containers (btw, so does the name)

☁️🧵 #cloud #devops

Tweet 28/33 👇 Next tweet 👆 Start

honestly, this service should probably be called "@awscloud Container Runner" or something like that.

but I have to be quiet here...

if you say 3 better names for an AWS service, @QuinnyPig appears behind you in the mirror

☁️🧵 #cloud #devops

Tweet 29/33 👇 Next tweet 👆 Start

ok, so this seems to be a very simple service for running containers

...oh, maybe @awscloud Simple Container Service?

(damn it, that's 2x)

☁️🧵 #cloud #devops

Tweet 30/33 👇 Next tweet 👆 Start

pricing seems reasonable. it's listed as per hour but actually charges at per second (except for the add-ons)

https://aws.amazon.com/apprunner/pricing/

☁️🧵 #cloud #devops

Tweet 31/33 👇 Next tweet 👆 Start

the documentation and criteria for having App Runner build from source isn't great

the docs are at https://docs.aws.amazon.com/apprunner/latest/dg/service-source-code.html

...it seems like it'll only do python and node.js runtimes which is ok but not amazing

☁️🧵 #cloud #devops

Tweet 32/33 👇 Next tweet 👆 Start

but, I'll cut them a break 👆 since the service only launched in the spring of 2021

https://docs.aws.amazon.com/apprunner/latest/relnotes/release-2021-05-18-apprunner-release.html

bringing on new runtimes probably isn't easy...but the existing docs need to get better asap or no one will use that feature

☁️🧵 #cloud #devops

Tweet 33/33 👇 Next tweet 👆 Start

wrapping up, this was a much better experience once I was in the service. simple, straight forward, reasonable pricing scheme 😀

finding this one and linking it to containers was again, harder than it needed to be especially for new users 😔

/☁️🧵 #cloud #devops

Read next