SlideShare a Scribd company logo
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

More Related Content

What's hot

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
Amazon Web Services
 
Serverless computing
Serverless computingServerless computing
Serverless computing
Dmitriy Ivanov
 
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
AWS 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 2010
Amazon Web Services
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless Architectures
Amazon 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 - Clouddictive
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
Amazon Web Services
 
AWS Lambda and Serverless Cloud
AWS Lambda and Serverless CloudAWS Lambda and Serverless Cloud
AWS Lambda and Serverless Cloud
Amazon Web Services
 
AWS Lambda from the Trenches
AWS Lambda from the TrenchesAWS Lambda from the Trenches
AWS Lambda from the Trenches
Yan Cui
 
Serverless for Developers
Serverless for DevelopersServerless for Developers
Serverless for Developers
Amazon Web Services
 
使用 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 Architecture
Elana 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
 

What's hot (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...
 

Similar to 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 Lambda
Ryan 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 SDK
Amazon 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 2018
Amazon 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 Series
Amazon Web Services
 
2 years with python and serverless
2 years with python and serverless2 years with python and serverless
2 years with python and serverless
Hector Canto
 
DevOps, Microservices and Serverless Architecture
DevOps, Microservices and Serverless ArchitectureDevOps, Microservices and Serverless Architecture
DevOps, Microservices and Serverless Architecture
Mikhail 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
 
Fine Uploader S3
Fine Uploader S3Fine Uploader S3
Fine Uploader S3
Ray Nicholus
 
(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 Dive
Amazon Web Services
 
AWS Lambda
AWS LambdaAWS Lambda
AWS Lambda
Scott Leberknight
 
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
Amazon 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 patterns
Yan Cui
 
Building Cloud-powered Mobile Apps
Building Cloud-powered Mobile AppsBuilding Cloud-powered Mobile Apps
Building Cloud-powered Mobile Apps
Danilo Poccia
 

Similar to 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
 

Recently uploaded

“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
IndexBug
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 

Recently uploaded (20)

“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 

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