Getting started with Amazon Elastic Beanstalk

In this tutorial, we are going to learn how to get started with Elastic Beanstalk.

Amazon Elastic Beanstalk is an easy-to-use service for deploying and scaling web applications created with java, .NET, Python, Golang, PHP, Node.js, and Ruby. You can quickly deploy and manage applications in the AWS cloud without worrying about the infrastructure that runs the application.

Benefits of using Amazon Elastic Beanstalk

  • It reduces management complexity. You are only required to upload your app and Elastic Beanstalk automatically handles the details of provisioning, creating a load balancer, scaling, and health monitoring via CloudWatch.
  • Every app is fully scalable because Elastic Beanstalk automatically scales every app smoothly depending on the resources allocated in every instance.
  • Developers have complete infrastructure control.
  • It’s fast and simple to deploy apps using Amazon Elastic Beanstalk.
  • It supports apps written in Go, Java, .NET, Node.js, PHP, Python, and Ruby. This shows that Elastic Beanstalk supports a large base of programming languages.
  • Elastic Beanstalk has a console where you can easily interact with the environment easily.

Getting started with Elastic Beanstalk.

To start deploying your application, follow the following steps.

Sign into your account and choose the region you will like to host your application. On the dashboard search for the Elastic Beanstalk. Click create, this will take you to Elastic Beanstalk getting started page. Input the application name, choose the platform to use, choose the way to create your application and finally click create application. Give it a few minutes for the application to be created.

As an example, we can create an Amazon Elastic Beanstalk using starter by following this link.

During creation, the following is created in the process.

  • An Amazon Elastic Compute Cloud instance is created (EC2)
  • Amazon EC2 Security group is created.
  • An Amazon S3 bucket is created.
  • Amazon CloudWatch alarms
  • Amazon CloudFormation stack
  • A domain name

If you are successful you will see something like the image below.

Elastic Beanstalk health
Elastic Beanstalk health

If your installation passes all the health checks, then if you click on the link saying getting started it will take you to the following page.

nextgentips: EBS welcome page
nextgentips: EBS welcome page

Deploying a new version of the application

Let’s say you have added some features to your application and you want to upgrade the running version on the AWS. This is how you can synchronize changes in your environment.

  1. Download the application that matches the platform you use at the beginning. To get those sample apps use this link In my case, I am using the go platform.
  2. Go to the Elastic Beanstalk console and choose Environment and select your environment. In my case, the name of the environment is called Gettingstartedapp-env.
  3. Click the name of your environment and click on the upload and deploy. Choose the file to upload and click deploy
nextgentips: EBS upload and deploy
nextgentips: EBS upload and deploy

Running a configuration change

Whenever you feel like you are not satisfied with the way the application is running, for example maybe your web application is compute intensive and you would like to reduce the resources, Elastic Beanstalk has to update its environment for changes to take effect.

Changes being made will depend, some will require you to delete the application and recreate while others will effect the changes immediately.

  1. Open Elastic Beanstalk console and click on the environments in order to locate your created
  2. Click Configuration and choose what you will like to edit, for my case let me edit capacity
  3. Choose what you will like to change and click apply.

Terminating the environment

When you are done with the environment, always terminate to avoid extra charges being billed. To delete follow the following.

  1. Go to Applications and choose the name of the app to delete.
  2. In the navigation, pane choose Application versions
  3. When on the Applications versions choose the version you will like to delete.
  4. Choose Actions and then delete
  5. Select Delete versions from Amazon S3
  6. Click delete and wait for it to complete
  7. Then we also need to terminate the environment by going to environment actions and choosing terminate, Confirm that you will like to terminate the instance and click terminate.
  8. Lastly is to delete the app. On the navigation, pane choose the name of the app, choose Actions and Delete Application, confirm that you will like to delete and click on delete button.

Congrats, we have successfully learned how to create, configure, and lastly terminate Amazon Elastic Beanstalk.

About Kipkoech Sang

I am a technology enthusiast who loves to share gained knowledge through offering daily tips as a way of empowering others. I am fan of Linux and all other things open source.
View all posts by Kipkoech Sang →

Leave a Reply

Your email address will not be published.