AWS Elastic Beanstalk
AWS Elastic Beanstalk is an orchestration service offered by Amazon Web Services for deploying applications which orchestrates various AWS services, including EC2, S3, Simple Notification Service, CloudWatch, autoscaling, and Elastic Load Balancers. An AWS Elastic Beanstalk application is a logical collection of Elastic Beanstalk components, including environments, versions, and environment configurations. In Elastic Beanstalk an application is conceptually similar to a folder.
AWS Elastic Beanstalk enables customers to quickly deploy and manage applications in the AWS Cloud. Once customers load any application, Elastic Beanstalk then automatically handles the details of capacity provisioning, load balancing, scaling, and application health monitoring.It enables web applications written in many popular languages and frameworks. Java, .NET, Node.js, PHP, Ruby, Python, Go, and Docker to deploy are the programming languages that customers have.Customers can interact with Elastic Beanstalk using three different methods. The Elastic Beanstalk console, the AWS Command Line Interface (AWS CLI), or eb, a high-level CLI designed specifically for AWS Elastic Beanstalk.
AWS Elastic Beanstalk Features
- AWS Elastic Beanstalk allows customers to deploy their code through the AWS Management Console, Elastic Beanstalk Command Line Interface, Visual Studio, and Eclipse.
- The deployment policies they choose enable them to choose between speed and safety of deploying your applications while reducing the administrative burden.
- AWS Elastic Beanstalk leverages Elastic Load Balancing and Auto Scaling to automatically scale customers applications in and out based on their application’s specific needs.
- Multiple availability zones give options to improve application reliability and availability by running in more than one zone.There is no additional charge for Elastic Beanstalk. You pay only for the underlying AWS resources that your application consumes.Most deployment tasks, such as changing the size of the fleet of Amazon EC2 instances or monitoring an application can be perform directly from the Elastic Beanstalk web interface (console)
- AWS Elastic Beanstalk provides a unified user interface to monitor and manage the health of customers applications.
- The AWS Elastic Beanstalk Health Dashboard allows customers to visualize overall application health and customize application health checks, health permissions, and health reporting in one unified interface.Elastic Beanstalk is integrated with Amazon CloudWatch and AWS X-Ray, because of that monitoring dashboard to view key performance metrics such as latency, CPU utilization, and response codes can be leveraged.
- Customers who use AWS Elastic Beanstalk have the freedom to select the AWS resources, such as Amazon EC2 instance type including Spot instances, that are optimal for your application.
- AWS Elastic Beanstalk allows customers to “open the hood” and retain full control over the AWS resources powering their application.
AWS Elastic Beanstalk Component
The type of instance that client specify determines the hardware of the host computer used for their instance. Each instance type offers different compute, memory, and storage capabilities and are grouped in instance families based on these capabilities. Each instance type provides higher or lower minimum performance from a shared resource.
In AWS Elastic Beanstalk, an application version refers to a specific, labeled iteration of deployable code for a web application. An application version points to an Amazon Simple Storage Service (Amazon S3) object that contains the deployable code, such as a Java WAR file. It is part of an application that can have many versions and each application version is unique. In a running environment, customers have the ability to deploy any application version they already uploaded to the application.
AWS customers need to choose an Elastic Beanstalk environment. When they launch an environment tier. The environment tier designates the type of application that the environment runs, and determines what resources Elastic Beanstalk provisions to support it. An application that serves HTTP requests runs in a web server environment tier. An environment that pulls tasks from an Amazon Simple Queue Service (Amazon SQS) queue runs in a worker environment tier.
A saved configuration is a template that AWS clients can use as a starting point for creating unique environment configurations. Customers can create and modify saved configurations, and apply them to environments, using the Elastic Beanstalk console, EB CLI, AWS CLI, or API. The API and the AWS CLI refer to saved configurations as configuration templates.
- An AWS Elastic Beanstalk application is a logical collection of Elastic Beanstalk components, including environments, versions, and environment configurations. The Elastic Beanstalk application serves as a container for the environments that run web applications, and the versions of web app’s source code, saved configurations, logs, and other artifacts that you create while using Elastic Beanstalk.
- AWS Elastic Beanstalk enables customers to manage all of the resources that run their application as environments. Conceptually this application is similar to a folder.
- An environment is a collection of AWS resources running an application version. Each environment runs only one application version at a time, however, clients have the option to run the same application version or different application versions in many environments simultaneously.
- AWS customers can create and manage separate environments for development, testing, and production use, and can deploy any version of their application to any environment. Environments can be long-running or temporary. For long-running workloads, customers can launch worker environments that process jobs from an Amazon Simple Queue Service (Amazon SQS) queue.
- A platform is a combination of an operating system, programming language runtime, web server, application server, and Elastic Beanstalk components.
- AWS customers are able to design and target their web application to a platform. Elastic Beanstalk provides a variety of platforms that applications can build on.
AWS Elastic Beanstalk supports the following languages and development stacks:
- Apache Tomcat for Java applications
- Apache HTTP Server for PHP applications
- Apache HTTP Server for Python applications
- Nginx or Apache HTTP Server for Node.js applications
- Passenger or Puma for Ruby applications
- Microsoft IIS 7.5, 8.0, and 8.5 for .NET applications
- Java SE
With AWS Elastic Beanstalk customers can:
- Select the operating system that matches the application requirements (e.g., Amazon Linux or Windows Server 2016)
- Choose from several Amazon EC2 instances including On-Demand, Reserved instances, and Spot instances
- Choose from several available database and storage options
- Enable login access to Amazon EC2 instances for immediate and direct troubleshooting
- Quickly improve application reliability by running in more than one Availability Zone
- Enhance application security by enabling HTTPS protocol on the load balancer
- Access built-in Amazon CloudWatch monitoring and getting notifications on application health and other important events
- Adjust application server settings (e.g., JVM settings) and pass environment variables
- Run other application components, such as a memory caching service, side-by-side in Amazon EC2
- Access log files without logging in to the application servers.
Elastic Beanstalk supports the deployment of web applications from Docker containers. With Docker containers, customers can define their own runtime environment. They can choose their own platform, programming language, and any application dependencies (such as package managers or tools), that aren’t supported by other platforms. Docker containers are self-contained and include all the configuration information and software your web application requires to run. All environment variables defined in the Elastic Beanstalk console are passed to the containers.
By using Docker with Elastic Beanstalk, customers have an infrastructure that automatically handles the details of capacity provisioning, load balancing, scaling, and application health monitoring. They can manage the web application in an environment that supports the range of services that are integrated with Elastic Beanstalk, including but not limited to VPC, RDS, and IAM. For more information about Docker, including how to install it, what software it requires, and how to use Docker images to launch Docker containers, go to Docker: the Linux container engine
The Docker platform can be used to deploy a Docker image (described in a Dockerfile or Dockerrun.aws.json definition) and source code to EC2 instances running in an Elastic Beanstalk environment. Use the Docker platform when you only need to run one container per instance. For samples and help getting started with a Docker environment, see Using the Docker platform. For detailed information on the container definition formats and their use, see Docker configuration.
The other generic platform, Multicontainer Docker, uses the Amazon Elastic Container Service to coordinate a deployment of multiple Docker containers to an Amazon ECS cluster in an Elastic Beanstalk environment. The instances in the environment each run the same set of containers, which are defined in a
Dockerrun.aws.json file. Use the multicontainer platform when you need to deploy multiple Docker containers to each instance. For more details on the Multicontainer Docker platform and its use, see Multicontainer Docker environments.
The Multicontainer Docker configuration topic details version 2 of the Dockerrun.aws.json format, which is similar to but not compatible with the version used with the Docker platform. There is also a tutorial available that guides you through a from scratch deployment of a multicontainer environment running a PHP website with an nginx proxy running in front of it in a separate container.
Preconfigured Docker containers
In addition to the two generic Docker platforms, there are several preconfigured Docker platform branches that you can use to run your application in a popular software stack such as Java with GlassFish or Python with uWSGI. Use a preconfigured container if it matches the software used by your application.