Deploying a Flask application to AWS

An end-to-end example using Amazon’s Elastic Beanstalk and RDS

Scott Rodkey
10 min readJan 17, 2015

(Note: Updated Jan 2019 with latest AWS interfaces)

Flask is awesome. It’s the easiest way to learn web development. Start small, and then you can quickly add any upgrades you need — email, databases, forms, etc.

Amazon Web Services is fantastic. There are a ton of cloud platforms out there, but none are more flexible than AWS. It seems like you can do anything on Amazon — host websites, create scalable databases, send emails, text messages, stream live video from your home — the possibilities are endless.

The two seem like a natural fit. Create a killer Flask app and then push it to AWS. Easy, right?

But there are a surprising lack of examples on the web. The official documentation is recommended, but lacks visuals which can help beginners.

Don’t get me wrong, there are some good blog posts that help with common stumbling blocks. But I couldn’t find an end-to-end example for deploying a Flask application to AWS.

So here’s a step-by-step tutorial that will launch your Flask application to AWS Elastic Beanstalk. It also uses AWS RDS for a database backend.

Let’s dive in:

Step 0: Create an AWS account

What are you waiting for? Sign up!

--

--