1. Home
  2. Training Library
  3. Amazon Web Services
  4. Courses
  5. AWS Solutions Architect Associate Level Certification Course: Part 3 of 3

Elastic Beanstalk

Start course
1h 10m

AWS Solutions Architect Associate Level Certification Course - Part 3 of 3

Having completed parts one and two of our AWS certification series, you should now be familiar with basic AWS services and some of the workings of AWS networking. This final course in our three-part certification exam preparation series focuses on data management and application and services deployment.

Who should take this course?

This is an advanced course that's aimed at people who already have some experience with AWS and a familiarity with the general principles of architecting cloud solutions.

Where will you go from here?

The self-testing quizzes of the AWS Solutions Architect Associate Level prep materialis a great follow up to this series...and a pretty good indicator of your readiness to take the AWS exam. Also, since you're studying for the AWS certification, check out our AWS Certifications Study Guide on our blog.


Amazon's Elastic Beanstalk is another AWS tool designed to simplify an otherwise highly complex deployment process. In this case, launching web applications using relatively common software stacks and configuration. But Beanstalk does much more than just provide a pre-provisioned hosting environment. It also makes it easier to monitor and critically scale your applications effectively taking care of the whole infrastructure picture. Leaving you free to focus on your application code and I suppose, theoretically at least, putting us system administrators out of work.

Let's take the AWS Walkthrough orientation tour to see how it works. From the Elastic Beanstalk dashboard, choose an option from the select a platform pull down menu.

We'll go with Python and click launch now. And I'll sit back and watch while Beanstalk creates an application and a new application version built on the walkthrough sample application file.

Beanstalk will then launch an environment into which it will deploy a simple app. Once everything's done, my first Electric Beanstalk application will have been created and its dashboard health indicator icon will turn green. We're ready to go. A quick trip through the EC2 dashboard will reveal that Beanstalk has launched a T1 micro EC2 instance, a load balancer and an auto scaling group. We'll probably be curious enough to visit the application's default environment using the endpoint displayed in the dashboard. You may think I'm being strange, but note the green-based color scheme. Trust me on this one. Back at the default environment dashboard, however, you can see how control over our application configurations we'll have. Click on the configuration link in the navigation panel to the left and notice how configuration elements have been intelligently divided by class.

You can see for instance that our auto scaling has been set to scale according to need between one and four instances. A new instance will be added when the average network output exceeds six megabytes. But six megabytes over what period of time? Let's click on the settings gear to open the scaling console to find out. We'll scroll past the auto scaling settings dialog boxes to the scaling trigger section. The trigger measurement drop down allows you to choose what you'd like to trigger scaling events. In our case, it's set to network output but CPU utilization, disk readings or other metrics are available. Our unit of measurement is set to byte tenths. The upper threshold setting of six million bytes really equals six megabytes. To answer our question, however, we see that the breach duration in effect the amount of time that average network output levels must exceed our upper threshold is set to five minutes.

Obviously all of these setting can be easily adjusted to fit the specific needs of your application. Let's return to the main configuration page to see what other goodies AWS has created for us. The instances section allows us to define and adjust the basic EC2 instance settings.

You can change the instance type or instance security group to control who gets access to our resources and how or add an EC2 key pair for direct SSH access.

The notification section allows us to add an email address to receive event notifications from an SMS topic that'll be automatically generated. AWS really does try to make this process as simple and quick as possible. Software configuration allows you to control the creation and storage of logs, deploy static files through your web service software, and pass environment variables to the application to for instance authenticate access to external data stores. Updates and deployments controls predictably deployments and updates. And the load balancing page allows you to edit the load balancing and health check settings. In general, however, the default settings are going to be perfectly fine for simple deployments.

And knowing that underlines once again how straightforward Beanstalk makes this whole process. Clicking on the request logs button in the logs menu allows you to request either the last 100 lines of logged events or the full log contents.

When we select the last 100 lines, a download link appears, which when clicked takes us to the logged data we ask for.

This obviously can be enormously useful when trying to track down a bug or monitor for suspicious behavior. And speaking of monitoring clicking on the monitoring link will show us a useful summary of recent activity including the ability to set alarm notifications by clicking on the bell icon on the top bar of each graph.

Any alarms that do exist can be managed from the alarms page. The events page lists system events including, in our case, our recent log request. All that shows that our application is happily running. But successfully managing deployments has to include some system of software updates. As you probably figured out on your own, Beanstalk has you covered for that too. As part of their walkthrough, AWS has created a second Python sample application we can download and deploy. Download it to your local computer and rename it PythonSample.zip.

Now back in the Beanstalk console click once again on the my first Elastic Beanstalk application and select default environment. Under running version click upload and deploy. Then click choose file and select the zip package you downloaded.

Note the new version label or create your own and click deploy. The dashboard icon will run around in circles for a bit while the application is being updated. But once it's done, you can once again click on the application endpoint to see what's changed.

A definite improvement we've gone from that awful green to a distinguished blue. Now obviously you'll want to create more substantial upgrades than that working directly on the application files. This simply illustrates how easy it is to manage your infrastructure. The sweat and tears of coding is your department.

Finally we'll demonstrate how to completely remove all elements of our application should the need arise. It's a three step process. Click on the my first Beanstalk Application and then application versions. Select all the versions and then click delete. Now return to the default environment, and click on the actions button on the right, and select terminate environment. Finally delete the application from the main Beanstalk page by clicking on the actions button and selecting delete application.

About the Author
David Clinton
Linux SysAdmin
Learning Paths

David taught high school for twenty years, worked as a Linux system administrator for five years, and has been writing since he could hold a crayon between his fingers. His childhood bedroom wall has since been repainted.

Having worked directly with all kinds of technology, David derives great pleasure from completing projects that draw on as many tools from his toolkit as possible.

Besides being a Linux system administrator with a strong focus on virtualization and security tools, David writes technical documentation and user guides, and creates technology training videos.

His favorite technology tool is the one that should be just about ready for release tomorrow. Or Thursday.