SlideShare ist ein Scribd-Unternehmen logo
1 von 30
Downloaden Sie, um offline zu lesen
Going Serverless…
Dirk Ehms, Open Class Tickets
 Serverless Computing
 Serverless Architecture
 Serverless Operations
Open Class Tickets
https://unsplash.com/photos/NSVJAAXOYHs
Open Class Tickets - Platform
Tickets -
Studio App
Management
Console
Business Logic
e-Tickets
Building Blocks
Open Class Tickets - Facts
 Pure Serverless
 Software as a Service (SaaS)
 Multi Tenant
 Frameworks and Technologies
 Back-end Business Logic: AWS Lambda
 Tickets – Studio App: Ionic3 (Angular, HTML5, Cordova)
 Attendee e-Tickets: Apple Wallet (Passbook)
 Management Console: Bootstrap, Angular
 Dev-Tools: Serverless Framework
Tickets–StudioApp
Amazon
Polly
1. Create Ticket Assemble
pass.json file
Collect artwork
as PNG files
Create manifest.json file
Create digital signature
file for manifest
Zip it all up and change
extension to *.pkpass
icon.pgn,
logo.png,
strip.png
WWDR
intermediate cert,
Pass-signing cert +
private key
Apple Wallet
1. Create Ticket
AWS Lambda
 Heart of AWS Serverless Computing
 Never pay for idle: pay as you go
 Event driven, multiple event sources
 Available in (almost) all regions
1. Create Ticket (2)
System Architecture
Mobile Client
Web Browser
AWS SDK
AWS
AWS Lambda
Internet
2. API to access business logic
API Gateway
 Important part of the AWS Serverless Infrastructure
 Provides (consistent) RESTful APIs
 But API-ID changes per redeploy
 API protection and monitoring
 Supports
 Proxy integration
 Binary support
2. API to access business logic
System Architecture
Internet
https://90varu7pzb.execute-api.eu-central-1.amazonaws.com/prod/tickets
ionic
3. Persist ticket data
Amazon DynamoDB
 NoSQL database, fully managed
 Replicated continuously to 3 AZs
 Read / Write Provisioning
 Different multi tenant database approaches
 Tenant field per table
 Separate tables per tenant
 AWS account per tenant
 Alternative: RDS (Managed Service)
3. Persist attendee data
System Architecture
Internet
Mobile Client
ionic
4. Authenticate and Authorize
Cognito User Pool, Cognito Identity Pool
 API Gateway: Provides 3 types of authorization
 User Pools Authorizers
 AWS IAM authorization
 Custom Authorizers
 JSON Web Tokens (JWT)
 Custom fields :: tenantId
 No data export function (IaC -> don’t remove)
User Pool
1. Authenticate 
 2. JWT tokens
Cognito User Pool
4. Authenticate Users (2)
3. Call API Gateway 
…
AWS SDK
User Pool
Identity Pool
6. Request AWS creds 
 7. Temporary AWS creds
AWS Security
Token Service
(STS)
Cognito User Pool + Cognito Identity Pool
4. Authenticate Users (3)
AWS SDK
9. Call API Gateway 
…
5. Event Handling
Simple Notification Service (SNS)
 Publish/Subscribe Messaging
 One SNS topic per event type
 Mobile Notifications
 Push notifications
 SMS
 Alternatives:
 DDB Streams
 Amazon Kinesis Streams
5. Event Handling (2)
API Gateway
SNS AWS Lambda DynamoDB
(Projection)
DynamoDB
System
Architecture
Internet
Mobile Client
ionic
6. Send Ticket to attendee
Simple Email Service (SES)
 Sending and receiving emails
 Available in only 3 Region
 (us-east-1, us-west-2, eu-west-1)
 Starts in Sandbox mode
 200 emails per day to verified addresses
 Handling Bounces and Complaints
 Define rules for receiving emails
6. Send Ticket to attendee (3)
API Gateway
SNS AWS Lambda SES
DynamoDB
Internet
Mobile Client
ionic
System
Architecture
7. Store Resource Files
Amazon S3 (Simple Storage Service)
 Event Bucket
 Ticket Bucket (Apple Wallet)
 Tenant Resource Bucket
 Email Template
 Ticket Images
 Management Console:
 Static Website hosting
7. Store Resource Files (2)
API Gateway
SNS AWS Lambda S3 Bucket
DynamoDB
System
Architecture
Internet
Mobile Client
ionic
8. Provide a Management Console
Amazon CloudFront
 Content Delivery Network (CDN-Service)
 Configure Tenant Settings
 Management Console:
 Static Website hosting -> S3 Bucket
 Alternative: S3 Bucket direct access
9. Use Custom Domains and HTTPS
AWS Certificate Manager (ACM)
 Custom Domains must be verified to be used
 API Gateway
 Base path mapping
 Now integrated with AWS Certificate Manager
 Amazon CloudFront
10. Hide Secrets
AWS Key Management Service (KMS)
 Create and control the encryption keys
 Each customer master key costs $1/month
KMS_ENCRYPT_CMD=”aws kms encrypt --key-id $AWS_KMS_ARN 
--output text --query CiphertextBlob”
export SECRET_ENCRYPTED=$( echo $( $KMS_ENCRYPT_CMD --plaintext ”secret" ) )
10. Hide Secrets (2)
AWS Key Management Service (KMS)
const aws = require('aws-sdk');
const kms = new aws.KMS();
...
kms.decrypt({ CiphertextBlob: new Buffer(process.env.SECRET_ENCRYPTED,
'base64') }, (err, data) => {
if (err) {
return callback(err);
}
const decrypted = data.Plaintext.toString('ascii');
console.log('AFTER DECRYPTION:' + decrypted);
});
Infrastructure as Code (IaC)
AWS CloudFormation
 Create templates of your infrastructure
 CloudFormation provisions AWS resources based on
dependency needs
 Nested CloudFormation stacks vs cross-stack references
 Alternatives: Terraform, CLI
Infrastructure as Code (2)
AWS CloudFormation
 Lambda-backed Custom Resource
 Insert DB records
 (Create Cognito instances)
 Delete Your Stacks But Keep Your Data
 Beware of renaming immutable attributes
 Best practice: resource-only CloudFormation stack
"myS3Bucket" : {
"Type" : "AWS::S3::Bucket",
"DeletionPolicy" : "Retain"
}
Summary
Pros
 No servers to manage
 Don’t pay for idle servers
 Continuous Scaling
 Fits well with microservices
Cons
 Vendor lock-in
 Depending on single AWS region
 Cold server latency
 Doesn't support legacy apps
 Local development & testing
Hype Driven Development
https://blog.daftcode.pl/hype-driven-development-3469fc2e9b22
A good hockey player plays
where the puck is. A great
hockey player plays where
the puck is going to be.
★ ★ ★
Wayne Gretzky
Thank You

Weitere ähnliche Inhalte

Was ist angesagt?

Serverless with IAC - terraform과 cloudformation 비교
Serverless with IAC - terraform과 cloudformation 비교Serverless with IAC - terraform과 cloudformation 비교
Serverless with IAC - terraform과 cloudformation 비교재현 신
 
NEW LAUNCH! Developing Serverless C# Applications
NEW LAUNCH! Developing Serverless C# ApplicationsNEW LAUNCH! Developing Serverless C# Applications
NEW LAUNCH! Developing Serverless C# ApplicationsAmazon Web Services
 
AWS Step Function with API Gateway Integration - Metin Kale, Chicago
AWS Step Function with API Gateway Integration - Metin Kale, ChicagoAWS Step Function with API Gateway Integration - Metin Kale, Chicago
AWS Step Function with API Gateway Integration - Metin Kale, ChicagoAWS Chicago
 
Serverless - When to FaaS?
Serverless - When to FaaS?Serverless - When to FaaS?
Serverless - When to FaaS?Benny Bauer
 
AWS re:Invent 2016: How Harvard University Improves Scalable Cloud Network Se...
AWS re:Invent 2016: How Harvard University Improves Scalable Cloud Network Se...AWS re:Invent 2016: How Harvard University Improves Scalable Cloud Network Se...
AWS re:Invent 2016: How Harvard University Improves Scalable Cloud Network Se...Amazon Web Services
 
Securing The AWS Cloud, Steve Riley, AWS Events, April 2010
Securing The AWS Cloud, Steve Riley, AWS Events, April 2010Securing The AWS Cloud, Steve Riley, AWS Events, April 2010
Securing The AWS Cloud, Steve Riley, AWS Events, April 2010Amazon Web Services
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesAmazon Web Services
 
Log Analytics with Amazon Elasticsearch Service and Amazon Kinesis - March 20...
Log Analytics with Amazon Elasticsearch Service and Amazon Kinesis - March 20...Log Analytics with Amazon Elasticsearch Service and Amazon Kinesis - March 20...
Log Analytics with Amazon Elasticsearch Service and Amazon Kinesis - March 20...Amazon Web Services
 
Aws lambda and accesing AWS RDS - Clouddictive
Aws lambda and accesing AWS RDS - ClouddictiveAws lambda and accesing AWS RDS - Clouddictive
Aws lambda and accesing AWS RDS - ClouddictiveClouddictive
 
A Walk in the Cloud with AWS Lambda
A Walk in the Cloud with AWS LambdaA Walk in the Cloud with AWS Lambda
A Walk in the Cloud with AWS LambdaAmazon Web Services
 
AWS Lambda from the Trenches
AWS Lambda from the TrenchesAWS Lambda from the Trenches
AWS Lambda from the TrenchesYan Cui
 
使用 Serverless 技術打造支援 Alexa 的物聯網服務
使用 Serverless 技術打造支援 Alexa 的物聯網服務使用 Serverless 技術打造支援 Alexa 的物聯網服務
使用 Serverless 技術打造支援 Alexa 的物聯網服務Amazon Web Services
 
AWS re:Invent 2016: Running Batch Jobs on Amazon ECS (CON310)
AWS re:Invent 2016: Running Batch Jobs on Amazon ECS (CON310)AWS re:Invent 2016: Running Batch Jobs on Amazon ECS (CON310)
AWS re:Invent 2016: Running Batch Jobs on Amazon ECS (CON310)Amazon Web Services
 
Serverless Architecture
Serverless ArchitectureServerless Architecture
Serverless ArchitectureElana Krasner
 
What is AWS lambda?
What is AWS lambda?What is AWS lambda?
What is AWS lambda?Whizlabs
 
An introduction to serverless architectures (February 2017)
An introduction to serverless architectures (February 2017)An introduction to serverless architectures (February 2017)
An introduction to serverless architectures (February 2017)Julien SIMON
 
AWS Lambda and Serverless framework: lessons learned while building a serverl...
AWS Lambda and Serverless framework: lessons learned while building a serverl...AWS Lambda and Serverless framework: lessons learned while building a serverl...
AWS Lambda and Serverless framework: lessons learned while building a serverl...Luciano Mammino
 

Was ist angesagt? (20)

Serverless with IAC - terraform과 cloudformation 비교
Serverless with IAC - terraform과 cloudformation 비교Serverless with IAC - terraform과 cloudformation 비교
Serverless with IAC - terraform과 cloudformation 비교
 
NEW LAUNCH! Developing Serverless C# Applications
NEW LAUNCH! Developing Serverless C# ApplicationsNEW LAUNCH! Developing Serverless C# Applications
NEW LAUNCH! Developing Serverless C# Applications
 
Serverless computing
Serverless computingServerless computing
Serverless computing
 
AWS Step Function with API Gateway Integration - Metin Kale, Chicago
AWS Step Function with API Gateway Integration - Metin Kale, ChicagoAWS Step Function with API Gateway Integration - Metin Kale, Chicago
AWS Step Function with API Gateway Integration - Metin Kale, Chicago
 
Serverless - When to FaaS?
Serverless - When to FaaS?Serverless - When to FaaS?
Serverless - When to FaaS?
 
AWS re:Invent 2016: How Harvard University Improves Scalable Cloud Network Se...
AWS re:Invent 2016: How Harvard University Improves Scalable Cloud Network Se...AWS re:Invent 2016: How Harvard University Improves Scalable Cloud Network Se...
AWS re:Invent 2016: How Harvard University Improves Scalable Cloud Network Se...
 
Securing The AWS Cloud, Steve Riley, AWS Events, April 2010
Securing The AWS Cloud, Steve Riley, AWS Events, April 2010Securing The AWS Cloud, Steve Riley, AWS Events, April 2010
Securing The AWS Cloud, Steve Riley, AWS Events, April 2010
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless Architectures
 
Log Analytics with Amazon Elasticsearch Service and Amazon Kinesis - March 20...
Log Analytics with Amazon Elasticsearch Service and Amazon Kinesis - March 20...Log Analytics with Amazon Elasticsearch Service and Amazon Kinesis - March 20...
Log Analytics with Amazon Elasticsearch Service and Amazon Kinesis - March 20...
 
Aws lambda and accesing AWS RDS - Clouddictive
Aws lambda and accesing AWS RDS - ClouddictiveAws lambda and accesing AWS RDS - Clouddictive
Aws lambda and accesing AWS RDS - Clouddictive
 
A Walk in the Cloud with AWS Lambda
A Walk in the Cloud with AWS LambdaA Walk in the Cloud with AWS Lambda
A Walk in the Cloud with AWS Lambda
 
AWS Lambda and Serverless Cloud
AWS Lambda and Serverless CloudAWS Lambda and Serverless Cloud
AWS Lambda and Serverless Cloud
 
AWS Lambda from the Trenches
AWS Lambda from the TrenchesAWS Lambda from the Trenches
AWS Lambda from the Trenches
 
Serverless for Developers
Serverless for DevelopersServerless for Developers
Serverless for Developers
 
使用 Serverless 技術打造支援 Alexa 的物聯網服務
使用 Serverless 技術打造支援 Alexa 的物聯網服務使用 Serverless 技術打造支援 Alexa 的物聯網服務
使用 Serverless 技術打造支援 Alexa 的物聯網服務
 
AWS re:Invent 2016: Running Batch Jobs on Amazon ECS (CON310)
AWS re:Invent 2016: Running Batch Jobs on Amazon ECS (CON310)AWS re:Invent 2016: Running Batch Jobs on Amazon ECS (CON310)
AWS re:Invent 2016: Running Batch Jobs on Amazon ECS (CON310)
 
Serverless Architecture
Serverless ArchitectureServerless Architecture
Serverless Architecture
 
What is AWS lambda?
What is AWS lambda?What is AWS lambda?
What is AWS lambda?
 
An introduction to serverless architectures (February 2017)
An introduction to serverless architectures (February 2017)An introduction to serverless architectures (February 2017)
An introduction to serverless architectures (February 2017)
 
AWS Lambda and Serverless framework: lessons learned while building a serverl...
AWS Lambda and Serverless framework: lessons learned while building a serverl...AWS Lambda and Serverless framework: lessons learned while building a serverl...
AWS Lambda and Serverless framework: lessons learned while building a serverl...
 

Ähnlich wie Going Serverless

Containerless in the Cloud with AWS Lambda
Containerless in the Cloud with AWS LambdaContainerless in the Cloud with AWS Lambda
Containerless in the Cloud with AWS LambdaRyan Cuprak
 
Deep-Dive: Building Native iOS and Android Application with the AWS Mobile SDK
Deep-Dive: Building Native iOS and Android Application with the AWS Mobile SDKDeep-Dive: Building Native iOS and Android Application with the AWS Mobile SDK
Deep-Dive: Building Native iOS and Android Application with the AWS Mobile SDKAmazon Web Services
 
윈도 닷넷 개발자를 위한 솔루션 클라우드 데브옵스 솔루션
윈도 닷넷 개발자를 위한 솔루션 클라우드 데브옵스 솔루션윈도 닷넷 개발자를 위한 솔루션 클라우드 데브옵스 솔루션
윈도 닷넷 개발자를 위한 솔루션 클라우드 데브옵스 솔루션Amazon Web Services Korea
 
AWS re:Invent 2016: Deep-Dive: Native, Hybrid and Web patterns with Serverles...
AWS re:Invent 2016: Deep-Dive: Native, Hybrid and Web patterns with Serverles...AWS re:Invent 2016: Deep-Dive: Native, Hybrid and Web patterns with Serverles...
AWS re:Invent 2016: Deep-Dive: Native, Hybrid and Web patterns with Serverles...Amazon Web Services
 
開發語音控制的IoT應用服務
開發語音控制的IoT應用服務開發語音控制的IoT應用服務
開發語音控制的IoT應用服務Amazon Web Services
 
게임을 위한 Cloud Native on AWS (김일호 솔루션즈 아키텍트, AWS) :: Gaming on AWS 2018
게임을 위한 Cloud Native on AWS (김일호 솔루션즈 아키텍트, AWS) :: Gaming on AWS 2018게임을 위한 Cloud Native on AWS (김일호 솔루션즈 아키텍트, AWS) :: Gaming on AWS 2018
게임을 위한 Cloud Native on AWS (김일호 솔루션즈 아키텍트, AWS) :: Gaming on AWS 2018Amazon Web Services Korea
 
Monitoring Containers at Scale - September Webinar Series
Monitoring Containers at Scale - September Webinar SeriesMonitoring Containers at Scale - September Webinar Series
Monitoring Containers at Scale - September Webinar SeriesAmazon Web Services
 
2 years with python and serverless
2 years with python and serverless2 years with python and serverless
2 years with python and serverlessHector Canto
 
DevOps, Microservices and Serverless Architecture
DevOps, Microservices and Serverless ArchitectureDevOps, Microservices and Serverless Architecture
DevOps, Microservices and Serverless ArchitectureMikhail Prudnikov
 
DevOps Fest 2019. Alex Casalboni. Configuration management and service discov...
DevOps Fest 2019. Alex Casalboni. Configuration management and service discov...DevOps Fest 2019. Alex Casalboni. Configuration management and service discov...
DevOps Fest 2019. Alex Casalboni. Configuration management and service discov...DevOps_Fest
 
Build Your Mobile App Faster with AWS Mobile Services (Part 1 - AWS)
Build Your Mobile App Faster with AWS Mobile Services (Part 1 - AWS)Build Your Mobile App Faster with AWS Mobile Services (Part 1 - AWS)
Build Your Mobile App Faster with AWS Mobile Services (Part 1 - AWS)Amazon Web Services
 
(MBL311) Workshop: Build an Android App Using AWS Mobile Services | AWS re:In...
(MBL311) Workshop: Build an Android App Using AWS Mobile Services | AWS re:In...(MBL311) Workshop: Build an Android App Using AWS Mobile Services | AWS re:In...
(MBL311) Workshop: Build an Android App Using AWS Mobile Services | AWS re:In...Amazon Web Services
 
Hands-on with AWS IoT (November 2016)
Hands-on with AWS IoT (November 2016)Hands-on with AWS IoT (November 2016)
Hands-on with AWS IoT (November 2016)Julien SIMON
 
Amazon ECS Container Service Deep Dive
Amazon ECS Container Service Deep DiveAmazon ECS Container Service Deep Dive
Amazon ECS Container Service Deep DiveAmazon Web Services
 
AWS IoT 및 Mobile Hub 서비스 소개 (김일호) :: re:Invent re:Cap Webinar 2015
AWS IoT 및 Mobile Hub 서비스 소개 (김일호) :: re:Invent re:Cap Webinar 2015AWS IoT 및 Mobile Hub 서비스 소개 (김일호) :: re:Invent re:Cap Webinar 2015
AWS IoT 및 Mobile Hub 서비스 소개 (김일호) :: re:Invent re:Cap Webinar 2015Amazon Web Services Korea
 
AWS re:Invent 2016: IoT Visualizations and Analytics (IOT306)
AWS re:Invent 2016: IoT Visualizations and Analytics (IOT306)AWS re:Invent 2016: IoT Visualizations and Analytics (IOT306)
AWS re:Invent 2016: IoT Visualizations and Analytics (IOT306)Amazon Web Services
 
Serveless design patterns
Serveless design patternsServeless design patterns
Serveless design patternsYan Cui
 
Building Cloud-powered Mobile Apps
Building Cloud-powered Mobile AppsBuilding Cloud-powered Mobile Apps
Building Cloud-powered Mobile AppsDanilo Poccia
 

Ähnlich wie Going Serverless (20)

Containerless in the Cloud with AWS Lambda
Containerless in the Cloud with AWS LambdaContainerless in the Cloud with AWS Lambda
Containerless in the Cloud with AWS Lambda
 
Deep-Dive: Building Native iOS and Android Application with the AWS Mobile SDK
Deep-Dive: Building Native iOS and Android Application with the AWS Mobile SDKDeep-Dive: Building Native iOS and Android Application with the AWS Mobile SDK
Deep-Dive: Building Native iOS and Android Application with the AWS Mobile SDK
 
윈도 닷넷 개발자를 위한 솔루션 클라우드 데브옵스 솔루션
윈도 닷넷 개발자를 위한 솔루션 클라우드 데브옵스 솔루션윈도 닷넷 개발자를 위한 솔루션 클라우드 데브옵스 솔루션
윈도 닷넷 개발자를 위한 솔루션 클라우드 데브옵스 솔루션
 
AWS re:Invent 2016: Deep-Dive: Native, Hybrid and Web patterns with Serverles...
AWS re:Invent 2016: Deep-Dive: Native, Hybrid and Web patterns with Serverles...AWS re:Invent 2016: Deep-Dive: Native, Hybrid and Web patterns with Serverles...
AWS re:Invent 2016: Deep-Dive: Native, Hybrid and Web patterns with Serverles...
 
開發語音控制的IoT應用服務
開發語音控制的IoT應用服務開發語音控制的IoT應用服務
開發語音控制的IoT應用服務
 
게임을 위한 Cloud Native on AWS (김일호 솔루션즈 아키텍트, AWS) :: Gaming on AWS 2018
게임을 위한 Cloud Native on AWS (김일호 솔루션즈 아키텍트, AWS) :: Gaming on AWS 2018게임을 위한 Cloud Native on AWS (김일호 솔루션즈 아키텍트, AWS) :: Gaming on AWS 2018
게임을 위한 Cloud Native on AWS (김일호 솔루션즈 아키텍트, AWS) :: Gaming on AWS 2018
 
Monitoring Containers at Scale - September Webinar Series
Monitoring Containers at Scale - September Webinar SeriesMonitoring Containers at Scale - September Webinar Series
Monitoring Containers at Scale - September Webinar Series
 
2 years with python and serverless
2 years with python and serverless2 years with python and serverless
2 years with python and serverless
 
DevOps, Microservices and Serverless Architecture
DevOps, Microservices and Serverless ArchitectureDevOps, Microservices and Serverless Architecture
DevOps, Microservices and Serverless Architecture
 
DevOps Fest 2019. Alex Casalboni. Configuration management and service discov...
DevOps Fest 2019. Alex Casalboni. Configuration management and service discov...DevOps Fest 2019. Alex Casalboni. Configuration management and service discov...
DevOps Fest 2019. Alex Casalboni. Configuration management and service discov...
 
Build Your Mobile App Faster with AWS Mobile Services (Part 1 - AWS)
Build Your Mobile App Faster with AWS Mobile Services (Part 1 - AWS)Build Your Mobile App Faster with AWS Mobile Services (Part 1 - AWS)
Build Your Mobile App Faster with AWS Mobile Services (Part 1 - AWS)
 
Fine Uploader S3
Fine Uploader S3Fine Uploader S3
Fine Uploader S3
 
(MBL311) Workshop: Build an Android App Using AWS Mobile Services | AWS re:In...
(MBL311) Workshop: Build an Android App Using AWS Mobile Services | AWS re:In...(MBL311) Workshop: Build an Android App Using AWS Mobile Services | AWS re:In...
(MBL311) Workshop: Build an Android App Using AWS Mobile Services | AWS re:In...
 
Hands-on with AWS IoT (November 2016)
Hands-on with AWS IoT (November 2016)Hands-on with AWS IoT (November 2016)
Hands-on with AWS IoT (November 2016)
 
Amazon ECS Container Service Deep Dive
Amazon ECS Container Service Deep DiveAmazon ECS Container Service Deep Dive
Amazon ECS Container Service Deep Dive
 
AWS Lambda
AWS LambdaAWS Lambda
AWS Lambda
 
AWS IoT 및 Mobile Hub 서비스 소개 (김일호) :: re:Invent re:Cap Webinar 2015
AWS IoT 및 Mobile Hub 서비스 소개 (김일호) :: re:Invent re:Cap Webinar 2015AWS IoT 및 Mobile Hub 서비스 소개 (김일호) :: re:Invent re:Cap Webinar 2015
AWS IoT 및 Mobile Hub 서비스 소개 (김일호) :: re:Invent re:Cap Webinar 2015
 
AWS re:Invent 2016: IoT Visualizations and Analytics (IOT306)
AWS re:Invent 2016: IoT Visualizations and Analytics (IOT306)AWS re:Invent 2016: IoT Visualizations and Analytics (IOT306)
AWS re:Invent 2016: IoT Visualizations and Analytics (IOT306)
 
Serveless design patterns
Serveless design patternsServeless design patterns
Serveless design patterns
 
Building Cloud-powered Mobile Apps
Building Cloud-powered Mobile AppsBuilding Cloud-powered Mobile Apps
Building Cloud-powered Mobile Apps
 

Kürzlich hochgeladen

Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
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 REVIEWERMadyBayot
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
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.pdfsudhanshuwaghmare1
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
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 WoodJuan lago vázquez
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbuapidays
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
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.pptxRustici Software
 
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 TerraformAndrey Devyatkin
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusZilliz
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
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 educationjfdjdjcjdnsjd
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 

Kürzlich hochgeladen (20)

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
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
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
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
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
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
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
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
 
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
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
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
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 

Going Serverless

  • 1. Going Serverless… Dirk Ehms, Open Class Tickets  Serverless Computing  Serverless Architecture  Serverless Operations
  • 3. Open Class Tickets - Platform Tickets - Studio App Management Console Business Logic e-Tickets Building Blocks
  • 4. Open Class Tickets - Facts  Pure Serverless  Software as a Service (SaaS)  Multi Tenant  Frameworks and Technologies  Back-end Business Logic: AWS Lambda  Tickets – Studio App: Ionic3 (Angular, HTML5, Cordova)  Attendee e-Tickets: Apple Wallet (Passbook)  Management Console: Bootstrap, Angular  Dev-Tools: Serverless Framework
  • 6. 1. Create Ticket Assemble pass.json file Collect artwork as PNG files Create manifest.json file Create digital signature file for manifest Zip it all up and change extension to *.pkpass icon.pgn, logo.png, strip.png WWDR intermediate cert, Pass-signing cert + private key Apple Wallet
  • 7. 1. Create Ticket AWS Lambda  Heart of AWS Serverless Computing  Never pay for idle: pay as you go  Event driven, multiple event sources  Available in (almost) all regions
  • 8. 1. Create Ticket (2) System Architecture Mobile Client Web Browser AWS SDK AWS AWS Lambda Internet
  • 9. 2. API to access business logic API Gateway  Important part of the AWS Serverless Infrastructure  Provides (consistent) RESTful APIs  But API-ID changes per redeploy  API protection and monitoring  Supports  Proxy integration  Binary support
  • 10. 2. API to access business logic System Architecture Internet https://90varu7pzb.execute-api.eu-central-1.amazonaws.com/prod/tickets ionic
  • 11. 3. Persist ticket data Amazon DynamoDB  NoSQL database, fully managed  Replicated continuously to 3 AZs  Read / Write Provisioning  Different multi tenant database approaches  Tenant field per table  Separate tables per tenant  AWS account per tenant  Alternative: RDS (Managed Service)
  • 12. 3. Persist attendee data System Architecture Internet Mobile Client ionic
  • 13. 4. Authenticate and Authorize Cognito User Pool, Cognito Identity Pool  API Gateway: Provides 3 types of authorization  User Pools Authorizers  AWS IAM authorization  Custom Authorizers  JSON Web Tokens (JWT)  Custom fields :: tenantId  No data export function (IaC -> don’t remove)
  • 14. User Pool 1. Authenticate   2. JWT tokens Cognito User Pool 4. Authenticate Users (2) 3. Call API Gateway  … AWS SDK
  • 15. User Pool Identity Pool 6. Request AWS creds   7. Temporary AWS creds AWS Security Token Service (STS) Cognito User Pool + Cognito Identity Pool 4. Authenticate Users (3) AWS SDK 9. Call API Gateway  …
  • 16. 5. Event Handling Simple Notification Service (SNS)  Publish/Subscribe Messaging  One SNS topic per event type  Mobile Notifications  Push notifications  SMS  Alternatives:  DDB Streams  Amazon Kinesis Streams
  • 17. 5. Event Handling (2) API Gateway SNS AWS Lambda DynamoDB (Projection) DynamoDB System Architecture Internet Mobile Client ionic
  • 18. 6. Send Ticket to attendee Simple Email Service (SES)  Sending and receiving emails  Available in only 3 Region  (us-east-1, us-west-2, eu-west-1)  Starts in Sandbox mode  200 emails per day to verified addresses  Handling Bounces and Complaints  Define rules for receiving emails
  • 19. 6. Send Ticket to attendee (3) API Gateway SNS AWS Lambda SES DynamoDB Internet Mobile Client ionic System Architecture
  • 20. 7. Store Resource Files Amazon S3 (Simple Storage Service)  Event Bucket  Ticket Bucket (Apple Wallet)  Tenant Resource Bucket  Email Template  Ticket Images  Management Console:  Static Website hosting
  • 21. 7. Store Resource Files (2) API Gateway SNS AWS Lambda S3 Bucket DynamoDB System Architecture Internet Mobile Client ionic
  • 22. 8. Provide a Management Console Amazon CloudFront  Content Delivery Network (CDN-Service)  Configure Tenant Settings  Management Console:  Static Website hosting -> S3 Bucket  Alternative: S3 Bucket direct access
  • 23. 9. Use Custom Domains and HTTPS AWS Certificate Manager (ACM)  Custom Domains must be verified to be used  API Gateway  Base path mapping  Now integrated with AWS Certificate Manager  Amazon CloudFront
  • 24. 10. Hide Secrets AWS Key Management Service (KMS)  Create and control the encryption keys  Each customer master key costs $1/month KMS_ENCRYPT_CMD=”aws kms encrypt --key-id $AWS_KMS_ARN --output text --query CiphertextBlob” export SECRET_ENCRYPTED=$( echo $( $KMS_ENCRYPT_CMD --plaintext ”secret" ) )
  • 25. 10. Hide Secrets (2) AWS Key Management Service (KMS) const aws = require('aws-sdk'); const kms = new aws.KMS(); ... kms.decrypt({ CiphertextBlob: new Buffer(process.env.SECRET_ENCRYPTED, 'base64') }, (err, data) => { if (err) { return callback(err); } const decrypted = data.Plaintext.toString('ascii'); console.log('AFTER DECRYPTION:' + decrypted); });
  • 26. Infrastructure as Code (IaC) AWS CloudFormation  Create templates of your infrastructure  CloudFormation provisions AWS resources based on dependency needs  Nested CloudFormation stacks vs cross-stack references  Alternatives: Terraform, CLI
  • 27. Infrastructure as Code (2) AWS CloudFormation  Lambda-backed Custom Resource  Insert DB records  (Create Cognito instances)  Delete Your Stacks But Keep Your Data  Beware of renaming immutable attributes  Best practice: resource-only CloudFormation stack "myS3Bucket" : { "Type" : "AWS::S3::Bucket", "DeletionPolicy" : "Retain" }
  • 28. Summary Pros  No servers to manage  Don’t pay for idle servers  Continuous Scaling  Fits well with microservices Cons  Vendor lock-in  Depending on single AWS region  Cold server latency  Doesn't support legacy apps  Local development & testing
  • 29. Hype Driven Development https://blog.daftcode.pl/hype-driven-development-3469fc2e9b22 A good hockey player plays where the puck is. A great hockey player plays where the puck is going to be. ★ ★ ★ Wayne Gretzky