Archive · · 11 min read

How a New User Can Run Just One Container in the AWS Cloud…Maybe

As a new user in the AWS Cloud, what does it take to get one container up and running? What service do you user? How many steps are there? This post explores that question.

How a New User Can Run Just One Container in the AWS Cloud…Maybe

Picture this, you’re a new user in the AWS Cloud and you want to run just one, single, solitary container—a package containing all the pieces needed to run your app. It might be for a few seconds, maybe the better part of an hour, perhaps even 24/7.

How do you go about it? Where do you start? What services should you use?

In this—admittedly lengthy—Twitter thread, I attempt to tackle this problem and find out a lot about containers in the AWS Cloud along the way…

Tweet 1/44 👇 Next tweet

I start with a search. the first result is straight forward and promising

I click on "Containers on AWS"

☁️🧵 #cloud #devops

Tweet 2/44 👇 Next tweet 👆 Start

I land here. it's not bad though a bit of a pitch, "AWS is the #1 place for you to run containers and 80% of all containers in the cloud run on @awscloud" << but will MINE?!?

☁️🧵 #cloud #devops

Tweet 3/44 👇 Next tweet 👆 Start

scrolling down the page, I hit the jackpot. honestly, I want to print this table out on a massive poster board and parade it around the @awscloud offices

this makes it easier to understand all that's on offer

☁️🧵 #cloud #devops

Tweet 4/44 👇 Next tweet 👆 Start

these two are the most promising...

1. AWS Fargate => "Run containers without managing servers" 2. AWS Lightsail => "Run simple containerized applications for a fixed, monthly price"

but which one?

☁️🧵 #cloud #devops

Tweet 5/44 👇 Next tweet 👆 Start

I click through to the AWS Fargate landing page, https://aws.amazon.com/fargate/

"#Serverless compute for containers" is very promising, I'm going to scroll down to learn more

☁️🧵 #cloud #devops

Tweet 6/44 👇 Next tweet 👆 Start

this diagram confirms(?) my hopes. very simple process:

1. Build the container image 2. Define memory & CPU 3. Run & manage the application 4. Pay for what I use

☁️🧵 #cloud #devops

Tweet 7/44 👇 Next tweet 👆 Start

I scroll back up to the top and click that tempting orange button...

☁️🧵 #cloud #devops

Tweet 8/44 👇 Next tweet 👆 Start

...and I'm immediately dumped into something called Amazon Elastic Container Service

um, @awscloud, is this the right place? the word "Fargate" appears NO WHERE on this page

☁️🧵 #cloud #devops

Tweet 9/44 👇 Next tweet 👆 Start

ok, maybe it's a broken link. I'll search for "AWS Fargate" in the search bar

down near the bottom there is some documentation about Fargate but nothing is "Services" or "Features"

☁️🧵 #cloud #devops

Tweet 10/44 👇 Next tweet 👆 Start

I'll search again, this time with a less specific term...just "fargate"

better? still no direct link but I do see the "ECS" service from before so maybe that was correct

there are more docs and KB links this time

☁️🧵 #cloud #devops

Tweet 11/44 👇 Next tweet 👆 Start

several steps in and NO IDEA HOW I ACTUALLY LAUNCH A CONTAINER in @awscloud

☁️🧵 #cloud #devops

Tweet 12/44 👇 Next tweet 👆 Start

stepping back and calming down, I revisit the ECS page that the "Get Started with AWS Fargate" bright orange call-to-action button took me too

the blue "Get started" button takes me to this page...that says the actual word "Fargate" on it

☁️🧵 #cloud #devops

Tweet 13/44 👇 Next tweet 👆 Start

this diagram of @awscloud ECS objects is supposed to help but it & the 4 step process on the left are intimidating

Fargate seemed to be "give it a container & press go" & this is anything but

step 3 is "cluster", do I have to worry about that?!??!

☁️🧵 #cloud #devops

Tweet 14/44 👇 Next tweet 👆 Start

ignoring the "custom" option, I select the "sample-app" container & leave everything else as the default. at this point, I just want to see if I can get ANYTHING running in Fargate

I click the blue "Next" button

☁️🧵 #cloud #devops

Tweet 15/44 👇 Next tweet 👆 Start

I'm brought to "Step 2" which helpfully updates the diagram to show that I've defined a container and a "task"

I know have to configure a "service" and then a "cluster"

there are options here but I leave them and boldly click "Next"...

☁️🧵 #cloud #devops

Tweet 16/44 👇 Next tweet 👆 Start

that worked? I'm on to step 3 "cluster"

the word "cluster" is so insanely far from #serverless that I don't want to get into it here

again, a few options that I don't want to care about to create something I don't want to create

"Next" for the win?

☁️🧵 #cloud #devops

Tweet 17/44 👇 Next tweet 👆 Start

I have reached the "review" screen to review choices I don't have the context or desire to actually understand

if I click the blue "Create" button at the bottom of the page, will this launch?

☁️🧵 #cloud #devops

Tweet 18/44 👇 Next tweet 👆 Start

I have an uneasy feeling in my stomach as this seems like a whole lot of infrastructure to build & pay for to run a single container through a "#serverless" service

☁️🧵 #cloud #devops

Tweet 19/44 👇 Next tweet 👆 Start

I am not hopeful that this is what I want ☁️🧵 #cloud #devops

Tweet 20/44 👇 Next tweet 👆 Start

lots of things have finished building. 9 things to run my "#serverless" container and one of them MIGHT even be that container though the language ("task") makes that unclear ☁️🧵 #cloud #devops

Tweet 21/44 👇 Next tweet 👆 Start

the blue "View service" button takes me to the ECS console under "Cluster"

the launch type if "FARGATE" which at least gives me a hint that I have taken the route I wanted to

☁️🧵 #cloud #devops

Tweet 22/44 👇 Next tweet 👆 Start

looking at the Logs for this Service in this Cluster, it appears that the container has launched and it accepting HTTP requests

how do I contact that HTTP server? no idea

is this a container? I think but that word DOES NOT APPEAR anywhere on this page

☁️🧵 #cloud #devops

Tweet 23/44 👇 Next tweet 👆 Start

so, way more steps than I wanted into this and I MIGHT have accomplished the "simple" task of running a single container in @awscloud Fargate

can this container receive requests? no idea

how much did this cost? no idea

☁️🧵 #cloud #devops

Tweet 24/44 👇 Next tweet 👆 Start

ok, can I clean this up and then try the other route, @awscloud Lightsail?

I click back up to the cluster I never wanted to create or have anything to do with & it appears that I can simply delete it

☁️🧵 #cloud #devops

Tweet 25/44 👇 Next tweet 👆 Start

I think it's working...

☁️🧵 #cloud #devops

Tweet 26/44 👇 Next tweet 👆 Start

ok, ~3m later & all the things I never wanted to complete the task I might have done are now gone...I hope

over the @awscloud Lightsail...

☁️🧵 #cloud #devops

Tweet 27/44 👇 Next tweet 👆 Start

well, Good Morning!

this is night and day from the last path I took...and yes, I realize that this is targeted at a different audience but you wouldn't know that if you started on the "Containers on AWS" page like I did

Tweet 28/44 👇 Next tweet 👆 Start

☁️🧵 #cloud #devops

Tweet 29/44 👇 Next tweet 👆 Start

omg, is that an explanation of what a container is? right in place? with actual context?!?!?

I can learn more or "Create a container service" ...not sure why the word "service" is tacked on there but, ok...

☁️🧵 #cloud #devops

Tweet 30/44 👇 Next tweet 👆 Start

IS THIS CREATED BY THE SAME COMPANY?

@awscloud please have this team re-design all of the consoles. this is crystal clear & user-friendly

☁️🧵 #cloud #devops

Tweet 31/44 👇 Next tweet 👆 Start

this pg also (finally) explains the "service" term, could be a bit clearer

"A deployment specifies the containers you want to launch on your container service, and their configuration."

so, a service can be more than one container

☁️🧵 #cloud #devops

Tweet 32/44 👇 Next tweet 👆 Start

I click on the "Set up deployment" link...

looks like I can specify my customer container right here by clicking the "Specify a custom deployment" option

☁️🧵 #cloud #devops

Tweet 33/44 👇 Next tweet 👆 Start

I'm not going to do that right now, I'll just stick with the sample "Hello World" in order to better compare to @awscloud Fargate/ECS

☁️🧵 #cloud #devops

Tweet 34/44 👇 Next tweet 👆 Start

OMG, it used the word "Container"!

☁️🧵 #cloud #devops

Tweet 35/44 👇 Next tweet 👆 Start

I leave everything as the default and click this enticing, orange, "Create container service" button...

☁️🧵 #cloud #devops

Tweet 36/44 👇 Next tweet 👆 Start

TOO. MUCH. CLARITY. 🤣

☁️🧵 #cloud #devops

Tweet 37/44 👇 Next tweet 👆 Start

I'm honestly taken aback. this page 👆 clearly shows the status of the deployment, the public domain (auto-magically created for me), the endpoint, the versions, everything I could want to know about my container

☁️🧵 #cloud #devops

Tweet 38/44 👇 Next tweet 👆 Start

once the deployment finished (~3m), I was able to click on the tabs to see my current settings for sizing, domain, and metrics

I can even change the size or domain here. though for a new domain, it does look like I'll have to use another @awscloud service

☁️🧵 #cloud #devops

Tweet 39/44 👇 Next tweet 👆 Start

there's also a handy "Metrics" section to monitor the performance of my container

☁️🧵 #cloud #devops

Tweet 40/44 👇 Next tweet 👆 Start

critically, I also can simply click the "Public domain" link and get the response from my "Hello World" container

success!

☁️🧵 #cloud #devops

Tweet 41/44 👇 Next tweet 👆 Start

now for pricing. more on that at https://aws.amazon.com/lightsail/pricing/

all of those prices + the console are listed as per month

however, the service actually bills per hour

you'll need a little math to figure it out but it's pretty cheap way to run a container

☁️🧵 #cloud #devops

Tweet 42/44 👇 Next tweet 👆 Start

to summarize: @awscloud Fargate is actually ECS with little-to-no #ux indicators for ppl trying to actually launch a container. lots of perceived overhead even though it's billed as #serverless

☁️🧵 #cloud #devops

Tweet 43/44 👇 Next tweet 👆 Start

Lightsail aims to compete with VPS/hosting services but is actually an excellent way to run one-off containers (and 24/7 instances). lots of options for expansion and even an API/CLI too

it's worth exploring for these types of simple jobs!

/☁️🧵 #cloud #devops

Tweet 44/44 👇 Next tweet 👆 Start

as I dive deeper, super impressed with the @awscloud Lightsail service. docs are clear and open for contribution!

https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-creating-container-images

☁️ #cloud #devops

Read next