AWS Elastic Beanstalk

Elastic Beanstalk is an easy-to-use service for deploying, scaling, and managing web applications and services on AWS without the need of knowing about the infrastructure to run those applications. Simply upload the application, and Elastic Beanstalk automatically handles capacity provisioning, load balancing, scaling, and application health monitoring. Elastic Beanstalk reduces management complexity without any control restrictions.

Currently, Elastic Beanstalk supports applications in .Net, Java, Node.js, PHP, Python, Go and Ruby. However, you can also create and use your own custom platform It builds the selected platform version and provisions AWS resources, to run your application, during deployment.

Elastic Beanstalk can be accessed using the AWS Management Console, the AWS toolkit for Eclipse and Visual Studio, the AWS Command Line Interface (AWS CLI), or eb (Elastic Beanstalk command line interface).

Infrastructure Stack

  • Preconfigured infrastructure
    • Single instance (dev, low cost)
    • Load-balanced, Auto Scaling (production)
  • Web and worker tiers
  • Elastic Beanstalk provisions necessary infrastructure resources, such as the load balancer, Auto Scaling group, security groups, database (optional), etc.
  • Provides a unique domain name for your application (e.g., youapp.regionx.elasticbeanstalk.com)

elasticbeanstalk_1

Managed Platform Update (auto-patching)

With the help of Managed Platform Update you can Configure your environment to automatically upgrade to the latest version of a platform during scheduled maintenance window, with no downtime.

elasticbeanstalk_2

Application Deployment options

elasticbeanstalk_7

  • All at once – Deploys the new version to all instances simultaneously. All instances will be out of service while the deployment occurs.
  • Rolling – Deploys the new version in batches. Each batch is taken out of service during the deployment, thus, reducing capacity by the number of instances in a batch. In Rolling deployment option, Elastic Beanstalk detaches all instances in the batch from the load balancer, deploys the new application version, and then reattaches the instances. Elastic Beanstalk waits until all instances in a batch are healthy before moving on to the next batch. If a batch of instances does not become healthy within the command timeout, the deployment fails.
  • Rolling with additional batch – Deploys the new version in batches, but first launch a new batch of instances to ensure full capacity during the deployment.
  • Immutable – Launch a full set of new instances running the new version of the application in a separate Auto Scaling group, alongside the instances running the old version. If the new instances don’t pass health checks, Elastic Beanstalk terminates them, leaving the original instances untouched.

Alarms and notifications

Elastic Beanstalk uses CloudWatch for monitoring and alarms. It’s really easy to set up alarms to automatically monitor critical metrics and send notifications when metrics are outside normal operating range.

elasticbeanstalk_3

Logs Collection Options

  • Tail logs are the last 100 lines of the most commonly used log files (removes after 15 mins).
  • Bundle logs are the Full Logs (removes after 15 mins).elasticbeanstalk_4
  • Log rotation to Amazon S3.elasticbeanstalk_5
  • CloudWatch Log streaming

You can also stream logs in real time from Elastic Beanstalk-managed Amazon EC2 instance to CloudWatch.

elasticbeanstalk_6

Elastic Beanstalk Use Cases

Elastic Beanstalk can be used to deploy:

  • Websites
  • API Backends
  • Mobile Backends
  • Asynchronous Workers.

Pricing

There is no additional charge for Elastic Beanstalk. You pay only for the underlying AWS resources that your application consumes.

Advertisements

Written by Varun Kumar

Varun works with Microsoft as a Cloud Consultant. He comes with 10+ years of experience into Consultant, Solution Architect, and Delivery Management roles. As a Consultant in Microsoft, his job is to design, develop and deploy enterprise level solutions using Azure, to help organizations to achieve more.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s