SlideShare a Scribd company logo
1 of 22
© 2015, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Abhishek Singh, Senior Product Manager – AWS Elastic
Beanstalk
7/29/2015
Deploying and Scaling Web
Application with AWS Elastic
Beanstalk (EB)
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
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)
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)
Deployment Options
1. Via AWS Management Console
2. Via Git / EB CLI
3. Via AWS Toolkit for Eclipse and Visual
Studio IDE
$ eb deploy
Deployment Configuration
Region01
Stack (container) type02
Single Instance
Load Balanced with
auto-scaling
03 OR
Database (RDS)04 Optional
Your code
Deploy Sample Node.js Application
Initial application deployment workflow
$ git clone
https://github.com/awslabs/eb-
node-express-sample.git
Download sample application02
$ eb init
Create your Elastic Beanstalk app03
Follow the prompts to configure the
environment
04
05 Create the resources and launch the
application
$ eb create
$ pip install --upgrade awsebcli
Install the AWS Elastic Beanstalk
command line interface (EB CLI)
01
Update Sample Node.js Application
Update application workflow
Update your code01
$ git add .
$ git commit –m “v2.0”
$ eb deploy
Add & commit code to repository02
Open application once deployment
completes.
03
$ eb open
Demo
Sample Application Details
How to configure/customize an environment using ebextensions
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers-ec2.html
options.config
option_settings:
aws:elasticbeanstalk:customoption:
AlarmEmail: "nobody@amazon.com"
aws:elasticbeanstalk:application:environment:
THEME: "flatly"
AWS_REGION: '`{ "Ref" : "AWS::Region"}`'
STARTUP_SIGNUP_TABLE: '`{ "Ref" : "StartupSignupsTable"}`'
NEW_SIGNUP_TOPIC: '`{ "Ref" : "NewSignupTopic"}`'
aws:elasticbeanstalk:container:nodejs:
ProxyServer: nginx
aws:elasticbeanstalk:container:nodejs:staticfiles:
/static: /static
Sample Application Details
How to add additional AWS resources (e.g.: DynamoDB, SNS, SQS, etc.) using
ebextensions
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environment-resources.html
resources.config
Resources:
StartupSignupsTable:
Type: AWS::DynamoDB::Table
Properties:
KeySchema:
HashKeyElement: {AttributeName: email, AttributeType: S}
ProvisionedThroughput: {ReadCapacityUnits: 1, WriteCapacityUnits: 1}
NewSignupQueue:
Type: AWS::SQS::Queue
NewSignupTopic:
Type: AWS::SNS::Topic
Properties:
Subscription:
- Endpoint:
Fn::GetOptionSetting: {DefaultValue: nobody@amazon.com, OptionName: NewSignupEmail}
Protocol: email
- Endpoint:
Fn::GetAtt: [NewSignupQueue, Arn]
Protocol: sqs
resources.config (cont.)
AllowSNS2SQSPolicy:
Type: AWS::SQS::QueuePolicy
Properties:
PolicyDocument:
Id: PublicationPolicy
Statement:
- Action: ['sqs:SendMessage']
Condition:
ArnEquals:
aws:SourceArn: {Ref: NewSignupTopic}
Effect: Allow
Principal: {AWS: '*'}
Resource:
Fn::GetAtt: [NewSignupQueue, Arn]
Sid: Allow-SNS-SendMessage
Version: '2008-10-17'
Queues:
- {Ref: NewSignupQueue}
Best Practices
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
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.
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.
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.
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.
Demo
AWS July Webinar Series-Deploying and Scaling Web Application with AWS Elastic Beanstalk

More Related Content

What's hot

TLS303 How to Deploy Python Applications on AWS Elastic Beanstalk - AWS re:In...
TLS303 How to Deploy Python Applications on AWS Elastic Beanstalk - AWS re:In...TLS303 How to Deploy Python Applications on AWS Elastic Beanstalk - AWS re:In...
TLS303 How to Deploy Python Applications on AWS Elastic Beanstalk - AWS re:In...
Amazon Web Services
 
Amazon Elastic Beanstalk
Amazon Elastic BeanstalkAmazon Elastic Beanstalk
Amazon Elastic Beanstalk
Eberhard Wolff
 
如何無痛上雲端? 以Elastic Beanstalk Java Container為例
如何無痛上雲端? 以Elastic Beanstalk Java Container為例如何無痛上雲端? 以Elastic Beanstalk Java Container為例
如何無痛上雲端? 以Elastic Beanstalk Java Container為例
Yuen-Kuei Hsueh
 
Deploy PHP Apps on AWS Beanstalk & Deploy with Git
Deploy PHP Apps on AWS Beanstalk & Deploy with GitDeploy PHP Apps on AWS Beanstalk & Deploy with Git
Deploy PHP Apps on AWS Beanstalk & Deploy with Git
Amazon Web Services
 

What's hot (20)

Amazon Web Services - Elastic Beanstalk
Amazon Web Services - Elastic BeanstalkAmazon Web Services - Elastic Beanstalk
Amazon Web Services - Elastic Beanstalk
 
(DVO312) Sony: Building At-Scale Services with AWS Elastic Beanstalk
(DVO312) Sony: Building At-Scale Services with AWS Elastic Beanstalk(DVO312) Sony: Building At-Scale Services with AWS Elastic Beanstalk
(DVO312) Sony: Building At-Scale Services with AWS Elastic Beanstalk
 
RMG206 Introduction to Amazon Elastic Beanstalk - AWS re: Invent 2012
RMG206 Introduction to Amazon Elastic Beanstalk - AWS re: Invent 2012RMG206 Introduction to Amazon Elastic Beanstalk - AWS re: Invent 2012
RMG206 Introduction to Amazon Elastic Beanstalk - AWS re: Invent 2012
 
Agile Deployment using Git and AWS Elastic Beanstalk
Agile Deployment using Git and AWS Elastic BeanstalkAgile Deployment using Git and AWS Elastic Beanstalk
Agile Deployment using Git and AWS Elastic Beanstalk
 
(DVO201) Scaling Your Web Applications with AWS Elastic Beanstalk
(DVO201) Scaling Your Web Applications with AWS Elastic Beanstalk(DVO201) Scaling Your Web Applications with AWS Elastic Beanstalk
(DVO201) Scaling Your Web Applications with AWS Elastic Beanstalk
 
Version Control ThinkVitamin
Version Control ThinkVitaminVersion Control ThinkVitamin
Version Control ThinkVitamin
 
AWS January 2016 Webinar Series - Introduction to Deploying Applications on AWS
AWS January 2016 Webinar Series - Introduction to Deploying Applications on AWSAWS January 2016 Webinar Series - Introduction to Deploying Applications on AWS
AWS January 2016 Webinar Series - Introduction to Deploying Applications on AWS
 
TLS303 How to Deploy Python Applications on AWS Elastic Beanstalk - AWS re:In...
TLS303 How to Deploy Python Applications on AWS Elastic Beanstalk - AWS re:In...TLS303 How to Deploy Python Applications on AWS Elastic Beanstalk - AWS re:In...
TLS303 How to Deploy Python Applications on AWS Elastic Beanstalk - AWS re:In...
 
Amazon Elastic Beanstalk
Amazon Elastic BeanstalkAmazon Elastic Beanstalk
Amazon Elastic Beanstalk
 
AWS July Webinar Series: Introducing AWS OpsWorks for Windows Server
AWS July Webinar Series: Introducing AWS OpsWorks for Windows ServerAWS July Webinar Series: Introducing AWS OpsWorks for Windows Server
AWS July Webinar Series: Introducing AWS OpsWorks for Windows Server
 
DevOps with Elastic Beanstalk - TCCC-2014
DevOps with Elastic Beanstalk - TCCC-2014DevOps with Elastic Beanstalk - TCCC-2014
DevOps with Elastic Beanstalk - TCCC-2014
 
AWS Elastic Beanstalk
AWS Elastic BeanstalkAWS Elastic Beanstalk
AWS Elastic Beanstalk
 
Continuous Delivery with Elastic Beanstalk And CodePipeline on AWS
Continuous Delivery with Elastic Beanstalk And CodePipeline on AWSContinuous Delivery with Elastic Beanstalk And CodePipeline on AWS
Continuous Delivery with Elastic Beanstalk And CodePipeline on AWS
 
AWS: Scaling With Elastic Beanstalk
AWS: Scaling With Elastic BeanstalkAWS: Scaling With Elastic Beanstalk
AWS: Scaling With Elastic Beanstalk
 
PaaSing Your Code Around
PaaSing Your Code AroundPaaSing Your Code Around
PaaSing Your Code Around
 
如何無痛上雲端? 以Elastic Beanstalk Java Container為例
如何無痛上雲端? 以Elastic Beanstalk Java Container為例如何無痛上雲端? 以Elastic Beanstalk Java Container為例
如何無痛上雲端? 以Elastic Beanstalk Java Container為例
 
Docker on AWS
Docker on AWSDocker on AWS
Docker on AWS
 
Getting Started with Docker on AWS
Getting Started with Docker on AWSGetting Started with Docker on AWS
Getting Started with Docker on AWS
 
Continuous Delivery with Docker and Amazon ECS
Continuous Delivery with Docker and Amazon ECSContinuous Delivery with Docker and Amazon ECS
Continuous Delivery with Docker and Amazon ECS
 
Deploy PHP Apps on AWS Beanstalk & Deploy with Git
Deploy PHP Apps on AWS Beanstalk & Deploy with GitDeploy PHP Apps on AWS Beanstalk & Deploy with Git
Deploy PHP Apps on AWS Beanstalk & Deploy with Git
 

Viewers also liked

AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software D...
AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software D...AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software D...
AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software D...
Amazon Web Services
 

Viewers also liked (15)

Accelerating DevOps Pipelines with AWS
Accelerating DevOps Pipelines with AWSAccelerating DevOps Pipelines with AWS
Accelerating DevOps Pipelines with AWS
 
AWS Code{Commit,Deploy,Pipeline} (June 2016)
 AWS Code{Commit,Deploy,Pipeline} (June 2016) AWS Code{Commit,Deploy,Pipeline} (June 2016)
AWS Code{Commit,Deploy,Pipeline} (June 2016)
 
Modèle de sécurité AWS
Modèle de sécurité AWSModèle de sécurité AWS
Modèle de sécurité AWS
 
Introduction to DevOps on AWS
Introduction to DevOps on AWSIntroduction to DevOps on AWS
Introduction to DevOps on AWS
 
AWS CodeCommit, CodeDeploy & CodePipeline
AWS CodeCommit, CodeDeploy & CodePipelineAWS CodeCommit, CodeDeploy & CodePipeline
AWS CodeCommit, CodeDeploy & CodePipeline
 
Deep Dive AWS CloudTrail
Deep Dive AWS CloudTrailDeep Dive AWS CloudTrail
Deep Dive AWS CloudTrail
 
AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software D...
AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software D...AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software D...
AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software D...
 
Bonnes pratiques pour la gestion des opérations de sécurité AWS
Bonnes pratiques pour la gestion des opérations de sécurité AWSBonnes pratiques pour la gestion des opérations de sécurité AWS
Bonnes pratiques pour la gestion des opérations de sécurité AWS
 
Chiffrez vos données avec AWS KMS et avec AWS CloudHSM
Chiffrez vos données avec AWS KMS et avec AWS CloudHSMChiffrez vos données avec AWS KMS et avec AWS CloudHSM
Chiffrez vos données avec AWS KMS et avec AWS CloudHSM
 
Bonnes pratiques anti-DDOS
Bonnes pratiques anti-DDOSBonnes pratiques anti-DDOS
Bonnes pratiques anti-DDOS
 
Authentification et autorisation d'accès avec AWS IAM
Authentification et autorisation d'accès avec AWS IAMAuthentification et autorisation d'accès avec AWS IAM
Authentification et autorisation d'accès avec AWS IAM
 
Amazon Inspector
Amazon InspectorAmazon Inspector
Amazon Inspector
 
Viadeo - Cost Driven Development
Viadeo - Cost Driven DevelopmentViadeo - Cost Driven Development
Viadeo - Cost Driven Development
 
Automated Governance of Your AWS Resources
Automated Governance of Your AWS ResourcesAutomated Governance of Your AWS Resources
Automated Governance of Your AWS Resources
 
Configuration Management with AWS OpsWorks for Chef Automate
Configuration Management with AWS OpsWorks for Chef AutomateConfiguration Management with AWS OpsWorks for Chef Automate
Configuration Management with AWS OpsWorks for Chef Automate
 

Similar to AWS July Webinar Series-Deploying and Scaling Web Application with AWS Elastic Beanstalk

基于Aws的持续集成、交付和部署 代闻
基于Aws的持续集成、交付和部署 代闻基于Aws的持续集成、交付和部署 代闻
基于Aws的持续集成、交付和部署 代闻
Mason Mei
 
Migrating enterprise workloads to AWS
Migrating enterprise workloads to AWS Migrating enterprise workloads to AWS
Migrating enterprise workloads to AWS
Tom Laszewski
 

Similar to AWS July Webinar Series-Deploying and Scaling Web Application with AWS Elastic Beanstalk (20)

Distribua, gerencie e escale suas aplicações com o aws elastic beanstalk
Distribua, gerencie e escale suas aplicações com o aws elastic beanstalkDistribua, gerencie e escale suas aplicações com o aws elastic beanstalk
Distribua, gerencie e escale suas aplicações com o aws elastic beanstalk
 
基于Aws的持续集成、交付和部署 代闻
基于Aws的持续集成、交付和部署 代闻基于Aws的持续集成、交付和部署 代闻
基于Aws的持续集成、交付和部署 代闻
 
Elastic beanstalk
Elastic beanstalkElastic beanstalk
Elastic beanstalk
 
Auto scaling websites in the cloud
Auto scaling websites in the cloudAuto scaling websites in the cloud
Auto scaling websites in the cloud
 
Agile Deployment using Git and AWS Elastic Beanstalk
Agile Deployment using Git and AWS Elastic BeanstalkAgile Deployment using Git and AWS Elastic Beanstalk
Agile Deployment using Git and AWS Elastic Beanstalk
 
Aws elastic beanstalk
Aws elastic beanstalkAws elastic beanstalk
Aws elastic beanstalk
 
Deploy, Scale and Manage your Application with AWS Elastic Beanstalk
Deploy, Scale and Manage your Application with AWS Elastic BeanstalkDeploy, Scale and Manage your Application with AWS Elastic Beanstalk
Deploy, Scale and Manage your Application with AWS Elastic Beanstalk
 
How Easy to Automate Application Deployment on AWS
How Easy to Automate Application Deployment on AWSHow Easy to Automate Application Deployment on AWS
How Easy to Automate Application Deployment on AWS
 
Running Microservices on AWS Elastic Beanstalk
Running Microservices on AWS Elastic BeanstalkRunning Microservices on AWS Elastic Beanstalk
Running Microservices on AWS Elastic Beanstalk
 
AWS re:Invent 2016: Infrastructure Continuous Delivery Using AWS CloudFormati...
AWS re:Invent 2016: Infrastructure Continuous Delivery Using AWS CloudFormati...AWS re:Invent 2016: Infrastructure Continuous Delivery Using AWS CloudFormati...
AWS re:Invent 2016: Infrastructure Continuous Delivery Using AWS CloudFormati...
 
Running Microservices and Docker on AWS Elastic Beanstalk - August 2016 Month...
Running Microservices and Docker on AWS Elastic Beanstalk - August 2016 Month...Running Microservices and Docker on AWS Elastic Beanstalk - August 2016 Month...
Running Microservices and Docker on AWS Elastic Beanstalk - August 2016 Month...
 
E301 Elastic Beanstalk PaaS
E301 Elastic Beanstalk PaaSE301 Elastic Beanstalk PaaS
E301 Elastic Beanstalk PaaS
 
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...
 
AWS Architecting Cloud Apps - Best Practices and Design Patterns By Jinesh Varia
AWS Architecting Cloud Apps - Best Practices and Design Patterns By Jinesh VariaAWS Architecting Cloud Apps - Best Practices and Design Patterns By Jinesh Varia
AWS Architecting Cloud Apps - Best Practices and Design Patterns By Jinesh Varia
 
Building Web Apps on AWS
Building Web Apps on AWSBuilding Web Apps on AWS
Building Web Apps on AWS
 
Deploy, manage, and scale your apps
Deploy, manage, and scale your appsDeploy, manage, and scale your apps
Deploy, manage, and scale your apps
 
Migrating enterprise workloads to AWS
Migrating enterprise workloads to AWS Migrating enterprise workloads to AWS
Migrating enterprise workloads to AWS
 
Architecting for the Cloud: Best Practices
Architecting for the Cloud: Best PracticesArchitecting for the Cloud: Best Practices
Architecting for the Cloud: Best Practices
 
Nuts and bolts of running a popular site in the aws cloud
Nuts and bolts of running a popular site in the aws cloudNuts and bolts of running a popular site in the aws cloud
Nuts and bolts of running a popular site in the aws cloud
 
AWS-services.pdf
AWS-services.pdfAWS-services.pdf
AWS-services.pdf
 

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
 

Recently uploaded

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 

AWS July Webinar Series-Deploying and Scaling Web Application with AWS Elastic Beanstalk

  • 1. © 2015, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Abhishek Singh, Senior Product Manager – AWS Elastic Beanstalk 7/29/2015 Deploying and Scaling Web Application with AWS Elastic Beanstalk (EB)
  • 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
  • 6. Deployment Configuration Region01 Stack (container) type02 Single Instance Load Balanced with auto-scaling 03 OR Database (RDS)04 Optional Your code
  • 7. Deploy Sample Node.js Application Initial application deployment workflow $ git clone https://github.com/awslabs/eb- node-express-sample.git Download sample application02 $ eb init Create your Elastic Beanstalk app03 Follow the prompts to configure the environment 04 05 Create the resources and launch the application $ eb create $ pip install --upgrade awsebcli Install the AWS Elastic Beanstalk command line interface (EB CLI) 01
  • 8. Update Sample Node.js Application Update application workflow Update your code01 $ git add . $ git commit –m “v2.0” $ eb deploy Add & commit code to repository02 Open application once deployment completes. 03 $ eb open
  • 10. Sample Application Details How to configure/customize an environment using ebextensions https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers-ec2.html
  • 11. options.config option_settings: aws:elasticbeanstalk:customoption: AlarmEmail: "nobody@amazon.com" aws:elasticbeanstalk:application:environment: THEME: "flatly" AWS_REGION: '`{ "Ref" : "AWS::Region"}`' STARTUP_SIGNUP_TABLE: '`{ "Ref" : "StartupSignupsTable"}`' NEW_SIGNUP_TOPIC: '`{ "Ref" : "NewSignupTopic"}`' aws:elasticbeanstalk:container:nodejs: ProxyServer: nginx aws:elasticbeanstalk:container:nodejs:staticfiles: /static: /static
  • 12. Sample Application Details How to add additional AWS resources (e.g.: DynamoDB, SNS, SQS, etc.) using ebextensions https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environment-resources.html
  • 13. resources.config Resources: StartupSignupsTable: Type: AWS::DynamoDB::Table Properties: KeySchema: HashKeyElement: {AttributeName: email, AttributeType: S} ProvisionedThroughput: {ReadCapacityUnits: 1, WriteCapacityUnits: 1} NewSignupQueue: Type: AWS::SQS::Queue NewSignupTopic: Type: AWS::SNS::Topic Properties: Subscription: - Endpoint: Fn::GetOptionSetting: {DefaultValue: nobody@amazon.com, OptionName: NewSignupEmail} Protocol: email - Endpoint: Fn::GetAtt: [NewSignupQueue, Arn] Protocol: sqs
  • 14. resources.config (cont.) AllowSNS2SQSPolicy: Type: AWS::SQS::QueuePolicy Properties: PolicyDocument: Id: PublicationPolicy Statement: - Action: ['sqs:SendMessage'] Condition: ArnEquals: aws:SourceArn: {Ref: NewSignupTopic} Effect: Allow Principal: {AWS: '*'} Resource: Fn::GetAtt: [NewSignupQueue, Arn] Sid: Allow-SNS-SendMessage Version: '2008-10-17' Queues: - {Ref: NewSignupQueue}
  • 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.
  • 21. Demo