In this video, Jeff Winesett discuses the AWS Elastic Beanstalk service. AWS elastic beanstalk is a fully managed environment deployment service. It helps with provisioning highly available and redundant infrastructure for specific application platforms.
- [Instructor] AWS provides several services to assist with implementing elasticity, and in deployment, and configuration management of applications. There are trade-offs between them, depending on the amount of control versus convenience desired. Elastic Beanstalk is on the convenience end of the spectrum. Elastic Beanstalk is an example of one of AWS' fully managed services. It allows you to simply upload an application into AWS, and it takes care of the rest.
It handles provisioning of all the needed resources to run an application in the cloud. It takes care of capacity provisioning, load balancing, auto scaling, and application health monitoring. AWS is continuously adding to the list of platforms supported by Elastic Beanstalk. At this time, Elastic Beanstalk supports the programming languages Java, PHP, Python, Node, Ruby, the .NET environment, Java SE, Docker containers, and Go.
Beanstalk also takes care of automatically pushing application and server logs to S3. One important feature of Elastic Beanstalk is that full control over the AWS resources that have been created is retained. So while Elastic Beanstalk does offer a lot of convenience, and provisions all of the resources, control does not have to be fully relinquished. With Elastic Beanstalk, both the resources supporting the application, and the software running on the instances, can be controlled.
When using Elastic Beanstalk, the first step is to write code. Application code is managed using whatever existing application development process in place. When the application is ready to be deployed, a version is saved with a specific label, such as version 1.0. This version is then stored in an Amazon S3 bucket. For example, an application version might refer to a specific Git deployment of a PHP application.
Elastic Beanstalk provides a number of tools to help with creating application versions. The AWS management console, Git deployment with the command line interface, AWS Toolkit for Visual Studio, and AWS Toolkit for Eclipse can all be used. Once the application version is available in S3, Elastic Beanstalk can deploy it. At which point, Elastic Beanstalk launches it into an environment. An environment represents all of the AWS resources created specifically to run the application.
For example, a load balancer, an auto scaling group, EC2 instances, and the needed security groups. Elastic Beanstalk automatically handles the messy details of provisioning needed capacity, load balancing, auto scaling, and application health monitoring. Elastic Beanstalk will send a notification when it's done creating the environment. And when complete, Elastic Beanstalk provides the application with the URL. This can be typed into a web browser to access the running application.
When updates to the application code are made and a new version is ready to deploy, the new version can be deployed to the existing running environment. This also makes it very easy to roll back to a previous version of your application should that ever be necessary. Part of the convenience Elastic Beanstalk provides is due in part to the many predefined default configuration settings used when creating the environment. However, customizations to the environment and to the software that runs on the EC2 instances can be made.
Default settings can be changed directly in the management console. Settings such as EC2 instance types, adding an RDS or DynamoDB database service, enabling HTTPS on the load balancer, and adjusting auto scaling settings are just a few of the changes that can be made. To alter application settings and software configurations that run on EC2 instances, configuration files can be added to a specifically named folder in the application code versions, which are run upon deployment.
To use configuration files, a folder named .ebextensions is created at the top level of a project source code. Then files with the extension .config are added to specify options, as shown here. For example, when using a load balancer, a URL is often used as the health check for the instances. The load balancer needs to know if an instance is no longer healthy, so it can prevent sending traffic to that bad instance.
The configuration file shown here could be used to tell Elastic Beanstalk to set the application's health check to /healthcheck. This configures the elastic load balancer in the Elastic Beanstalk environment to make an HTTP request to the path, /healthcheck, to each instance to determine whether or not it's healthy. Our example used JSON, but configuration files can be in either YAML or JSON format.
And as an added bonus, there is no additional charge for the AWS Beanstalk services. You only pay for the resources that Elastic Beanstalk launches for you. Implementing elasticity rule number four, consider taking advantage of Elastic Beanstalk to fully manage application deployment and infrastructure in the cloud. And let Beanstalk take care of the scalability, high availability, and high performance requirements.
- Benefits of cloud services
- Making architectures scalable
- Examining cloud constraints
- Virtual servers, EC2, and Elastic IP
- Using the Amazon machine image
- Elastic load balancing
- Using CloudWatch for monitoring
- Security Models
- Elastic block storage
- S3, CloudFront, and Elastic Beanstalk
- Handling queues, workflows, and notifications
- Caching options and services
- Identity and access management
- Creating a custom server image
- Application deployment strategies
- Serverless architectures