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
Sam Hennessy
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 de Amazon Web Services

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 WorkloadsAmazon Web Services
 
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 sfatareAmazon Web Services
 
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 NodeJSAmazon Web Services
 
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 webAmazon Web Services
 
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 sfatareAmazon 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 AWSAmazon 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 DeckAmazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without serversAmazon 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
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceAmazon Web Services
 
Come costruire un'architettura Serverless nel Cloud AWS
Come costruire un'architettura Serverless nel Cloud AWSCome costruire un'architettura Serverless nel Cloud AWS
Come costruire un'architettura Serverless nel Cloud AWSAmazon Web Services
 
AWS Serverless per startup: come innovare senza preoccuparsi dei server
AWS Serverless per startup: come innovare senza preoccuparsi dei serverAWS Serverless per startup: come innovare senza preoccuparsi dei server
AWS Serverless per startup: come innovare senza preoccuparsi dei serverAmazon Web Services
 
Crea dashboard interattive con Amazon QuickSight
Crea dashboard interattive con Amazon QuickSightCrea dashboard interattive con Amazon QuickSight
Crea dashboard interattive con Amazon QuickSightAmazon Web Services
 
Costruisci modelli di Machine Learning con Amazon SageMaker Autopilot
Costruisci modelli di Machine Learning con Amazon SageMaker AutopilotCostruisci modelli di Machine Learning con Amazon SageMaker Autopilot
Costruisci modelli di Machine Learning con Amazon SageMaker AutopilotAmazon Web Services
 
Migra le tue file shares in cloud con FSx for Windows
Migra le tue file shares in cloud con FSx for Windows Migra le tue file shares in cloud con FSx for Windows
Migra le tue file shares in cloud con FSx for Windows Amazon Web Services
 
La tua organizzazione è pronta per adottare una strategia di cloud ibrido?
La tua organizzazione è pronta per adottare una strategia di cloud ibrido?La tua organizzazione è pronta per adottare una strategia di cloud ibrido?
La tua organizzazione è pronta per adottare una strategia di cloud ibrido?Amazon Web Services
 
Protect your applications from DDoS/BOT & Advanced Attacks
Protect your applications from DDoS/BOT & Advanced AttacksProtect your applications from DDoS/BOT & Advanced Attacks
Protect your applications from DDoS/BOT & Advanced AttacksAmazon Web Services
 
Track 6 Session 6_ 透過 AWS AI 服務模擬、部署機器人於產業之應用
Track 6 Session 6_ 透過 AWS AI 服務模擬、部署機器人於產業之應用Track 6 Session 6_ 透過 AWS AI 服務模擬、部署機器人於產業之應用
Track 6 Session 6_ 透過 AWS AI 服務模擬、部署機器人於產業之應用Amazon Web Services
 

Mais de Amazon Web Services (20)

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
 
Come costruire un'architettura Serverless nel Cloud AWS
Come costruire un'architettura Serverless nel Cloud AWSCome costruire un'architettura Serverless nel Cloud AWS
Come costruire un'architettura Serverless nel Cloud AWS
 
AWS Serverless per startup: come innovare senza preoccuparsi dei server
AWS Serverless per startup: come innovare senza preoccuparsi dei serverAWS Serverless per startup: come innovare senza preoccuparsi dei server
AWS Serverless per startup: come innovare senza preoccuparsi dei server
 
Crea dashboard interattive con Amazon QuickSight
Crea dashboard interattive con Amazon QuickSightCrea dashboard interattive con Amazon QuickSight
Crea dashboard interattive con Amazon QuickSight
 
Costruisci modelli di Machine Learning con Amazon SageMaker Autopilot
Costruisci modelli di Machine Learning con Amazon SageMaker AutopilotCostruisci modelli di Machine Learning con Amazon SageMaker Autopilot
Costruisci modelli di Machine Learning con Amazon SageMaker Autopilot
 
Migra le tue file shares in cloud con FSx for Windows
Migra le tue file shares in cloud con FSx for Windows Migra le tue file shares in cloud con FSx for Windows
Migra le tue file shares in cloud con FSx for Windows
 
La tua organizzazione è pronta per adottare una strategia di cloud ibrido?
La tua organizzazione è pronta per adottare una strategia di cloud ibrido?La tua organizzazione è pronta per adottare una strategia di cloud ibrido?
La tua organizzazione è pronta per adottare una strategia di cloud ibrido?
 
Protect your applications from DDoS/BOT & Advanced Attacks
Protect your applications from DDoS/BOT & Advanced AttacksProtect your applications from DDoS/BOT & Advanced Attacks
Protect your applications from DDoS/BOT & Advanced Attacks
 
Track 6 Session 6_ 透過 AWS AI 服務模擬、部署機器人於產業之應用
Track 6 Session 6_ 透過 AWS AI 服務模擬、部署機器人於產業之應用Track 6 Session 6_ 透過 AWS AI 服務模擬、部署機器人於產業之應用
Track 6 Session 6_ 透過 AWS AI 服務模擬、部署機器人於產業之應用
 

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 Sam Hennessy 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