SlideShare uma empresa Scribd logo
1 de 31
Baixar para ler offline
© 2015, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Paul Maddox, SolutionsArchitect, AWS
Steven Bryen, SolutionsArchitect, AWS
25th April 2016
Zombie Apocalypse Workshop
Building Serverless Microservices
What to expect from this workshop
• Goal of serverless architectures
• Overview of AWS Lambda
• Overview of Amazon API Gateway
• Workshop Breakout – Time to build!
• Wrap-up/Q&A
Why serverless architectures?
• No servers to manage and scale
• Run at scale
• Respond quickly to events
• Only pay for compute time that you use
• Developer productivity
Serverless microservice architecture
Static web content
served from
Amazon S3
AWS Lambda
Web client
Amazon API
Gateway
AWS Lambda
Your feedback helped create Lambda!
• No direct responsibility for infrastructure resources
• Quick and simple deployments
• Highly available and scalable apps with zero administration
• Costs that are closely aligned to application usage
AWS compute offerings
Amazon EC2
Resizable virtual
servers in the
cloud
Amazon ECS
Container management
service for running
Docker on EC2
AWS Lambda
Serverless compute, run
code in response to
events
Benefits of using Lambda
Continuous ScalingNo Servers to Manage
Lambda automatically
scales your application by
running code in response
to each trigger. Your code
runs in parallel and
processes each trigger
individually, scaling
precisely with the size of
the workload.
Subsecond Metering
With Lambda, you are
charged for every
100 ms your code
executes and the number
of times your code is
triggered. You don’t pay
anything when your code
isn’t running.
Lambda automatically
runs your code without
requiring you to provision
or manage servers. Just
write the code and
upload it to Lambda.
AWS Lambda – How it works
Bring your own code
• Node.js, Java, Python
• Java = Any JVM based
language such as Scala,
Clojure, etc.
• Bring your own libraries
Flexible invocation paths
• Event or RequestResponse
invoke options
• Existing integrations with
variousAWS services
Simple resource model
• Select memory from 128MB
to 1.5GB in 64MB steps
• CPU & Network allocated
proportionately to RAM
• Reports actual usage
Fine grained permissions
• Uses IAM role for Lambda
execution permissions
• Uses Resource policy for
AWS event sources
AWS Lambda – Use Cases
Data Processing
Execute code in
response to changes in
data, shifts in system
state, or actions by users
Control Systems
Customize responses
and response workflows
to state and data
changes within AWS
Backends
Execute backend logic to
handle requests for web,
mobile, IoT, and 3rd APIs
Amazon API Gateway
Your feedback
Managing multiple versions and stages of an API is difficult
Monitoring third-party developers’ access is time consuming
Access authorization is a challenge
Traffic spikes create an operational burden
What if I don’t want servers at all?
API Gateway - Capabilities
• Host multiple versions and stages of your APIs
• Create and distribute API keys to developers
• Leverage signature version 4 to authorize access to APIs
• Throttle and monitor requests to protect your backend
• Utilize Lambda as a backend
Benefits of API Gateway
• Managed cache to store API responses
• Reduced latency and distributed denial of service (DDoS)
protection through Amazon CloudFront
• SDK generation for iOS, Android, and JavaScript
• Swagger support
• Request and response data transformation
An API call flow
Internet
Mobile apps
Websites
Services
AWS Lambda
functions
AWS
API Gateway
cache
Endpoints on
Amazon
EC2/AWS
Elastic
Beanstalk
Any other publicly
accessible endpoint
Amazon
CloudWatch
monitoring
API Gateway
The Zombie Apocalypse Survival
ZOMBIES!
Zombies have taken over major metropolitan areas. The AWS Lambda Signal Corps has
built a communications system to connect remaining survivors. Come learn how AWS
Lambda provides a platform for building event-driven microservices, all without the need
to provision, manage, and scale servers. In this workshop, we will introduce the basics of
using AWS Lambda to run code in response to events from Amazon DynamoDB, S3, and
API Gateway. You'll work within a team to build a secure, scalable, fault-tolerant chat
service with global reach from scratch using blueprints provided by us. Unfortunately, the
blueprints provided only describe a very rudimentary communications system (the
engineers of the project got mysteriously ill). We are looking to you and your team to add
additional real-time life saving features (e.g., food cache locations, zombie motion
detectors, undead counters) to the chat platform using Lambda functions. We will have a
few special challenges for teams to complete. Rewards will be given to teams that
complete all the extra-credit challenges.
Engineers got this far…
High-level Zombie Chat Architecture
Amazon S3
Static Content/Chat Web App
AWS Lambda
Backend Logic
Web client
End user
Amazon API Gateway
REST Interface
Amazon
DynamoDB
Messages Data Store
Zombie Chat implementation
S3
A new S3 bucket with single-page HTML5 web app
API Gateway
/zombie/messages API with GET and POST methods
Lambda
Functions GetMessagesFromDynamoDB and WriteMessagesToDynamoDB
DynamoDB
A ‘messages’ table to track channel, timestamp, message, and name
AWS Service Flow
Internet
Activity
Indicator
Chat Service
Activity
Messages
Search
Service
DynamoDB Streams
Elasticsearch
Service
S3 Web Hosting
Twilio
Slack Chat
API Gateway
IoT Device
IoT Processing
Website
AWS IoT or
Amazon SNS
Lab Architectures
What you’ll build today!
Lab 1: Typing Indicator
Internet
Typing Indicator
Service
talkers
/talkers
Continuous GET Request polling
of Typing Indicator Service to
display current ‘talkers’
Single reusable service with
DynamoDB PutItem
implementation
POST from Zombie chat to
/talkers with Name, Channel,
Timestamp when survivor
types message
Zombie Chat
Lab 2: SMS Integration with Twilio
Internet Twilio Processing
Mobile/SMS
/message Chat Service messages
Twilio Phone
Number
/twilio
Integration Response:
Apache Velocity Template
Language (VTL) to transform
response to XML for Twilio
• Pre-process Twilio message
• Convert/standardize incoming
parameters for Chat Service
• HTTPS POST to Chat Service
• Design Principle: Service re-use
• Single implementation of
DynamoDB PutItem
Integration Request:
Apache Velocity Template
Language (VTL) to transform
POST parameters into JSON.
Lab 3: Search with Elasticsearch Service
Search
Service
Dynamo Streams
Elasticsearch
Service
messages
Kibana plugin with Amazon
Elasticsearch Service provides
real-time UI to search messages
Lambda function processes events
and indexes them in Amazon
Elasticsearch Service
DynamoDB Streams provides a
time-ordered flow of events
(incoming survivor messages)
Amazon Elasticsearch Service
provides a managed service for
search and analytics
Lab 4: Send Messages from Slack
Chat Service
Slack Service
messages
Slack Chat Internet
Pre-process Slack message
before sending message to
Chat Service
• Design Principle: Service re-use
• Single implementation of
DynamoDB PutItem
/slack /message
Lab 5: Zombie Sensor with Intel Edison
Internet
Zombie
Sensor Data
Zombie Sensor
Amazon SNS
/message
Chat Service
messages
• Lambda subscribes to SNS Topic
• Pre-process message
• HTTPS POST to Chat Service
Node.js on Edison sends sensor
events to Amazon SNS
• Design Principle: Service re-use
• Single implementation of
DynamoDB PutItem
Your challenge
Base Challenge
1. Implement chat add-ons with the steps from the Lab Guide
Extra Credit Challenges
1. Implement channel functionality for different chat rooms/private chats
2. Data store for weapons/food caches & bot to notify survivors of cache levels
3. Build your own challenges and share your design with us!
Steps to get started
• Break into groups (less than 5 people) or work solo!.
• Select a leader to launch the CloudFormation Stack.
• Complete add-ons from Lab Guide.
• Decide on other challenges you’ll build!
• Share your designs with fellow survivors!
Workshop available at:
https://github.com/awslabs/aws-lambda-zombie-workshop
Thank You!
Run Apps for Pennies!
Cost estimate to run this 3 hour workshop!
• Lambda: FREE
• 1st 1m requests are free each month! Duration pricing willbe sub-1penny!
• DynamoDB: $0.0585
• $0.0065/hr for every 10 read units provisioned - 75 units provisioned/hr
• $0.0065/hr for every 50 write units provisioned – 75 units provisioned/hr
• DynamoDB Streams: 2.5m reads free per month
• ElasticSearch Service: $0.282
• M3.medium with instance storage - $0.094/hr
• API Gateway: $0.035
• $3.50/million API calls. Assume 10,000 calls made per hour during lab
• CloudWatch Logs: $0.25
• $0.50 per GB/monthingested.Super high endestimate of 500MB of log dataduringworkshop
• S3: $0.03
• $0.03 per GB for first 1TB a month.
• Data Transfer: FREE
• First 1GB/month out is free. Data transfer in is free!

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

BDA402 Deep Dive: Log Analytics with Amazon Elasticsearch Service
BDA402 Deep Dive: Log Analytics with Amazon Elasticsearch ServiceBDA402 Deep Dive: Log Analytics with Amazon Elasticsearch Service
BDA402 Deep Dive: Log Analytics with Amazon Elasticsearch Service
 
AWS re:Invent 2016: Taking DevOps to the AWS Edge (CTD302)
AWS re:Invent 2016: Taking DevOps to the AWS Edge (CTD302)AWS re:Invent 2016: Taking DevOps to the AWS Edge (CTD302)
AWS re:Invent 2016: Taking DevOps to the AWS Edge (CTD302)
 
Running Relational Databases on AWS
Running Relational Databases on AWS  Running Relational Databases on AWS
Running Relational Databases on AWS
 
AWS re:Invent 2016: Wild Rydes Takes Off – The Dawn of a New Unicorn (SVR309)
AWS re:Invent 2016: Wild Rydes Takes Off – The Dawn of a New Unicorn (SVR309)AWS re:Invent 2016: Wild Rydes Takes Off – The Dawn of a New Unicorn (SVR309)
AWS re:Invent 2016: Wild Rydes Takes Off – The Dawn of a New Unicorn (SVR309)
 
Amazon Aurora New Features - September 2016 Webinar Series
Amazon Aurora New Features - September 2016 Webinar SeriesAmazon Aurora New Features - September 2016 Webinar Series
Amazon Aurora New Features - September 2016 Webinar Series
 
WKS407 Wild Rydes Takes Off – The Dawn of a New Unicorn
WKS407 Wild Rydes Takes Off – The Dawn of a New Unicorn WKS407 Wild Rydes Takes Off – The Dawn of a New Unicorn
WKS407 Wild Rydes Takes Off – The Dawn of a New Unicorn
 
SRV302 Deep Dive on Serverless Application Development
SRV302 Deep Dive on Serverless Application DevelopmentSRV302 Deep Dive on Serverless Application Development
SRV302 Deep Dive on Serverless Application Development
 
Advanced AWS techniques from the trenches of the Enterprise – Sourced Group
Advanced AWS techniques from the trenches of the Enterprise – Sourced GroupAdvanced AWS techniques from the trenches of the Enterprise – Sourced Group
Advanced AWS techniques from the trenches of the Enterprise – Sourced Group
 
AWS re:Invent 2016: Industry Opportunities for AWS Partners: Healthcare, Fina...
AWS re:Invent 2016: Industry Opportunities for AWS Partners: Healthcare, Fina...AWS re:Invent 2016: Industry Opportunities for AWS Partners: Healthcare, Fina...
AWS re:Invent 2016: Industry Opportunities for AWS Partners: Healthcare, Fina...
 
ENT308 Best Practices for Microsoft Architectures on AWS
ENT308 Best Practices for Microsoft Architectures on AWSENT308 Best Practices for Microsoft Architectures on AWS
ENT308 Best Practices for Microsoft Architectures on AWS
 
Amazon Redshift
Amazon Redshift Amazon Redshift
Amazon Redshift
 
Being Well Architected in the Cloud (Updated)
Being Well Architected in the Cloud (Updated)Being Well Architected in the Cloud (Updated)
Being Well Architected in the Cloud (Updated)
 
Deep Dive on Microservices and Amazon ECS
Deep Dive on Microservices and Amazon ECSDeep Dive on Microservices and Amazon ECS
Deep Dive on Microservices and Amazon ECS
 
Deep Dive on Accelerating Content, APIs, and Applications with Amazon CloudFr...
Deep Dive on Accelerating Content, APIs, and Applications with Amazon CloudFr...Deep Dive on Accelerating Content, APIs, and Applications with Amazon CloudFr...
Deep Dive on Accelerating Content, APIs, and Applications with Amazon CloudFr...
 
數據庫遷移到雲端的成功秘訣
數據庫遷移到雲端的成功秘訣數據庫遷移到雲端的成功秘訣
數據庫遷移到雲端的成功秘訣
 
AWS re:Invent 2016: DevOps on AWS: Accelerating Software Delivery with the AW...
AWS re:Invent 2016: DevOps on AWS: Accelerating Software Delivery with the AW...AWS re:Invent 2016: DevOps on AWS: Accelerating Software Delivery with the AW...
AWS re:Invent 2016: DevOps on AWS: Accelerating Software Delivery with the AW...
 
AWS re:Invent 2016: From Monolithic to Microservices: Evolving Architecture P...
AWS re:Invent 2016: From Monolithic to Microservices: Evolving Architecture P...AWS re:Invent 2016: From Monolithic to Microservices: Evolving Architecture P...
AWS re:Invent 2016: From Monolithic to Microservices: Evolving Architecture P...
 
Cost Optimization at Scale
Cost Optimization at ScaleCost Optimization at Scale
Cost Optimization at Scale
 
SRV412 Deep Dive on CICD and Docker
SRV412 Deep Dive on CICD and DockerSRV412 Deep Dive on CICD and Docker
SRV412 Deep Dive on CICD and Docker
 
使用 AWS 負載平衡服務讓您的應用程式規模化
使用 AWS 負載平衡服務讓您的應用程式規模化使用 AWS 負載平衡服務讓您的應用程式規模化
使用 AWS 負載平衡服務讓您的應用程式規模化
 

Destaque

Scaling by Design: AWS Web Services Patterns
Scaling by Design:AWS Web Services PatternsScaling by Design:AWS Web Services Patterns
Scaling by Design: AWS Web Services Patterns
Amazon Web Services
 

Destaque (20)

Scaling by Design: AWS Web Services Patterns
Scaling by Design:AWS Web Services PatternsScaling by Design:AWS Web Services Patterns
Scaling by Design: AWS Web Services Patterns
 
Get the Most Out of Amazon EC2: A Deep Dive on Reserved, On-Demand, and Spot ...
Get the Most Out of Amazon EC2: A Deep Dive on Reserved, On-Demand, and Spot ...Get the Most Out of Amazon EC2: A Deep Dive on Reserved, On-Demand, and Spot ...
Get the Most Out of Amazon EC2: A Deep Dive on Reserved, On-Demand, and Spot ...
 
Data Storage for the Long Haul: Compliance and Archive
Data Storage for the Long Haul: Compliance and ArchiveData Storage for the Long Haul: Compliance and Archive
Data Storage for the Long Haul: Compliance and Archive
 
Agile BI - Pop-up Loft Tel Aviv
Agile BI - Pop-up Loft Tel AvivAgile BI - Pop-up Loft Tel Aviv
Agile BI - Pop-up Loft Tel Aviv
 
Hybrid Infrastructure Integration
Hybrid Infrastructure IntegrationHybrid Infrastructure Integration
Hybrid Infrastructure Integration
 
Encryption and Key Management in AWS
Encryption and Key Management in AWSEncryption and Key Management in AWS
Encryption and Key Management in AWS
 
AWS March 2016 Webinar Series Getting Started with Serverless Architectures
AWS March 2016 Webinar Series   Getting Started with Serverless ArchitecturesAWS March 2016 Webinar Series   Getting Started with Serverless Architectures
AWS March 2016 Webinar Series Getting Started with Serverless Architectures
 
AWS APAC Webinar Week - Understanding AWS Storage Options
AWS APAC Webinar Week - Understanding AWS Storage OptionsAWS APAC Webinar Week - Understanding AWS Storage Options
AWS APAC Webinar Week - Understanding AWS Storage Options
 
Deep Dive: Hybrid Architectures
Deep Dive: Hybrid ArchitecturesDeep Dive: Hybrid Architectures
Deep Dive: Hybrid Architectures
 
AWS Mobile Services & SDK Introduction & Demo
AWS Mobile Services & SDK Introduction & DemoAWS Mobile Services & SDK Introduction & Demo
AWS Mobile Services & SDK Introduction & Demo
 
The Pace of Innovation - Pop-up Loft Tel Aviv
The Pace of Innovation - Pop-up Loft Tel AvivThe Pace of Innovation - Pop-up Loft Tel Aviv
The Pace of Innovation - Pop-up Loft Tel Aviv
 
Compute Without Servers – Building Applications with AWS Lambda - Technical 301
Compute Without Servers – Building Applications with AWS Lambda - Technical 301Compute Without Servers – Building Applications with AWS Lambda - Technical 301
Compute Without Servers – Building Applications with AWS Lambda - Technical 301
 
(NET307) Pinterest: The road from EC2-Classic To EC2-VPC
(NET307) Pinterest: The road from EC2-Classic To EC2-VPC(NET307) Pinterest: The road from EC2-Classic To EC2-VPC
(NET307) Pinterest: The road from EC2-Classic To EC2-VPC
 
(DEV204) Building High-Performance Native Cloud Apps In C++
(DEV204) Building High-Performance Native Cloud Apps In C++(DEV204) Building High-Performance Native Cloud Apps In C++
(DEV204) Building High-Performance Native Cloud Apps In C++
 
Security Day IAM Recommended Practices
Security Day IAM Recommended PracticesSecurity Day IAM Recommended Practices
Security Day IAM Recommended Practices
 
Ansible on aws - Pop-up Loft Tel Aviv
Ansible on aws - Pop-up Loft Tel AvivAnsible on aws - Pop-up Loft Tel Aviv
Ansible on aws - Pop-up Loft Tel Aviv
 
My First Big Data Application
My First Big Data ApplicationMy First Big Data Application
My First Big Data Application
 
Grid Computing for Financial Services
Grid Computing for Financial ServicesGrid Computing for Financial Services
Grid Computing for Financial Services
 
Getting Started with Amazon Enterprise Applications
Getting Started with Amazon Enterprise ApplicationsGetting Started with Amazon Enterprise Applications
Getting Started with Amazon Enterprise Applications
 
AWS July Webinar Series: Amazon redshift migration and load data 20150722
AWS July Webinar Series: Amazon redshift migration and load data 20150722AWS July Webinar Series: Amazon redshift migration and load data 20150722
AWS July Webinar Series: Amazon redshift migration and load data 20150722
 

Semelhante a Workshop: AWS Lamda Signal Corps vs Zombies

Semelhante a Workshop: AWS Lamda Signal Corps vs Zombies (20)

Zombie Apocalypse Workshop by Warren Santer and Kyle Somers, Solutions Archit...
Zombie Apocalypse Workshop by Warren Santer and Kyle Somers, Solutions Archit...Zombie Apocalypse Workshop by Warren Santer and Kyle Somers, Solutions Archit...
Zombie Apocalypse Workshop by Warren Santer and Kyle Somers, Solutions Archit...
 
AWS Summit Auckland - Getting Started with AWS Lambda and the Serverless Cloud
AWS Summit Auckland - Getting Started with AWS Lambda and the Serverless CloudAWS Summit Auckland - Getting Started with AWS Lambda and the Serverless Cloud
AWS Summit Auckland - Getting Started with AWS Lambda and the Serverless Cloud
 
Getting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless CloudGetting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless Cloud
 
Building Serverless Chat Bots - AWS August Webinar Series
Building Serverless Chat Bots - AWS August Webinar SeriesBuilding Serverless Chat Bots - AWS August Webinar Series
Building Serverless Chat Bots - AWS August Webinar Series
 
Getting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless CloudGetting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless Cloud
 
Raleigh DevDay 2017: Building serverless web applications
Raleigh DevDay 2017: Building serverless web applicationsRaleigh DevDay 2017: Building serverless web applications
Raleigh DevDay 2017: Building serverless web applications
 
Getting Started with AWS Lambda and Serverless Computing
Getting Started with AWS Lambda and Serverless ComputingGetting Started with AWS Lambda and Serverless Computing
Getting Started with AWS Lambda and Serverless Computing
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless Architectures
 
SRV203 Getting Started with AWS Lambda and the Serverless Cloud
SRV203 Getting Started with AWS Lambda and the Serverless CloudSRV203 Getting Started with AWS Lambda and the Serverless Cloud
SRV203 Getting Started with AWS Lambda and the Serverless Cloud
 
Build an App on AWS for Your First 10 Million Users
Build an App on AWS for Your First 10 Million UsersBuild an App on AWS for Your First 10 Million Users
Build an App on AWS for Your First 10 Million Users
 
Building Serverless Web Applications
Building Serverless Web Applications Building Serverless Web Applications
Building Serverless Web Applications
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless Architectures
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless Architectures
 
Raleigh DevDay 2017: Build a serverless web application in one day workshop
Raleigh DevDay 2017: Build a serverless web application in one day workshopRaleigh DevDay 2017: Build a serverless web application in one day workshop
Raleigh DevDay 2017: Build a serverless web application in one day workshop
 
Getting Started with AWS Lambda and Serverless Computing
Getting Started with AWS Lambda and Serverless ComputingGetting Started with AWS Lambda and Serverless Computing
Getting Started with AWS Lambda and Serverless Computing
 
Primeros pasos con arquitecturas serverless
Primeros pasos con arquitecturas serverlessPrimeros pasos con arquitecturas serverless
Primeros pasos con arquitecturas serverless
 
Getting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless CloudGetting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless Cloud
 
Get the EDGE to scale: Using Cloudfront along with edge compute to scale your...
Get the EDGE to scale: Using Cloudfront along with edge compute to scale your...Get the EDGE to scale: Using Cloudfront along with edge compute to scale your...
Get the EDGE to scale: Using Cloudfront along with edge compute to scale your...
 
Build an App on AWS for Your First 10 Million Users
Build an App on AWS for Your First 10 Million UsersBuild an App on AWS for Your First 10 Million Users
Build an App on AWS for Your First 10 Million Users
 
AWS Lambda: Event-driven Code in the Cloud
AWS Lambda: Event-driven Code in the CloudAWS Lambda: Event-driven Code in the Cloud
AWS Lambda: Event-driven Code in the Cloud
 

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
 

Último

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
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Último (20)

Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
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
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
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
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
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
 
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
 
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
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 

Workshop: AWS Lamda Signal Corps vs Zombies

  • 1. © 2015, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Paul Maddox, SolutionsArchitect, AWS Steven Bryen, SolutionsArchitect, AWS 25th April 2016 Zombie Apocalypse Workshop Building Serverless Microservices
  • 2. What to expect from this workshop • Goal of serverless architectures • Overview of AWS Lambda • Overview of Amazon API Gateway • Workshop Breakout – Time to build! • Wrap-up/Q&A
  • 3. Why serverless architectures? • No servers to manage and scale • Run at scale • Respond quickly to events • Only pay for compute time that you use • Developer productivity
  • 4. Serverless microservice architecture Static web content served from Amazon S3 AWS Lambda Web client Amazon API Gateway
  • 6. Your feedback helped create Lambda! • No direct responsibility for infrastructure resources • Quick and simple deployments • Highly available and scalable apps with zero administration • Costs that are closely aligned to application usage
  • 7. AWS compute offerings Amazon EC2 Resizable virtual servers in the cloud Amazon ECS Container management service for running Docker on EC2 AWS Lambda Serverless compute, run code in response to events
  • 8. Benefits of using Lambda Continuous ScalingNo Servers to Manage Lambda automatically scales your application by running code in response to each trigger. Your code runs in parallel and processes each trigger individually, scaling precisely with the size of the workload. Subsecond Metering With Lambda, you are charged for every 100 ms your code executes and the number of times your code is triggered. You don’t pay anything when your code isn’t running. Lambda automatically runs your code without requiring you to provision or manage servers. Just write the code and upload it to Lambda.
  • 9. AWS Lambda – How it works Bring your own code • Node.js, Java, Python • Java = Any JVM based language such as Scala, Clojure, etc. • Bring your own libraries Flexible invocation paths • Event or RequestResponse invoke options • Existing integrations with variousAWS services Simple resource model • Select memory from 128MB to 1.5GB in 64MB steps • CPU & Network allocated proportionately to RAM • Reports actual usage Fine grained permissions • Uses IAM role for Lambda execution permissions • Uses Resource policy for AWS event sources
  • 10. AWS Lambda – Use Cases Data Processing Execute code in response to changes in data, shifts in system state, or actions by users Control Systems Customize responses and response workflows to state and data changes within AWS Backends Execute backend logic to handle requests for web, mobile, IoT, and 3rd APIs
  • 12. Your feedback Managing multiple versions and stages of an API is difficult Monitoring third-party developers’ access is time consuming Access authorization is a challenge Traffic spikes create an operational burden What if I don’t want servers at all?
  • 13. API Gateway - Capabilities • Host multiple versions and stages of your APIs • Create and distribute API keys to developers • Leverage signature version 4 to authorize access to APIs • Throttle and monitor requests to protect your backend • Utilize Lambda as a backend
  • 14. Benefits of API Gateway • Managed cache to store API responses • Reduced latency and distributed denial of service (DDoS) protection through Amazon CloudFront • SDK generation for iOS, Android, and JavaScript • Swagger support • Request and response data transformation
  • 15. An API call flow Internet Mobile apps Websites Services AWS Lambda functions AWS API Gateway cache Endpoints on Amazon EC2/AWS Elastic Beanstalk Any other publicly accessible endpoint Amazon CloudWatch monitoring API Gateway
  • 17. ZOMBIES! Zombies have taken over major metropolitan areas. The AWS Lambda Signal Corps has built a communications system to connect remaining survivors. Come learn how AWS Lambda provides a platform for building event-driven microservices, all without the need to provision, manage, and scale servers. In this workshop, we will introduce the basics of using AWS Lambda to run code in response to events from Amazon DynamoDB, S3, and API Gateway. You'll work within a team to build a secure, scalable, fault-tolerant chat service with global reach from scratch using blueprints provided by us. Unfortunately, the blueprints provided only describe a very rudimentary communications system (the engineers of the project got mysteriously ill). We are looking to you and your team to add additional real-time life saving features (e.g., food cache locations, zombie motion detectors, undead counters) to the chat platform using Lambda functions. We will have a few special challenges for teams to complete. Rewards will be given to teams that complete all the extra-credit challenges.
  • 19. High-level Zombie Chat Architecture Amazon S3 Static Content/Chat Web App AWS Lambda Backend Logic Web client End user Amazon API Gateway REST Interface Amazon DynamoDB Messages Data Store
  • 20. Zombie Chat implementation S3 A new S3 bucket with single-page HTML5 web app API Gateway /zombie/messages API with GET and POST methods Lambda Functions GetMessagesFromDynamoDB and WriteMessagesToDynamoDB DynamoDB A ‘messages’ table to track channel, timestamp, message, and name
  • 21. AWS Service Flow Internet Activity Indicator Chat Service Activity Messages Search Service DynamoDB Streams Elasticsearch Service S3 Web Hosting Twilio Slack Chat API Gateway IoT Device IoT Processing Website AWS IoT or Amazon SNS
  • 23. Lab 1: Typing Indicator Internet Typing Indicator Service talkers /talkers Continuous GET Request polling of Typing Indicator Service to display current ‘talkers’ Single reusable service with DynamoDB PutItem implementation POST from Zombie chat to /talkers with Name, Channel, Timestamp when survivor types message Zombie Chat
  • 24. Lab 2: SMS Integration with Twilio Internet Twilio Processing Mobile/SMS /message Chat Service messages Twilio Phone Number /twilio Integration Response: Apache Velocity Template Language (VTL) to transform response to XML for Twilio • Pre-process Twilio message • Convert/standardize incoming parameters for Chat Service • HTTPS POST to Chat Service • Design Principle: Service re-use • Single implementation of DynamoDB PutItem Integration Request: Apache Velocity Template Language (VTL) to transform POST parameters into JSON.
  • 25. Lab 3: Search with Elasticsearch Service Search Service Dynamo Streams Elasticsearch Service messages Kibana plugin with Amazon Elasticsearch Service provides real-time UI to search messages Lambda function processes events and indexes them in Amazon Elasticsearch Service DynamoDB Streams provides a time-ordered flow of events (incoming survivor messages) Amazon Elasticsearch Service provides a managed service for search and analytics
  • 26. Lab 4: Send Messages from Slack Chat Service Slack Service messages Slack Chat Internet Pre-process Slack message before sending message to Chat Service • Design Principle: Service re-use • Single implementation of DynamoDB PutItem /slack /message
  • 27. Lab 5: Zombie Sensor with Intel Edison Internet Zombie Sensor Data Zombie Sensor Amazon SNS /message Chat Service messages • Lambda subscribes to SNS Topic • Pre-process message • HTTPS POST to Chat Service Node.js on Edison sends sensor events to Amazon SNS • Design Principle: Service re-use • Single implementation of DynamoDB PutItem
  • 28. Your challenge Base Challenge 1. Implement chat add-ons with the steps from the Lab Guide Extra Credit Challenges 1. Implement channel functionality for different chat rooms/private chats 2. Data store for weapons/food caches & bot to notify survivors of cache levels 3. Build your own challenges and share your design with us!
  • 29. Steps to get started • Break into groups (less than 5 people) or work solo!. • Select a leader to launch the CloudFormation Stack. • Complete add-ons from Lab Guide. • Decide on other challenges you’ll build! • Share your designs with fellow survivors! Workshop available at: https://github.com/awslabs/aws-lambda-zombie-workshop
  • 31. Run Apps for Pennies! Cost estimate to run this 3 hour workshop! • Lambda: FREE • 1st 1m requests are free each month! Duration pricing willbe sub-1penny! • DynamoDB: $0.0585 • $0.0065/hr for every 10 read units provisioned - 75 units provisioned/hr • $0.0065/hr for every 50 write units provisioned – 75 units provisioned/hr • DynamoDB Streams: 2.5m reads free per month • ElasticSearch Service: $0.282 • M3.medium with instance storage - $0.094/hr • API Gateway: $0.035 • $3.50/million API calls. Assume 10,000 calls made per hour during lab • CloudWatch Logs: $0.25 • $0.50 per GB/monthingested.Super high endestimate of 500MB of log dataduringworkshop • S3: $0.03 • $0.03 per GB for first 1TB a month. • Data Transfer: FREE • First 1GB/month out is free. Data transfer in is free!