SlideShare uma empresa Scribd logo
1 de 24
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Pop-up Loft
Building Web Apps with AWS CodeStar and AWS Elastic Beanstalk
Len Henry
Sr. Solutions Architect
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
What we will learn today
• What is AWS CodeStar?
• How do I use AWS CodeStar to rapidly develop on AWS (demo)?
• What is AWS Elastic Beanstalk?
• How do I run my application in production with Elastic Beanstalk (demo)?
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
AWS CodeStar
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
AWS CodeStar
Quickly develop, build, and deploy applications on AWS
• Start developing on AWS in minutes
• Choose from a variety of project templates
• Manage software delivery easily
• Work across your team securely
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
AWS CodeStar
• Some notable features
– Free
– Integration with Cloud9 IDE
– Works with
• EC2, Lambda, CodeCommit, CodeBuild, CodePipeline,
CodeDeploy, CloudFormation, CloudWatch, Elastic
Beanstalk
• GitHub, Atlassian JIRA
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
AWS CodeStar Demo
• Application Architecture
• Syncing the code
• Initial Deployment
• Updating your code with Cloud9
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
AWS Elastic Beanstalk
© 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 AWS Code Pipeline
5. Via Elastic Beanstalk command line interface
$ eb deploy
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
AWS Elastic Beanstalk Demo
• Application Architecture
• Setting up Elastic Beanstalk
• Setting Up CodePipeline with CodeCommit and Elastic
Beanstalk
• Updating your code with Cloud9
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Elastic Beanstalk Best Practices
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Dependency Management
{
"name": "Elastic-Beanstalk-Sample-App",
"version": "0.0.1",
"private": true,
"dependencies": {
"ejs": "latest",
"aws-sdk": "latest",
"express": "latest",
"body-parser": "latest"
},
"scripts": {
"start": "node app.js"
}
}
Bad idea to do this for production environments
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Dependency Management
{
"name": "Elastic-Beanstalk-Sample-App",
"version": "0.0.1",
"private": true,
"dependencies": {
"ejs": "2.3.3",
"aws-sdk": "2.1.39",
"express": "4.13.1",
"body-parser": "1.13.2"
},
"scripts": {
"start": "node app.js"
}
}
Always lock down versions of dependencies.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Testing/Tuning Your Application
• Pick performance metrics you want to optimize for (e.g.: latency, concurrent
users, number of web requests, etc.)
• Load test your application
– Start with auto-scaling minimum and maximum of 1 to understand how your application
degrades under an over load condition
– Understand available metrics and how they correspond to your performance metric.
• Configure auto-scaling to optimize for performance metrics
– Number of instances to add on scale out
– Breach duration
– Metric to scale on
• Tune backend (DynamoDB, RDS, etc.) for optimal performance, leave enough
headroom for full scale out
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Logs, Metrics, & Alarms
• Enable log rotation to automatically publish logs to S3.
• 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.
• Enable Amazon Route 53 health checks and alarms.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
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
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Summary
• Get your development environment started quickly with
CodeStar
• Use Elastic Beanstalk for operating production workloads
• Use AWS Developer Services, such as CodeCommit and
CodePipeline to do CI/CD
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Next Steps
• AWS DevOps Blog: https://aws.amazon.com/blogs/devops/
• AWS 10 Minute Tutorials:
• https://aws.amazon.com/getting-started/tutorials/build-serverless-
application/
• https://aws.amazon.com/getting-started/tutorials/launch-an-app/
• https://aws.amazon.com/getting-started/tutorials/continuous-
deployment-pipeline/
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Pop-up Loft

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

SRV205 Architectures and Strategies for Building Modern Applications on AWS
 SRV205 Architectures and Strategies for Building Modern Applications on AWS SRV205 Architectures and Strategies for Building Modern Applications on AWS
SRV205 Architectures and Strategies for Building Modern Applications on AWS
 
Infrastructure Is Code with the AWS Cloud Development Kit (DEV372) - AWS re:I...
Infrastructure Is Code with the AWS Cloud Development Kit (DEV372) - AWS re:I...Infrastructure Is Code with the AWS Cloud Development Kit (DEV372) - AWS re:I...
Infrastructure Is Code with the AWS Cloud Development Kit (DEV372) - AWS re:I...
 
Building Microservices with the Twelve Factor App Pattern on AWS
Building Microservices with the Twelve Factor App Pattern on AWSBuilding Microservices with the Twelve Factor App Pattern on AWS
Building Microservices with the Twelve Factor App Pattern on AWS
 
Architecting an Open Data Lake for the Enterprise
 Architecting an Open Data Lake for the Enterprise  Architecting an Open Data Lake for the Enterprise
Architecting an Open Data Lake for the Enterprise
 
Preparing for AWS Certification/ Advanced Security Training
Preparing for AWS Certification/ Advanced Security TrainingPreparing for AWS Certification/ Advanced Security Training
Preparing for AWS Certification/ Advanced Security Training
 
Running Container on AWS - Builders Day Israel
Running Container on AWS - Builders Day IsraelRunning Container on AWS - Builders Day Israel
Running Container on AWS - Builders Day Israel
 
Building your First GraphQL API with AWS AppSync
Building your First GraphQL API with AWS AppSyncBuilding your First GraphQL API with AWS AppSync
Building your First GraphQL API with AWS AppSync
 
Authentication and Identity with Amazon Cognito & Analytics with Amazon Pinpoint
Authentication and Identity with Amazon Cognito & Analytics with Amazon PinpointAuthentication and Identity with Amazon Cognito & Analytics with Amazon Pinpoint
Authentication and Identity with Amazon Cognito & Analytics with Amazon Pinpoint
 
Testing Your App Before Launch: An Introduction to AWS Device Farm
Testing Your App Before Launch: An Introduction to AWS Device FarmTesting Your App Before Launch: An Introduction to AWS Device Farm
Testing Your App Before Launch: An Introduction to AWS Device Farm
 
Securing Container Workloads on AWS Fargate (CON316-R1) - AWS re:Invent 2018
Securing Container Workloads on AWS Fargate (CON316-R1) - AWS re:Invent 2018Securing Container Workloads on AWS Fargate (CON316-R1) - AWS re:Invent 2018
Securing Container Workloads on AWS Fargate (CON316-R1) - AWS re:Invent 2018
 
SRV314 Containerized App Development with AWS Fargate
SRV314 Containerized App Development with AWS FargateSRV314 Containerized App Development with AWS Fargate
SRV314 Containerized App Development with AWS Fargate
 
How a Major Australian University Brought Backup to the Cloud
 How a Major Australian University Brought Backup to the Cloud How a Major Australian University Brought Backup to the Cloud
How a Major Australian University Brought Backup to the Cloud
 
Building an AWS Greengrass Machine Learning Solution at the Edge (IOT403-R1) ...
Building an AWS Greengrass Machine Learning Solution at the Edge (IOT403-R1) ...Building an AWS Greengrass Machine Learning Solution at the Edge (IOT403-R1) ...
Building an AWS Greengrass Machine Learning Solution at the Edge (IOT403-R1) ...
 
Build a Voice-Based Chatbot for Your Amazon Connect Contact Center
Build a Voice-Based Chatbot for Your Amazon Connect Contact CenterBuild a Voice-Based Chatbot for Your Amazon Connect Contact Center
Build a Voice-Based Chatbot for Your Amazon Connect Contact Center
 
Serverless Architectural Patterns: Collision 2018
Serverless Architectural Patterns: Collision 2018Serverless Architectural Patterns: Collision 2018
Serverless Architectural Patterns: Collision 2018
 
SRV326 Build a Voice-based Chatbot for Your Amazon Connect Contact Center
 SRV326 Build a Voice-based Chatbot for Your Amazon Connect Contact Center SRV326 Build a Voice-based Chatbot for Your Amazon Connect Contact Center
SRV326 Build a Voice-based Chatbot for Your Amazon Connect Contact Center
 
Workshop: Architecting a Serverless Data Lake
Workshop: Architecting a Serverless Data LakeWorkshop: Architecting a Serverless Data Lake
Workshop: Architecting a Serverless Data Lake
 
Interstella GTC: Monolith to Microservices with ECS
Interstella GTC: Monolith to Microservices with ECSInterstella GTC: Monolith to Microservices with ECS
Interstella GTC: Monolith to Microservices with ECS
 
Train & Deploy ML Models with Amazon Sagemaker: Collision 2018
Train & Deploy ML Models with Amazon Sagemaker: Collision 2018Train & Deploy ML Models with Amazon Sagemaker: Collision 2018
Train & Deploy ML Models with Amazon Sagemaker: Collision 2018
 
A Deep Dive into What's New with Amazon EMR (ANT340-R1) - AWS re:Invent 2018
A Deep Dive into What's New with Amazon EMR (ANT340-R1) - AWS re:Invent 2018A Deep Dive into What's New with Amazon EMR (ANT340-R1) - AWS re:Invent 2018
A Deep Dive into What's New with Amazon EMR (ANT340-R1) - AWS re:Invent 2018
 

Semelhante a Building Web Apps on AWS

Semelhante a Building Web Apps on AWS (20)

DEV305_Manage Your Applications with AWS Elastic Beanstalk.pdf
DEV305_Manage Your Applications with AWS Elastic Beanstalk.pdfDEV305_Manage Your Applications with AWS Elastic Beanstalk.pdf
DEV305_Manage Your Applications with AWS Elastic Beanstalk.pdf
 
Interstella 8888: CICD for Containers on AWS - CON319 - re:Invent 2017
Interstella 8888: CICD for Containers on AWS - CON319 - re:Invent 2017Interstella 8888: CICD for Containers on AWS - CON319 - re:Invent 2017
Interstella 8888: CICD for Containers on AWS - CON319 - re:Invent 2017
 
CON319_Interstella GTC CICD for Containers on AWS
CON319_Interstella GTC CICD for Containers on AWSCON319_Interstella GTC CICD for Containers on AWS
CON319_Interstella GTC CICD for Containers on AWS
 
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...
 
ARC205_Born in the Cloud
ARC205_Born in the CloudARC205_Born in the Cloud
ARC205_Born in the Cloud
 
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
 
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)
 
Create a Serverless Image Processing Platform - ARC326 - re:Invent 2017
Create a Serverless Image Processing Platform - ARC326 - re:Invent 2017Create a Serverless Image Processing Platform - ARC326 - re:Invent 2017
Create a Serverless Image Processing Platform - ARC326 - re:Invent 2017
 
PaaS – From Code to Running Application using AWS Elastic Beanstalk (DEV323) ...
PaaS – From Code to Running Application using AWS Elastic Beanstalk (DEV323) ...PaaS – From Code to Running Application using AWS Elastic Beanstalk (DEV323) ...
PaaS – From Code to Running Application using AWS Elastic Beanstalk (DEV323) ...
 
Serverless DevOps to the Rescue
Serverless DevOps to the RescueServerless DevOps to the Rescue
Serverless DevOps to the Rescue
 
Yes, AWS *is* a Fantastic Environment for .NET!
Yes, AWS *is* a Fantastic Environment for .NET!Yes, AWS *is* a Fantastic Environment for .NET!
Yes, AWS *is* a Fantastic Environment for .NET!
 
Create a Serverless Image Processing Platform
Create a Serverless Image Processing PlatformCreate a Serverless Image Processing Platform
Create a Serverless Image Processing Platform
 
Design, Build, and Modernize Your Web Applications with AWS
 Design, Build, and Modernize Your Web Applications with AWS Design, Build, and Modernize Your Web Applications with AWS
Design, Build, and Modernize Your Web Applications with 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...
 
High-Throughput Genomics on AWS - LFS309 - re:Invent 2017
High-Throughput Genomics on AWS - LFS309 - re:Invent 2017High-Throughput Genomics on AWS - LFS309 - re:Invent 2017
High-Throughput Genomics on AWS - LFS309 - re:Invent 2017
 
LFS309-High-Throughput Genomics on AWS.pdf
LFS309-High-Throughput Genomics on AWS.pdfLFS309-High-Throughput Genomics on AWS.pdf
LFS309-High-Throughput Genomics on AWS.pdf
 
Batch Processing with Containers on AWS - CON304 - re:Invent 2017
Batch Processing with Containers on AWS - CON304 - re:Invent 2017Batch Processing with Containers on AWS - CON304 - re:Invent 2017
Batch Processing with Containers on AWS - CON304 - re:Invent 2017
 
Genomics on aws-webinar-april2018
Genomics on aws-webinar-april2018Genomics on aws-webinar-april2018
Genomics on aws-webinar-april2018
 
CON309_Containerized Machine Learning on AWS
CON309_Containerized Machine Learning on AWSCON309_Containerized Machine Learning on AWS
CON309_Containerized Machine Learning on AWS
 

Mais de 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
 

Mais de 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
 

Building Web Apps on AWS

  • 1. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved Pop-up Loft Building Web Apps with AWS CodeStar and AWS Elastic Beanstalk Len Henry Sr. Solutions Architect
  • 2. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved What we will learn today • What is AWS CodeStar? • How do I use AWS CodeStar to rapidly develop on AWS (demo)? • What is AWS Elastic Beanstalk? • How do I run my application in production with Elastic Beanstalk (demo)?
  • 3. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved AWS CodeStar
  • 4. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved AWS CodeStar Quickly develop, build, and deploy applications on AWS • Start developing on AWS in minutes • Choose from a variety of project templates • Manage software delivery easily • Work across your team securely
  • 5. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved AWS CodeStar • Some notable features – Free – Integration with Cloud9 IDE – Works with • EC2, Lambda, CodeCommit, CodeBuild, CodePipeline, CodeDeploy, CloudFormation, CloudWatch, Elastic Beanstalk • GitHub, Atlassian JIRA
  • 6. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved AWS CodeStar Demo • Application Architecture • Syncing the code • Initial Deployment • Updating your code with Cloud9
  • 7. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved AWS Elastic Beanstalk
  • 8. © 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
  • 9. © 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.)
  • 10. © 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
  • 11. © 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)
  • 12. © 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
  • 13. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved Getting started with AWS Elastic Beanstalk
  • 14. © 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 AWS Code Pipeline 5. Via Elastic Beanstalk command line interface $ eb deploy
  • 15. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved AWS Elastic Beanstalk Demo • Application Architecture • Setting up Elastic Beanstalk • Setting Up CodePipeline with CodeCommit and Elastic Beanstalk • Updating your code with Cloud9
  • 16. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved Elastic Beanstalk Best Practices
  • 17. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved Dependency Management { "name": "Elastic-Beanstalk-Sample-App", "version": "0.0.1", "private": true, "dependencies": { "ejs": "latest", "aws-sdk": "latest", "express": "latest", "body-parser": "latest" }, "scripts": { "start": "node app.js" } } Bad idea to do this for production environments
  • 18. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved Dependency Management { "name": "Elastic-Beanstalk-Sample-App", "version": "0.0.1", "private": true, "dependencies": { "ejs": "2.3.3", "aws-sdk": "2.1.39", "express": "4.13.1", "body-parser": "1.13.2" }, "scripts": { "start": "node app.js" } } Always lock down versions of dependencies.
  • 19. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved Testing/Tuning Your Application • Pick performance metrics you want to optimize for (e.g.: latency, concurrent users, number of web requests, etc.) • Load test your application – Start with auto-scaling minimum and maximum of 1 to understand how your application degrades under an over load condition – Understand available metrics and how they correspond to your performance metric. • Configure auto-scaling to optimize for performance metrics – Number of instances to add on scale out – Breach duration – Metric to scale on • Tune backend (DynamoDB, RDS, etc.) for optimal performance, leave enough headroom for full scale out
  • 20. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved Logs, Metrics, & Alarms • Enable log rotation to automatically publish logs to S3. • 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. • Enable Amazon Route 53 health checks and alarms.
  • 21. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved 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
  • 22. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved Summary • Get your development environment started quickly with CodeStar • Use Elastic Beanstalk for operating production workloads • Use AWS Developer Services, such as CodeCommit and CodePipeline to do CI/CD
  • 23. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved Next Steps • AWS DevOps Blog: https://aws.amazon.com/blogs/devops/ • AWS 10 Minute Tutorials: • https://aws.amazon.com/getting-started/tutorials/build-serverless- application/ • https://aws.amazon.com/getting-started/tutorials/launch-an-app/ • https://aws.amazon.com/getting-started/tutorials/continuous- deployment-pipeline/
  • 24. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved Pop-up Loft