SlideShare a Scribd company logo
1 of 47
Download to read offline
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS re:INVENTM a n a g e Y o u r A p p l i c a t i o n s w i t h A W S E l a s t i c B e a n s t a l k
J e f f H o f f m a n | D i r e c t o r , S o f t w a r e D e v e l o p m e n t
A W S E l a s t i c B e a n s t a l k
A d h i r a j S i n g h | S r . P r o d u c t M a n a g e r
A W S E l a s t i c B e a n s t a l k
D E V 3 0 5
N o v e m b e r 2 8 , 2 0 1 7
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Agenda
• Why did we build AWS Elastic Beanstalk?
• What does Elastic Beanstalk do?
• Getting started with Elastic Beanstalk
• Walkthrough/demo
• Popular use cases
• Q&A
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Why did we build Elastic Beanstalk?
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Developer challenges
• Complexity of deploying code, provisioning,
and managing infrastructure
• Expertise and time needed to manage and
configure servers, databases, load balancers,
firewalls, and networks
• How to automate application scaling
• Lack of consistency across teams
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
What is Elastic Beanstalk?
Elastic Beanstalk is an easy-to-use service for
deploying, scaling, and managing web applications
and services
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Elastic Beanstalk benefits
Fast and simple
to begin
Developer
productivity/agility
Impossible
to outgrow
Complete
resource control
No additional charge to use Elastic Beanstalk—you pay only for underlying AWS
resources (i.e., EC2 instances, Amazon S3, etc.)
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
On-instance configuration
Your code
HTTP server
Application server
Language interpreter
Operating system
Host
Elastic Beanstalk configures each
Amazon EC2 instance in your
environment with the components
necessary to run applications for
the selected platform
Focus on building your application
Provided by you
Provided and managed by Elastic Beanstalk
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
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)
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Building blocks
Application
Application versions ( v1, v2, …,vn)
Environment 1 Environment 2 Environment … n
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Getting started with AWS Elastic Beanstalk
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
How to deploy applications
1. Via AWS Management Console
2. Via AWS Toolkit for Eclipse and Visual
Studio IDE
3. Via AWS SDKs and AWS CLI
4. Via Elastic Beanstalk command line
interface
$ eb deploy
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Information required to deploy application
01
02
03
04
Region
Platform type
Single Instance
Load Balanced
with Auto ScalingOR
Database (RDS)
Your code
Optional
Supported Platforms
Custom Platforms
Create and use your own
custom platform
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Walkthrough/demo
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Brief/requirement from the management
Rick Mathew,
27, Sr. Web Developer
Made-up Storage Solution Inc.
• Made-up StorageCon event in 6 months
• Create a website to accept registration—participant names, email
addresses
• Deadline—4 weeks
• Scope of features may increase
• Limited budget
• Once launched, no downtime
• Long-term potential:
• Used for every summit/event in the future
• Host content from summits/events
• May eventually evolve into a training portal
Let’s meet Rick
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Version Control
Build/
Compile
Code
Dev
Unit Test
App Code
Ops
Test Setup
Prod Setup
Dev Setup
Application
Write
App Code
Infrastructure
tar, war, zip
yum, rpm
Deploy
App
Package
Application
Deploy application
only
Deploy infrastructure
only
AMI
Build
AMIs
Validate
Templates
Write
Infra Code
Deploy
Infras
Deployment
Artifact Repository
CloudFormation
Rick’s concerns
Too many things to do
Rick’s anxiety scale
Week 1
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Rick gives Elastic Beanstalk CLI a try
D e p l o y i n g a p p l i c a t i o n
Initial application deployment workflow
$ eb init
Create your Elastic Beanstalk app01
Follow the prompts to configure the
environment
02
03 Create the resources and launch the
application
$ eb create
U p d a t i n g a p p l i c a t i o n
Update application workflow
Update your code01
$ git add .
$ git commit –m “v2.0”
$ eb deploy
Add and commit code to repository02
Open application after deployment
completes
03
$ eb open
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Rick’s questions Rick’s anxiety scale
Week 1
Configuration flexibility (e.g., database management options)
How easy is it to manage infrastructure and applications?
What are the scaling options?
How to monitor and debug applications?
?01
02
03
04
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Elastic Beanstalk:
Managing infrastructure and applications
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Version Control
Build/
Compile
Code
Dev
Unit Test
App Code
Ops
Test Setup
Prod Setup
Dev Setup
Application
Write
App Code
Infrastructure
tar, war, zip
yum, rpm
Deploy
App
Package
Application
Deploy application
only
Deploy infrastructure
only
AMI
Build
AMIs
Validate
Templates
Write
Infra Code
Deploy
Infras
Deployment
Artifact Repository
AWS CloudFormation
Rick’s concern: Infrastructure stack
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Elastic Beanstalk-supported platforms
Platform Options
Puma, Passenger, Tomcat
Preconfigured
Generic
Single Container
Multi Container
Resources
Proxy
Tools
Language
(npm version)
AMI
Platform components
Infrastructure resources with
default configuration
Nginx 1.12.1, Apache 2.4.27
Git (2.13.5), AWS X-Ray (2.0.0)
8.8.1 (5.4.2), 8.4.0 (5.3.0),
7.10.1 (4.2.0), 6.11.5 (3.10.10),
6.11.1 (3.10.10), 5.12.0 (3.8.6),
4.8.5 (2.15.11), 4.8.4 (2.15.11
2017.09.1
Example:
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Managed Platform Update (auto-patching)
Configure your environment to automatically upgrade to the latest version of a platform during a scheduled
maintenance window
Key benefits:
 Automated upgrades
 Bug and vulnerability fixes
 Latest versions of language,
framework, and AMI
 Latest features
Key features:
• Choose your maintenance window
• Choose between minor and patch updates
• No downtime
• No impact on capacity
• Flexibility to manually update
• Instance replacement
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Version Control
Build/
Compile
Code
Dev
Unit Test
App Code
Ops
Test Setup
Prod Setup
Dev Setup
Application
Write
App Code
Infrastructure
tar, war, zip
yum, rpm
Deploy
App
Package
Application
Deploy application
only
Deploy infrastructure
only
AMI
Build
AMIs
Validate
Templates
Write
Infra Code
Deploy
Infras
Deployment
Artifact Repository
CloudFormation
Rick’s concern: Application management
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS
CodeBuild
AWS
CodeCommit
AWS
CodePipeline
AWS
CodeCommit
Elastic Beanstalk
Environment
AWS
CodeStar
Development Source Build Test Production
Elastic Beanstalk: CI/CD options
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Application deployment options
Recommended
deployment option
Need for
deployment speed
Need for
high availability
Setup type Production/Staging Test Development
High
High
Rolling with
additional
batches
Low
Immutable
Medium
High
Rolling
(default)
Low
Rolling
(default)
Low
High
All at
Once
Low
Rolling
(default)
Demo
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Rick’s anxiety scale

Rick’s questions
Configuration flexibility (e.g., database management options)
How easy is it to manage infrastructure and applications?
What are the scaling options?
How to monitor and debug applications?
?
01
02
03
04
Week 2
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Elastic Beanstalk:
Resource and configuration flexibility
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
EBextensions
├───.ebextensions
│ ├───extension1.config
│ └───extension2.confg
├───.elasticbeanstalk
│ └─── config.yml
├───app.js
└───package.json
Ebextensions categories
Option_settings
Resource
Sample application archive
 Modify/customize the application or configuration stack
 YAML formatted with a .config file extension
 Folder must be at the root of the archive
 Configure AWS resources in your environment
 Configure software that runs your application
 Define additional AWS resources beyond the functionality provided by configuration
options
 Configure any resource supported by AWS CloudFormation
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Database management options
Rick’s Environment Rick’s
Environment 2
Amazon
DynamoDB
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Rick’s anxiety scale
Rick’s questions

Configuration flexibility (e.g., database management options)
How easy is it to manage infrastructure and applications?
What are the scaling options?
How to monitor and debug applications?
?
01
02
03
04
 Week 2
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Elastic Beanstalk: Scaling options
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Elastic Beanstalk-managed scaling
Scaling options
Trigger-based scaling
• Trigger measurement
(CPU utilization, network traffic, disk
activity, instance health)
• Trigger statistic
• Measurement period
• Upper/Lower Thresholds
• Breach scale increments
Time-based scaling
• Min/Max instance
• Occurrence (One-time, Recurrent)
• Recurrence (CRON expression- 30 8
* * 3)
Demo Slide
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Rick’s anxiety scale
Rick’s questions

Configuration flexibility (e.g., database management options)
How easy is it to manage infrastructure and applications?
What are the scaling options?
How to monitor and debug applications?
01
02
03
04


?
Week 3
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Monitoring, logging, and alarms
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Monitoring
Environment Dashboard
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Alarms and notifications
• Elastic Beanstalk uses CloudWatch for monitoring and alarms
• Easy to set up alarms to automatically monitor critical metrics and send notifications
when metrics are outside normal operating range
• Easy to enable Amazon Route 53 health checks and alarms
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Logs
• Tail logs are the last 100 lines of the most
commonly used log files
• Bundle logs are the Full Logs
• Log rotation to Amazon S3
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
CloudWatch Log streaming:
Stream logs in real time from Elastic Beanstalk-managed Amazon EC2 instance to CloudWatch
Logs
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Rick’s anxiety scale
Rick’s questions

Configuration flexibility (e.g., database management options)
How easy is it to manage infrastructure and applications?
What are the scaling options?
How to monitor and debug applications?
01
02
03
04


 Week 4
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Rick’s team deploys to production—
and the application is live
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Elastic Beanstalk: Popular use cases
Websites
API
backends
Mobile
backends
Asynchronous
workers
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Q&A
Key links
Elastic beanstalk resources:
http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/RelatedResources.html
Sample application:
https://github.com/awslabs/eb-node-express-sample
Load testing with Locust:
https://aws.amazon.com/blogs/devops/using-locust-on-aws-elastic-beanstalk-for-distributed-load-generation-and-testing/
https://github.com/awslabs/eb-locustio-sample
Troubleshooting tips:
http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/troubleshooting.html
Tutorials and samples:
http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/tutorials.html
Additional:
Deployment options:
http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.deploy-existing-version.html
Managed Updates:
http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environment-platform-update-managed.html
http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/iam-servicerole.html#iam-servicerole-update
Configuring Auto Scaling:
http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.managing.as.html
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Thank you!

More Related Content

What's hot

What's hot (19)

MSC202_Learn How Salesforce Used ADCs for App Load Balancing for an Internati...
MSC202_Learn How Salesforce Used ADCs for App Load Balancing for an Internati...MSC202_Learn How Salesforce Used ADCs for App Load Balancing for an Internati...
MSC202_Learn How Salesforce Used ADCs for App Load Balancing for an Internati...
 
DEV325_Application Deployment Techniques for Amazon EC2 Workloads with AWS Co...
DEV325_Application Deployment Techniques for Amazon EC2 Workloads with AWS Co...DEV325_Application Deployment Techniques for Amazon EC2 Workloads with AWS Co...
DEV325_Application Deployment Techniques for Amazon EC2 Workloads with AWS Co...
 
ARC201_Scaling Up to Your First 10 Million Users
ARC201_Scaling Up to Your First 10 Million UsersARC201_Scaling Up to Your First 10 Million Users
ARC201_Scaling Up to Your First 10 Million Users
 
GPSBUS220-Refactor and Replatform .NET Apps to Use the Latest Microsoft SQL S...
GPSBUS220-Refactor and Replatform .NET Apps to Use the Latest Microsoft SQL S...GPSBUS220-Refactor and Replatform .NET Apps to Use the Latest Microsoft SQL S...
GPSBUS220-Refactor and Replatform .NET Apps to Use the Latest Microsoft SQL S...
 
CTD403_Supercharge Your Websites with the Power of Lambda@Edge
CTD403_Supercharge Your Websites with the Power of Lambda@EdgeCTD403_Supercharge Your Websites with the Power of Lambda@Edge
CTD403_Supercharge Your Websites with the Power of Lambda@Edge
 
MBL309_User Engagement, Messaging, and Analytics Using Amazon Pinpoint from A...
MBL309_User Engagement, Messaging, and Analytics Using Amazon Pinpoint from A...MBL309_User Engagement, Messaging, and Analytics Using Amazon Pinpoint from A...
MBL309_User Engagement, Messaging, and Analytics Using Amazon Pinpoint from A...
 
DEV204_Debugging Modern Applications Introduction to AWS X-Ray
DEV204_Debugging Modern Applications Introduction to AWS X-RayDEV204_Debugging Modern Applications Introduction to AWS X-Ray
DEV204_Debugging Modern Applications Introduction to AWS X-Ray
 
GPSTEC322-GPS Creating Your Virtual Data Center VPC Fundamentals Connectivity...
GPSTEC322-GPS Creating Your Virtual Data Center VPC Fundamentals Connectivity...GPSTEC322-GPS Creating Your Virtual Data Center VPC Fundamentals Connectivity...
GPSTEC322-GPS Creating Your Virtual Data Center VPC Fundamentals Connectivity...
 
DAT341_Working with Amazon ElastiCache for Redis
DAT341_Working with Amazon ElastiCache for RedisDAT341_Working with Amazon ElastiCache for Redis
DAT341_Working with Amazon ElastiCache for Redis
 
GPSTEC306-Continuous Compliance for Healthcare and Life Sciences
GPSTEC306-Continuous Compliance for Healthcare and Life SciencesGPSTEC306-Continuous Compliance for Healthcare and Life Sciences
GPSTEC306-Continuous Compliance for Healthcare and Life Sciences
 
GPSTEC319-Build Once Deploy Many Architecting and Building Automated Reusable...
GPSTEC319-Build Once Deploy Many Architecting and Building Automated Reusable...GPSTEC319-Build Once Deploy Many Architecting and Building Automated Reusable...
GPSTEC319-Build Once Deploy Many Architecting and Building Automated Reusable...
 
CTD302_How Hulu reinvented Television using the AWS Cloud
CTD302_How Hulu reinvented Television using the AWS CloudCTD302_How Hulu reinvented Television using the AWS Cloud
CTD302_How Hulu reinvented Television using the AWS Cloud
 
DAT317_Migrating Databases and Data Warehouses to the Cloud
DAT317_Migrating Databases and Data Warehouses to the CloudDAT317_Migrating Databases and Data Warehouses to the Cloud
DAT317_Migrating Databases and Data Warehouses to the Cloud
 
Storage State of the Union - STG201 - re:Invent 2017
Storage State of the Union - STG201 - re:Invent 2017Storage State of the Union - STG201 - re:Invent 2017
Storage State of the Union - STG201 - re:Invent 2017
 
DEV328_DevOps Lessons from Courser a Site Performance, Reliability, and Devel...
DEV328_DevOps Lessons from Courser a Site Performance, Reliability, and Devel...DEV328_DevOps Lessons from Courser a Site Performance, Reliability, and Devel...
DEV328_DevOps Lessons from Courser a Site Performance, Reliability, and Devel...
 
NET304_Deep Dive into the New Network Load Balancer
NET304_Deep Dive into the New Network Load BalancerNET304_Deep Dive into the New Network Load Balancer
NET304_Deep Dive into the New Network Load Balancer
 
Building Best Practices and the Right Foundation for your 1st Production Work...
Building Best Practices and the Right Foundation for your 1st Production Work...Building Best Practices and the Right Foundation for your 1st Production Work...
Building Best Practices and the Right Foundation for your 1st Production Work...
 
Launch Applications the Amazon Way - AWS Online Tech Talks
Launch Applications the Amazon Way - AWS Online Tech TalksLaunch Applications the Amazon Way - AWS Online Tech Talks
Launch Applications the Amazon Way - AWS Online Tech Talks
 
GPSTEC312-SAP HANA HA on AWS Preventing Production Facepalms
GPSTEC312-SAP HANA HA on AWS Preventing Production FacepalmsGPSTEC312-SAP HANA HA on AWS Preventing Production Facepalms
GPSTEC312-SAP HANA HA on AWS Preventing Production Facepalms
 

Similar to DEV305_Manage Your Applications with AWS Elastic Beanstalk.pdf

Similar to DEV305_Manage Your Applications with AWS Elastic Beanstalk.pdf (20)

Building Web Apps on AWS
Building Web Apps on AWSBuilding Web Apps on AWS
Building Web Apps on AWS
 
Leo Zhadanovsky - Building Web Apps with AWS CodeStar and AWS Elastic Beansta...
Leo Zhadanovsky - Building Web Apps with AWS CodeStar and AWS Elastic Beansta...Leo Zhadanovsky - Building Web Apps with AWS CodeStar and AWS Elastic Beansta...
Leo Zhadanovsky - Building Web Apps with AWS CodeStar and AWS Elastic Beansta...
 
ARC205_Born in the Cloud
ARC205_Born in the CloudARC205_Born in the Cloud
ARC205_Born in the Cloud
 
CON203_Driving Innovation with Containers
CON203_Driving Innovation with ContainersCON203_Driving Innovation with Containers
CON203_Driving Innovation with Containers
 
Driving Innovation with Containers - CON203 - re:Invent 2017
Driving Innovation with Containers - CON203 - re:Invent 2017Driving Innovation with Containers - CON203 - re:Invent 2017
Driving Innovation with Containers - CON203 - re:Invent 2017
 
DevOps on AWS
DevOps on AWSDevOps on AWS
DevOps on AWS
 
DevOps on AWS
DevOps on AWSDevOps on AWS
DevOps on AWS
 
DEV326_DevOps Essentials An Introductory Workshop on CICD Practices
DEV326_DevOps Essentials An Introductory Workshop on CICD PracticesDEV326_DevOps Essentials An Introductory Workshop on CICD Practices
DEV326_DevOps Essentials An Introductory Workshop on CICD Practices
 
Build a Java Spring Application on Amazon ECS - CON332 - re:Invent 2017
Build a Java Spring Application on Amazon ECS - CON332 - re:Invent 2017Build a Java Spring Application on Amazon ECS - CON332 - re:Invent 2017
Build a Java Spring Application on Amazon ECS - CON332 - re:Invent 2017
 
Born in the Cloud, Built like a Startup
Born in the Cloud, Built like a StartupBorn in the Cloud, Built like a Startup
Born in the Cloud, Built like a Startup
 
IOT311_Customer Stories of Things, Cloud, and Analytics on AWS
IOT311_Customer Stories of Things, Cloud, and Analytics on AWSIOT311_Customer Stories of Things, Cloud, and Analytics on AWS
IOT311_Customer Stories of Things, Cloud, and Analytics on AWS
 
透過最新的 AWS 服務在 2019 年為您的業務轉型 (Level 200)
透過最新的 AWS 服務在 2019 年為您的業務轉型 (Level 200)透過最新的 AWS 服務在 2019 年為您的業務轉型 (Level 200)
透過最新的 AWS 服務在 2019 年為您的業務轉型 (Level 200)
 
Migrating Microsoft Workloads to AWS
Migrating Microsoft Workloads to AWSMigrating Microsoft Workloads to AWS
Migrating Microsoft Workloads to AWS
 
Amazon ECS Deep Dive
Amazon ECS Deep DiveAmazon ECS Deep Dive
Amazon ECS Deep Dive
 
Amazon Amazon Elastic Container Service (Amazon ECS)
Amazon Amazon Elastic Container Service (Amazon ECS)Amazon Amazon Elastic Container Service (Amazon ECS)
Amazon Amazon Elastic Container Service (Amazon ECS)
 
Learn how to build serverless applications using the AWS Serverless Platform-...
Learn how to build serverless applications using the AWS Serverless Platform-...Learn how to build serverless applications using the AWS Serverless Platform-...
Learn how to build serverless applications using the AWS Serverless Platform-...
 
GPSWKS404-GPS Game Changing C2S Services To Transform Your Customers Speed To...
GPSWKS404-GPS Game Changing C2S Services To Transform Your Customers Speed To...GPSWKS404-GPS Game Changing C2S Services To Transform Your Customers Speed To...
GPSWKS404-GPS Game Changing C2S Services To Transform Your Customers Speed To...
 
Scaling Up to Your First 10 Million Users
Scaling Up to Your First 10 Million UsersScaling Up to Your First 10 Million Users
Scaling Up to Your First 10 Million Users
 
規劃大規模遷移到 AWS 的最佳實踐
規劃大規模遷移到 AWS 的最佳實踐規劃大規模遷移到 AWS 的最佳實踐
規劃大規模遷移到 AWS 的最佳實踐
 
Automate and Scale Configuration Management with AWS OpsWorks - DEV331 - re:I...
Automate and Scale Configuration Management with AWS OpsWorks - DEV331 - re:I...Automate and Scale Configuration Management with AWS OpsWorks - DEV331 - re:I...
Automate and Scale Configuration Management with AWS OpsWorks - DEV331 - re:I...
 

More from Amazon Web Services

Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
Amazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
Amazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
Amazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
Amazon Web Services
 

More from Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

DEV305_Manage Your Applications with AWS Elastic Beanstalk.pdf

  • 1. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS re:INVENTM a n a g e Y o u r A p p l i c a t i o n s w i t h A W S E l a s t i c B e a n s t a l k J e f f H o f f m a n | D i r e c t o r , S o f t w a r e D e v e l o p m e n t A W S E l a s t i c B e a n s t a l k A d h i r a j S i n g h | S r . P r o d u c t M a n a g e r A W S E l a s t i c B e a n s t a l k D E V 3 0 5 N o v e m b e r 2 8 , 2 0 1 7
  • 2. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Agenda • Why did we build AWS Elastic Beanstalk? • What does Elastic Beanstalk do? • Getting started with Elastic Beanstalk • Walkthrough/demo • Popular use cases • Q&A
  • 3. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Why did we build Elastic Beanstalk?
  • 4. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Developer challenges • Complexity of deploying code, provisioning, and managing infrastructure • Expertise and time needed to manage and configure servers, databases, load balancers, firewalls, and networks • How to automate application scaling • Lack of consistency across teams
  • 5. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. What is Elastic Beanstalk? Elastic Beanstalk is an easy-to-use service for deploying, scaling, and managing web applications and services
  • 6. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Elastic Beanstalk benefits Fast and simple to begin Developer productivity/agility Impossible to outgrow Complete resource control No additional charge to use Elastic Beanstalk—you pay only for underlying AWS resources (i.e., EC2 instances, Amazon S3, etc.)
  • 7. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. On-instance configuration Your code HTTP server Application server Language interpreter Operating system Host Elastic Beanstalk configures each Amazon EC2 instance in your environment with the components necessary to run applications for the selected platform Focus on building your application Provided by you Provided and managed by Elastic Beanstalk
  • 8. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 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)
  • 9. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Building blocks Application Application versions ( v1, v2, …,vn) Environment 1 Environment 2 Environment … n
  • 10. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Getting started with AWS Elastic Beanstalk
  • 11. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. How to deploy applications 1. Via AWS Management Console 2. Via AWS Toolkit for Eclipse and Visual Studio IDE 3. Via AWS SDKs and AWS CLI 4. Via Elastic Beanstalk command line interface $ eb deploy
  • 12. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Information required to deploy application 01 02 03 04 Region Platform type Single Instance Load Balanced with Auto ScalingOR Database (RDS) Your code Optional Supported Platforms Custom Platforms Create and use your own custom platform
  • 13. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Walkthrough/demo
  • 14. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Brief/requirement from the management Rick Mathew, 27, Sr. Web Developer Made-up Storage Solution Inc. • Made-up StorageCon event in 6 months • Create a website to accept registration—participant names, email addresses • Deadline—4 weeks • Scope of features may increase • Limited budget • Once launched, no downtime • Long-term potential: • Used for every summit/event in the future • Host content from summits/events • May eventually evolve into a training portal Let’s meet Rick
  • 15. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Version Control Build/ Compile Code Dev Unit Test App Code Ops Test Setup Prod Setup Dev Setup Application Write App Code Infrastructure tar, war, zip yum, rpm Deploy App Package Application Deploy application only Deploy infrastructure only AMI Build AMIs Validate Templates Write Infra Code Deploy Infras Deployment Artifact Repository CloudFormation Rick’s concerns Too many things to do Rick’s anxiety scale Week 1
  • 16. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Rick gives Elastic Beanstalk CLI a try D e p l o y i n g a p p l i c a t i o n Initial application deployment workflow $ eb init Create your Elastic Beanstalk app01 Follow the prompts to configure the environment 02 03 Create the resources and launch the application $ eb create U p d a t i n g a p p l i c a t i o n Update application workflow Update your code01 $ git add . $ git commit –m “v2.0” $ eb deploy Add and commit code to repository02 Open application after deployment completes 03 $ eb open
  • 17. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Rick’s questions Rick’s anxiety scale Week 1 Configuration flexibility (e.g., database management options) How easy is it to manage infrastructure and applications? What are the scaling options? How to monitor and debug applications? ?01 02 03 04
  • 18. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Elastic Beanstalk: Managing infrastructure and applications
  • 19. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Version Control Build/ Compile Code Dev Unit Test App Code Ops Test Setup Prod Setup Dev Setup Application Write App Code Infrastructure tar, war, zip yum, rpm Deploy App Package Application Deploy application only Deploy infrastructure only AMI Build AMIs Validate Templates Write Infra Code Deploy Infras Deployment Artifact Repository AWS CloudFormation Rick’s concern: Infrastructure stack
  • 20. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Elastic Beanstalk-supported platforms Platform Options Puma, Passenger, Tomcat Preconfigured Generic Single Container Multi Container Resources Proxy Tools Language (npm version) AMI Platform components Infrastructure resources with default configuration Nginx 1.12.1, Apache 2.4.27 Git (2.13.5), AWS X-Ray (2.0.0) 8.8.1 (5.4.2), 8.4.0 (5.3.0), 7.10.1 (4.2.0), 6.11.5 (3.10.10), 6.11.1 (3.10.10), 5.12.0 (3.8.6), 4.8.5 (2.15.11), 4.8.4 (2.15.11 2017.09.1 Example:
  • 21. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Managed Platform Update (auto-patching) Configure your environment to automatically upgrade to the latest version of a platform during a scheduled maintenance window Key benefits:  Automated upgrades  Bug and vulnerability fixes  Latest versions of language, framework, and AMI  Latest features Key features: • Choose your maintenance window • Choose between minor and patch updates • No downtime • No impact on capacity • Flexibility to manually update • Instance replacement
  • 22. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Version Control Build/ Compile Code Dev Unit Test App Code Ops Test Setup Prod Setup Dev Setup Application Write App Code Infrastructure tar, war, zip yum, rpm Deploy App Package Application Deploy application only Deploy infrastructure only AMI Build AMIs Validate Templates Write Infra Code Deploy Infras Deployment Artifact Repository CloudFormation Rick’s concern: Application management
  • 23. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS CodeBuild AWS CodeCommit AWS CodePipeline AWS CodeCommit Elastic Beanstalk Environment AWS CodeStar Development Source Build Test Production Elastic Beanstalk: CI/CD options
  • 24. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Application deployment options Recommended deployment option Need for deployment speed Need for high availability Setup type Production/Staging Test Development High High Rolling with additional batches Low Immutable Medium High Rolling (default) Low Rolling (default) Low High All at Once Low Rolling (default)
  • 25. Demo
  • 26. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Rick’s anxiety scale  Rick’s questions Configuration flexibility (e.g., database management options) How easy is it to manage infrastructure and applications? What are the scaling options? How to monitor and debug applications? ? 01 02 03 04 Week 2
  • 27. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Elastic Beanstalk: Resource and configuration flexibility
  • 28. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. EBextensions ├───.ebextensions │ ├───extension1.config │ └───extension2.confg ├───.elasticbeanstalk │ └─── config.yml ├───app.js └───package.json Ebextensions categories Option_settings Resource Sample application archive  Modify/customize the application or configuration stack  YAML formatted with a .config file extension  Folder must be at the root of the archive  Configure AWS resources in your environment  Configure software that runs your application  Define additional AWS resources beyond the functionality provided by configuration options  Configure any resource supported by AWS CloudFormation
  • 29.
  • 30. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Database management options Rick’s Environment Rick’s Environment 2 Amazon DynamoDB
  • 31.
  • 32. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Rick’s anxiety scale Rick’s questions  Configuration flexibility (e.g., database management options) How easy is it to manage infrastructure and applications? What are the scaling options? How to monitor and debug applications? ? 01 02 03 04  Week 2
  • 33. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Elastic Beanstalk: Scaling options
  • 34. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Elastic Beanstalk-managed scaling Scaling options Trigger-based scaling • Trigger measurement (CPU utilization, network traffic, disk activity, instance health) • Trigger statistic • Measurement period • Upper/Lower Thresholds • Breach scale increments Time-based scaling • Min/Max instance • Occurrence (One-time, Recurrent) • Recurrence (CRON expression- 30 8 * * 3)
  • 36. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Rick’s anxiety scale Rick’s questions  Configuration flexibility (e.g., database management options) How easy is it to manage infrastructure and applications? What are the scaling options? How to monitor and debug applications? 01 02 03 04   ? Week 3
  • 37. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Monitoring, logging, and alarms
  • 38. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Monitoring Environment Dashboard
  • 39. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Alarms and notifications • Elastic Beanstalk uses CloudWatch for monitoring and alarms • Easy to set up alarms to automatically monitor critical metrics and send notifications when metrics are outside normal operating range • Easy to enable Amazon Route 53 health checks and alarms
  • 40. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Logs • Tail logs are the last 100 lines of the most commonly used log files • Bundle logs are the Full Logs • Log rotation to Amazon S3
  • 41. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. CloudWatch Log streaming: Stream logs in real time from Elastic Beanstalk-managed Amazon EC2 instance to CloudWatch Logs
  • 42. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Rick’s anxiety scale Rick’s questions  Configuration flexibility (e.g., database management options) How easy is it to manage infrastructure and applications? What are the scaling options? How to monitor and debug applications? 01 02 03 04    Week 4
  • 43. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Rick’s team deploys to production— and the application is live
  • 44. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Elastic Beanstalk: Popular use cases Websites API backends Mobile backends Asynchronous workers
  • 45. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Q&A
  • 46. Key links Elastic beanstalk resources: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/RelatedResources.html Sample application: https://github.com/awslabs/eb-node-express-sample Load testing with Locust: https://aws.amazon.com/blogs/devops/using-locust-on-aws-elastic-beanstalk-for-distributed-load-generation-and-testing/ https://github.com/awslabs/eb-locustio-sample Troubleshooting tips: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/troubleshooting.html Tutorials and samples: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/tutorials.html Additional: Deployment options: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.deploy-existing-version.html Managed Updates: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environment-platform-update-managed.html http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/iam-servicerole.html#iam-servicerole-update Configuring Auto Scaling: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.managing.as.html
  • 47. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Thank you!