January 31, 2021

Lightsail Containers

Introduction

Recently AWS announced support for containers in their Lightsail service. Lightsail is a service that acted like a traditional VPS type service. Very opinionated and limited capability, but with very simple pricing constructs and really simple approach to get up and running.

With this announcement you can now add containers to Lightsail and it’s really easy to get going.

One issue I did run into, not sure what’s going on is is a continual login to Lightsail 400 error, Request Header or Cookie Too Large.

400 error

I’m using AWS SSO to signin, so that may have something to do with it. As a work around, I have been deleting the cookie in the browser (Google Chrome) which solved my issue for this work. Long term this would be annoying. If I get a chance I’ll see what AWS has to say about it.

Pricing Comparison

Let’s compare the pricing to Fargate. Fargate is the managed container orchestrator for AWS. It comes in two flavours ECS and EKS.

Fargate pricing is, well.. complicated.

Fargate Pricing

Let’s compare the Nano Lightsail container to fargate. The Nano is 512MB, 0.25vCPUs. All containers come with 500GB of data transfer. The Nano is USD$7.

730 * 0.25 * 0.04856 + 730 * 0.5 * 0.00532 = $10.80

And that doesn’t include any data transferred out!

Demo

Let’s create my favourite demo ephemeral password service.

SnapPass is SnapChat for passwords..

We will use two Containers:

Let’s configure the containers:

SnapPass Containers

Once that’s done, configure the public endpoint:

Public Endpoint

This will get the service up and running, and you can now configure a custom domain and certificate. This requires a little bit of configuration with your DNS service provider, but follow the instructions and it’s pretty straight forward.

Custom Domain & Certificate

Conclusion

https://snappass.performancemagic.com/

SnapPass

Lightsail containers makes deploying containers really simple. At this point it looks like it lacks a shared filesystem and if it had something like EFS, then it would be an incredible solution to run containers that also needed to store data (think Wordpress). With scaling and a loadbalancer, it would make a really viable solution to run really simple solutions that can solve lots of business problems.

© Greg Cockburn

Powered by Hugo & Kiss.