Geek Culture

A new tech publication by Start it up (https://medium.com/swlh).

Follow publication

AWS Container Services

Create a simple flask Rest API, containerise it using docker and deploy it as service in Elastic Container Service

Manmohan Singh Bohara
Geek Culture
Published in
5 min readJul 15, 2020

Architecutre

Click the link to subscribe to my articles.

AWS provides container services to deploy and run container applications. One of the services is Elastic Container Service i.e. ECS. In this article, we will see how to create a sample flask RestAPI, containerize it with docker and deploy this docker image to ECS.

Before we start, lets define few terms:

Docker — Docker is a container technology that helps to containerize our applications. Check out here for more details.

Containers — A container is a standard unit of software that packages up code and all its dependencies so the application runs quickly and reliably from one computing environment to another. Check out here for more details.

ECS — Elastic Container Service is an AWS managed service that helps us deploy and run our container applications in the cloud environment. Check out here for more details.

ECR — Elastic Container Registry is a fully-managed docker container registry that makes it easier for developers to store, manage, and deploy docker container images. Check out here for more details.

Now lets create a small flask application and deploy it as container application in AWS ECS.

1. Installation

1.1. Following instructions are for installing docker on ubuntu. For other distributions, please check instructions here :

$ sudo apt-get update -y && sudo apt-get install -y linux-image-extra-$(uname -r)

1.2. Install docker

$ sudo apt-get install docker-ce -y

1.3. Start Docker

$ sudo service docker start

1.4. Verify Docker

$ sudo docker run hello-world

1.5. Create a docker group and add user to group

$ sudo groupadd docker && sudo usermod -aG docker ubuntu

2. Build Simple python application

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Responses (4)

Write a response