Use a public docker image in AWS ECS

Amazon Web Services carefully explain how to use a private docker image in ECS, the Amazon container service. But fails to mention what repository URL to use for a dockerhub public repository. The answer is … none at all. Just the same as the docker CLI, if you specify just namespace/imagename for a container image, ECS will pull it from dockerhub.

Why do I have AWS free tier charges?

The short answer: you left a light turned on somewhere in the world. Turn them all off and you're done.

The longer answer:

  • The AWS free tier covers you for one (1) machine running all month. If you leave one machine running all month, and then have a second machine running for a day, you will pay for that day.

How to incur AWS Free Tier Charges by Mistake

There are 2 easy ways to do this by mistake:

  • You are testing multi-server deployments. With 2 servers running, your free tier is just half the month. The second half of the month will cost you about $15+VAT. As soon as you turn on a second machine you risk overrunning your free tier quota. If like me you accidentally leave 3 or 4 machines switched on for most of a month, then your 'free' tier has suddenly cost you $50.
  • The second is that you have machines in more than one region. Your typical console view hides shows only one region so you can easily forget that you have machines switched on elsewhere in the world.

How do I stop it?

Turn off your machines with Right-Click — Terminate in the EC2 Management console.
If you're repeatedly spinning up test machines, don't forget to do this every-time you finish work.