Want to easily deploy your Node.js, Ruby, Python, .NET, Tomcat, PHP or Docker web applications to AWS?
AWS Elastic Beanstalk is a service that makes it easy to deploy, scale, and manage your web applications on AWS by providing preconfigured application stacks and managing the underlying infrastructure on your behalf. You simply select the application stack you want and upload your code to get started.
This webinar will familiarize you with how to deploy your web application to AWS using AWS Elastic Beanstalk (EB). We will walk through the steps necessary to debug, test and scale your application to handle millions of web requests. Also, you will learn about deployment options, cost management, and ongoing monitoring and maintenance.
Learning Objectives:
Understand the benefits of AWS Elastic Beanstalk versus do-it-yourself
Deploy a sample Node.js application using the Elastic Beanstalk command line interface
Modify application stack configuration and extend your application to use additional AWS resources (e.g.: DynamoDB, SNS, etc.)
Debug, load test, and scale the sample application to handle millions of web requests
Use deployment options available for zero downtime deployments (in-place and blug/green)
Use tags for cost management
2. After this session, you should be able to:
• Understand the benefits of using AWS Elastic Beanstalk vs. do it yourself
• Deploy a sample Node.js application using the Elastic Beanstalk command
line interface
• Use tags for cost management
• Modify application stack configuration and extend your application to use
additional AWS resources (e.g.: DynamoDB, SNS, etc.)
• Debug, load test, and scale the sample application to handle millions of web
requests
• Use deployment options available for zero downtime deployments (in-place
and blue/green)
• Set up alarms to monitor you running applications
3. AWS Elastic Beanstalk vs. Do It Yourself
• Preconfigured Infrastructure
• Single Instance (Dev, Low Cost)
• Load Balanced, Auto Scaling (Production)
• Web Server & 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.elasticbeanstalk.com)
4. AWS Elastic Beanstalk vs. Do It Yourself
Your code
HTTP Server
Application Server
Language Interpreter
Operating System
Host
Elastic Beanstalk configures
each EC2 instance in your
environment with the
components necessary to run
applications for the selected
platform. No more worrying
about logging into instances to
install and configure you
application stack.
Focus on building your
application
Provided by you
Provided and managed by AWS Elastic Beanstalk (EB)
5. Deployment Options
1. Via AWS Management Console
2. Via Git / EB CLI
3. Via AWS Toolkit for Eclipse and Visual
Studio IDE
$ eb deploy
10. Sample Application Details
How to configure/customize an environment using ebextensions
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers-ec2.html
16. Tag your environments
• Makes it easy to find resources belonging to a given
environment.
• Can be used to monitor costs associated with a given
environment and/or application.
• AWS Elastic Beanstalk automatically tags environments
with:
• Environment Name
• Environment ID
17. Testing/Tuning Your Application
• Make sure to load test your application. Set auto-scaling
minimum and maximum to 1 while load testing. This
ensures that you test and understand how your
application degrades under load.
• Configure auto-scaling trigger to optimize performance
metric (e.g.: latency, number of web request per second,
etc.).
• Tune backend (DynamoDB, RDS, etc.) throughput for
optimal performance leaving enough headroom.
18. Deployment Options
Blue/Green deployments
Pros:
• Fast rollback as environment running the previous version has not been modified in
any way.
• Ensures no state build up on environments.
Cons:
• Longer deployment times (2-5 min.) as new environment must be created.
• Clients (i.e.: mobile devices) may cache DNS addresses and not respect DNS TTL.
This results in staggered/non-deterministic traffic rollover to new environment.
19. Deployment Options
Rolling deployments
Pros:
• Fast deployment times (20-60 sec.)
Cons:
• Slower rollback as previous application version must be re-deployed.
• Possibility of state build up on long running environments.
20. Metrics & Alarms
• Understand metrics available for your environment and
what they mean.
• Setup alarms to automatically monitor critical metrics
and send notifications when metrics are outside normal
operating range.