Metabase on Elastic Beanstalk
One of the most popular services AWS offers is called EC2, and stands for Elastic Cloud Compute. You can think of these EC2 instances as virtualized servers, and they are building blocks for many of the other services offered. We will be running Metabase on one or more of these EC2 instances and connecting it to a Postgres application database.
While we could deploy these services individually and connect them up, doing so is not easy. This is where the Elastic Beanstalk service comes in handy, and that is what we will use to deploy our Metabase application. The Elastic Beanstalk service abstracts away a lot of the challenges in software deployment, like installing the software, provisioning the database, monitoring the service, and handling spikes in traffic. In that sense, Elastic Beanstalk is similar to Heroku.
Specifically, when we use Elastic Beanstalk to deploy Metabase, it will automatically do the following with just a little bit of configuration:
- Create one EC2 instance to run Metabase on. As more users start using your Metabase instance, more EC2 instances may be created to handle the increased traffic.
- Create another EC2 instance, called a Load Balancer. This will help route traffic evenly across the EC2 instances running Metabase.
- Create a Postgres application database.
- Optionally, keep log files in the AWS S3 storage service.
- Monitor the health of your Metabase instance and alert you when things need attention.
Now that we know a little about what Elastic Beanstalk is, in the next section, we'll learn the quick way to launch Metabase using it. I include this "quick launch" method for readers who want to get Metabase running quickly, and a "best practices" method for readers who want something more suitable for running in a real, functioning, organization. You may choose to do one or both.