Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

🏠 Back to Blog

Elastic Beanstalk

Introduction

  • Developer centric view of deploying an application on AWS
  • Simplifies deploying EC2, ASG, ELB, RDS, etc.
  • Fully managed by AWS

Beanstalk Components

  • Application: A collection of Beanstalk components
  • Application Version: an iteration of your application
  • Environment:
    • collection of AWS resources running an application version
    • Tiers: web server environment and worker environment
    • You can create multiple environments (dev, prod, QA, etc.)

Supported Platforms

  • Multiple languages supported: Go, Python, Java, .NET, Node, PHP, Ruby, Packer Builder,
  • Supports single container docker, multi-container docker, etc.

Deployment Modes

  • Single Instance
    • One EC2 instance
    • Great for dev environments
  • HA with Load Balancer
    • Multiple EC2 instances in ASG
    • Great for prod

Deployment Options

  • All at once
    • fastest, but instances aren’t available to service traffic for a bit (downtime)
  • Rolling
    • A few instances at a time are taken offline and updated
  • Rolling with additional batches
    • Like rolling, but spins up new instances to move the batch
  • Immutable
    • Spins up new instances in a new ASG, deploys versions to these instances, and then swaps all the instances when the new are healthy
  • Blue/Green
    • Create a new environment and switch over when ready
  • Traffic Splitting
    • Like canary testing

Beanstalk Lifecycle Policy

  • Beanstalk can store at most 1000 application versions
  • Versions currently in use cannot be deleted