Elastic Beanstalk

An Introduction to Amazon Elastic Beanstalk

Let’s start with an important question: What is Elastic Beanstalk?

Elastic Beanstalk is a service offered by Amazon which makes it easy to quickly deploy applications using AWS resources.

Think about the traditional way of creating an application to deploy on AWS. First, we need to create the infrastructure. Second, we need to create a pipeline to deploy our code to that infrastructure. We also need to make sure that the new code can be deployed to a testing, Q&A, or other environments, before going to production. We have to have the infrastructure for all of those environments, which means we need to have the knowledge and resources to create that infrastructure.

What if you’re just trying to test a prototype really quickly? What if you don’t have any infrastructure engineers on your team? The developers will have to learn how to deploy resources, and how to set up those pipelines. Instead of creating features, they’re bogged down in the details. Elastic Beanstalk aims to solve that problem. Using Elastic Beanstalk, we can deploy our code and the service will automatically provision our capacity, set up our load balancing and auto scaling, as well as configure monitoring and anything else necessary to glue it all together.

We can use the default configurations, or we can customize our own configs to fit our needs. Once our environments are up, we can even access all of the resources as if we created them ourselves (SSH into instances, for example).

If we have updates to push out, no problem – we can choose a deployment method that fits our requirements best, and we can use that method to push new versions of our code.

What is Supported on Elastic Beanstalk?

We have access to quite a few different languages:

  • Java
  • .NET
  • PHP
  • Node.js
  • Python
  • Ruby
  • Go

We can also use Docker, webservers like Apache, IIS (for Windows Server), Nginx, Passenger, Puma, and even Apache Tomcat.

When it comes to deploying applications, we can use Git, or we can use IDEs like Eclipse and Visual Studio, where we literally can deploy our application from the IDE without having to touch the AWS console or command line interface. Of course, we can also upload applications manually if they are WAR files (for Java), or ZIP archives.

When Does It Make Sense to Use Elastic Beanstalk?

Knowing what we know now, when does it make sense to use Elastic Beanstalk, and when does it not make sense?

Using Elastic Beanstalk is great if we’re trying to stay away from creating and managing our own infrastructure. This could be a huge benefit if we don’t have anyone on staff who knows enough to quickly set things up, and allocating resources to learn could be better spent on creating features. As mentioned earlier, it can also be beneficial if we’re testing a prototype and need a quick way to deploy it.

With that being said, we don’t get as much control over our resources as if we had created the environment from scratch or using something like Terraform or OpsWorks. If we need or want that extra control and flexibility, then Elastic Beanstalk may only help us temporarily. We could still use it to quickly prototype and create different environments for dev, staging, QA, and any other stage, and then evolve out of that if we need to.

Core Components

Now, let’s take a look at some of the core components of Elastic Beanstalk before wrapping up.

The first main component is the application itself. An application in Elastic Beanstalk is a collection of components like environments, versions, and configurations. All of those together form the application.

The second core component is the application version. The version is part of an application, but each version is unique, and applications can have multiple different unique versions. This is nice because it gives us the ability to deploy multiple different versions in different stages like staging, QA, pre-deployment, and deployment. We can test the different versions to make sure that we are ready to move forward to the next stage.

The third component is the environment. An environment is a version that is deployed with AWS resources. So we have the application version which we can deploy like we just talked about, and when we deploy it against AWS resources, we get an environment.

Speaking of environments, we have environment configurations. These are the settings and parameters that define the environment and resources we want to have. Like we were saying earlier, we do get some flexibility and control over our resources, and this is part of what gives us that flexibility.

And finally, we have the configuration templates. These templates are used to create repeatable environment configurations.

Learning Hands-on

Learning concepts is great, and is often a necessary step to understanding how tools or services work. With that being said, concepts can only take you so far. Learning hands-on is where knowledge really starts to click.

That’s why we take a hands-on approach when creating content at Linux Academy, and that’s why we created features like Live! Labs and lab servers.

It’s also why we created a video lesson which teaches the concepts we just went over and walks you through how to get started with Elastic Beanstalk in the AWS console.

Conclusion

We’ve gone over the essentials of Elastic Beanstalk by talking about what it is and what it does, as well as the languages and platforms which it supports, and the core components we should know about. If you haven’t already, check out the hands-on video walkthrough, and start building!

Christophe Limpalair

Christophe is the Director of Quick Training at the Linux Academy, and prior to that, he created AWS training content. He is passionate about constantly learning and helping others learn. Whenever he's not working on Quick Training, he's usually hosting the ScaleYourCode podcast.

Leave a Reply

Your email address will not be published. Required fields are marked *