SlideShare ist ein Scribd-Unternehmen logo
1 von 43
SERVERLESS
ARCHITECTURES
~ WHOAMI
▸Full stack developer 10+ years
▸Innovation Center of Accenture Cloud Platform
YEGOR FADEEV
WHY SERVERLESS?
DON’T WORRY, THERE ARE
SERVERS
THERE ARE NO SERVERS THAT
WE MANAGE
DEVS WANT TO GO NOOPS
http://martinfowler.com/bliki/DevOpsCulture.html
DEVS WANT TO GO NODEVOPS
http://martinfowler.com/bliki/DevOpsCulture.html
STATIC WEBSITE
- Highly Available Serverless Storage
- Scaleable and Elastic
- Replicated across 2 availability zones
- Supports HTTP requestsS3
Static HTML
CSS/Media
Rich JavaScript Apps
GET
http
S3 StorageCloudFront
USER
Static HTML
CSS/Media
Rich JavaScript Apps
R53 Domain
GET
http
example.com
S3 StorageCloudFront
USER
Static HTML
CSS/Media
Rich JavaScript Apps
COST MODEL: $0.03 GiB per Month
S3 HIGHLY AVAILABLE STORAGE
- Covered by AWS S3 SLA
- Durability: 99.999999999%
- Availability: 99.99%
SLOW WRITE OPERATIONS
R53 Domain
GET
http
example.com
S3 StorageCloudFront
USER
DYNAMIC WEBSITE
GET
Static HTML
CSS/Media
Rich JavaScript Apps
S3 StorageCloudFront
GET
POST
PUT
DELETE
Dynamic Data
Data from Database
Data from External Service
dataAPI Gateway Lambda
ajax
http
event
USER
LAMBDA
- AWS Computing Service
- Designed to reflect async Actor Model
- Resilient and Scaleable
- 512 RAM
- Supports Runtimes
- Java
- Python
- NodeJS
- Go (implicitly)
- Max Timeout 5 mins
- Pricing:
- 0.20$ per million requests.
- Billable 100 milliseconds
Lambda
API Gateway
EVENT SOURCE
Kinesis Data Streams
SNS Queue or Topic data
Lambda
other data
CONSUMER OR EVENT
CRON Job
API Gateway
Lambda
+
- API Management Tool
- Authorization + Custom Authorizer
- Defines: Environment Variables for Lambda
- Can be defined with Swagger and imported
- Code Supports Versioning
- Integrated with CloudWatch
- Lambda Containers are Cached for 5 minutes
- Can be deployed with “apex.run” tool
- User can write files in /tmp
apply plugin: 'java'
version = '1.0.0'
mainClassName='Main'
jar {
archiveName = 'apex.jar'
}
repositories {
mavenCentral()
}
dependencies {
compile (
'com.amazonaws:aws-lambda-java-core:1.1.0',
'com.amazonaws:aws-lambda-java-events:1.1.0'
)
}
GRADLE
$ ./gradlew clean build
BUILD SUCCESSFUL
Total time: 9.134 secs
SHELL
public class Main implements RequestHandler<String, String> {
@Override
public String handleRequest(String input, Context context) {
context.getLogger().log("My input is: " + input);
return "Hello: " + input;
}
}
JAVA
{
"runtime": "java8",
"role": "arn:aws:iam::776022106184:role/apex_lambda_function",
"handler": "Main::handleRequest",
"memory": 512,
"timeout": 32
}
Apex.run
$ apex deploy
• function created SHELL
GET
POST
PUT
DELETE
dataAPI Gateway Lambda
ajax event
USER
DB_URL
DB_PORT
DB_USER
Variables
MAKE IT SECURE
GET
POST
PUT
DELETE
dataAPI Gateway Lambda
ajax event
USER
DB_URL
DB_PORT
DB_USER
Variables
GET
POST
PUT
DELETE
dataAPI Gateway Lambda
ajax event
USER
VPC
DB_URL
DB_PORT
DB_USER
Variables
GET
POST
PUT
DELETE
dataAPI Gateway Lambda
ajax event
USER
VPC
Authorizer
Lambda
DB_URL
DB_PORT
DB_USER
Variables
GET
POST
PUT
DELETE
dataAPI Gateway Lambda
Ajax with
access token event
USER
VPC
Authorizer
Lambda
Request
access
token
SSO Service
R53 Domain
api.example.com
GET
POST
PUT
DELETE
dataAPI Gateway Lambda
Ajax with
access token event
USER
VPC
Authorizer
Lambda
R53 Domain
api.example.comRequest
access
token
SSO Service
Elastic Beanstalk container
SAML Service Provider
Elastic Beanstalk container
Trust
SAML Identity Provider
Authenticate
Request
access token
CASE STUDY
BUILD SERVERLESS APPLICATION
• COGNITO - MAKE IT SECURE
• DYNAMODB – STORE DATA
• S3 BUCKET - KEEP WEB CONTENT
• LAMBDA - DYNAMIC CONTENT
• TERRAFORM - BUILD INFRASTRUCTURE
USER
AWS
Services
Amazon
Cognito
Client
Application
Identity
Provider
1. Using the
Application
2. Send Identity
Provider Credentials
3. Get
Authentication
Token
4. Send Identity Pool ID +
Authentication Token
5. Check Authebtication
Token with Identity Provider
6. Get Identity ID + AWS
Temp Credentials for the
Authenticated Role
7. Call AWS Services using
AWS Temp Credentials
All AWS Services
Cognito
Amazon
DynamoDB
{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Action": [
"dynamodb:BatchGetItem",
"dynamodb:BatchWriteItem",
"dynaeleteItem",
"dynamodb:modb:DGetItem",
"dynamodb:PutItem",
"dynamodb:Query",
"dynamodb:UpdateItem“
],
"Resource": ["arn:aws:dynamodb:us-east-1:1111111111:table/answers"],
"Condition": {
"ForAllValues:StringEquals": {
"dynamodb:LeadingKeys": ["${cognito-
identity.amazonaws.com:sub}"]}
}
}]
}
AWS
IAM
IAM Policy
Lambda Microservice
AWS
Lambdapublic class Main implements RequestHandler<Main.Request, Boolean> {
private AmazonDynamoDBClient client = new AmazonDynamoDBClient(new
EnvironmentVariableCredentialsProvider());
private DynamoDBMapper mapper = new DynamoDBMapper(client);
@Override
public Boolean handleRequest(Request request, Context context) {
context.getLogger().log("My input is: " + request);
Problem problem = mapper.load(Problem.class,
request.getProblemId());
String expression = problem.getCode().replaceAll("__",
request.getAnswer()) + "; problem();";
try {
return eval(expression);
} catch (ScriptException e) {
return false;
}
}
private Boolean eval(String expression) throws ScriptException {
ScriptEngine engine = new
ScriptEngineManager().getEngineByName("javascript");
return (Boolean) engine.eval(expression);
}
...
}
Invoke Lambda
AWS
Lambda
checkAnswer: function(problemId, answer) {
return cognito.identity.then(function(identity) {
var lambda = new AWS.Lambda();
var params = {
FunctionName: 'spa_checkAnswer',
Payload: JSON.stringify({ problemId: problemId, answer: answer
})
};
return cognito.sendAwsRequest(lambda.invoke(params), function(){
return checkAnswer(problemId, answer);
})
})
}
Terraform
variable "login_provider" {
default = "105303240909-
am1nkfpr1fmo9d2bce5pbkv.apps.googleusercontent.com"
}
resource "template_file" "login_provider_config" {
template = "${file("${path.module}/../conf/cognito/config.json.tpl")}"
vars {
login_provider = "${var.login_provider}"
}
provisioner "local-exec" {
command ="echo "${self.rendered}" >
${path.module}/../conf/cognito/config.json"
}
}
First Deployment
1. Deploy infrastructure
$ terraform apply
2. Deploy the content to s3 bucket
$ npm install
$ aws s3 sync app/ s3://s3-spa.demos3.com/ --acl public-read
--profile spa
3. Import DynamoDB data
$ aws dynamodb batch-write-item --request-items
file://conf/dynamodb/sampledata/Problems.json --profile spa
4. Enjoy
http://s3-spa.demos3.com.s3-website-us-east-1.amazonaws.com
ALTERNATIVES
- SERVICE FABRIC
- Runtimes:
- ASP .NET (1Core)
- NodeJS
- etc
- Deployment:
- REST API
- PowerShell
- GOOGLE CLOUD FUNCTIONS (ALPHA)
- Runtimes:
- NodeJS (only)
- Deployment:
- gcloud
TAKEAWAYS
PAY FOR ONLY WHAT YOU USE
TAKEAWAYS
READING
▸ Book: AWS Lambda in Action
▸ MEAP begin in 2016 February
▸ Publication: March 2017
▸ Author: Danilo Poccia
▸ ISBN: 9781617293719
https://www.manning.com/books/aws-lambda-in-action
TAKEAWAYS
READING
▸ Book: Serverless Single Page Apps
▸ Published: 2016-06-20
▸ Author: Ben Rady
▸ ISBN: 978-1-68050-149-0
https://www.amazon.com/Serverless-Single-Page-Apps-Available
THANK YOU!
http://www.martinfowler.com/articles/serverless.html
https://github.com/yegor86/spa-aws
Links:
Demo:

Weitere ähnliche Inhalte

Was ist angesagt?

serverless_architecture_patterns_london_loft.pdf
serverless_architecture_patterns_london_loft.pdfserverless_architecture_patterns_london_loft.pdf
serverless_architecture_patterns_london_loft.pdfAmazon Web Services
 
A Brief Look at Serverless Architecture
A Brief Look at Serverless ArchitectureA Brief Look at Serverless Architecture
A Brief Look at Serverless ArchitectureAmazon Web Services
 
Serverless by Example: Building a Real-Time Chat System
Serverless by Example: Building a Real-Time Chat SystemServerless by Example: Building a Real-Time Chat System
Serverless by Example: Building a Real-Time Chat SystemAmazon Web Services
 
AWS re:Invent 2016: Building Complex Serverless Applications (GPST404)
AWS re:Invent 2016: Building Complex Serverless Applications (GPST404)AWS re:Invent 2016: Building Complex Serverless Applications (GPST404)
AWS re:Invent 2016: Building Complex Serverless Applications (GPST404)Amazon Web Services
 
Building Serverless Backends with AWS Lambda and Amazon API Gateway
Building Serverless Backends with AWS Lambda and Amazon API GatewayBuilding Serverless Backends with AWS Lambda and Amazon API Gateway
Building Serverless Backends with AWS Lambda and Amazon API GatewayAmazon Web Services
 
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 CloudAmazon Web Services
 
(CMP407) Lambda as Cron: Scheduling Invocations in AWS Lambda
(CMP407) Lambda as Cron: Scheduling Invocations in AWS Lambda(CMP407) Lambda as Cron: Scheduling Invocations in AWS Lambda
(CMP407) Lambda as Cron: Scheduling Invocations in AWS LambdaAmazon Web Services
 
AWS re:Invent 2016: Amazon CloudWatch Logs and AWS Lambda: A Match Made in He...
AWS re:Invent 2016: Amazon CloudWatch Logs and AWS Lambda: A Match Made in He...AWS re:Invent 2016: Amazon CloudWatch Logs and AWS Lambda: A Match Made in He...
AWS re:Invent 2016: Amazon CloudWatch Logs and AWS Lambda: A Match Made in He...Amazon Web Services
 
Serverless Patterns: “No server is easier to manage than no server” - AWS Sec...
Serverless Patterns: “No server is easier to manage than no server” - AWS Sec...Serverless Patterns: “No server is easier to manage than no server” - AWS Sec...
Serverless Patterns: “No server is easier to manage than no server” - AWS Sec...Amazon Web Services
 
(GAM401) Build a Serverless Mobile Game w/ Cognito, Lambda & DynamoDB
(GAM401) Build a Serverless Mobile Game w/ Cognito, Lambda & DynamoDB(GAM401) Build a Serverless Mobile Game w/ Cognito, Lambda & DynamoDB
(GAM401) Build a Serverless Mobile Game w/ Cognito, Lambda & DynamoDBAmazon Web Services
 
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 CloudAmazon Web Services
 
Deep Dive: Amazon Lumberyard & Amazon GameLift
Deep Dive: Amazon Lumberyard & Amazon GameLiftDeep Dive: Amazon Lumberyard & Amazon GameLift
Deep Dive: Amazon Lumberyard & Amazon GameLiftAmazon Web Services
 
AWS re:Invent 2016: All Your Chats are Belong to Bots: Building a Serverless ...
AWS re:Invent 2016: All Your Chats are Belong to Bots: Building a Serverless ...AWS re:Invent 2016: All Your Chats are Belong to Bots: Building a Serverless ...
AWS re:Invent 2016: All Your Chats are Belong to Bots: Building a Serverless ...Amazon Web Services
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesAmazon Web Services
 
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 CloudAmazon Web Services
 
AWS re:Invent 2016: Monitoring, Hold the Infrastructure: Getting the Most fro...
AWS re:Invent 2016: Monitoring, Hold the Infrastructure: Getting the Most fro...AWS re:Invent 2016: Monitoring, Hold the Infrastructure: Getting the Most fro...
AWS re:Invent 2016: Monitoring, Hold the Infrastructure: Getting the Most fro...Amazon Web Services
 
5 Things You Don't Know About AWS Cloud
5 Things You Don't Know About AWS Cloud5 Things You Don't Know About AWS Cloud
5 Things You Don't Know About AWS CloudAmazon Web Services
 
AWS Lambda: Event-driven Code for Devices and the Cloud
AWS Lambda: Event-driven Code for Devices and the CloudAWS Lambda: Event-driven Code for Devices and the Cloud
AWS Lambda: Event-driven Code for Devices and the CloudAmazon Web Services
 

Was ist angesagt? (20)

serverless_architecture_patterns_london_loft.pdf
serverless_architecture_patterns_london_loft.pdfserverless_architecture_patterns_london_loft.pdf
serverless_architecture_patterns_london_loft.pdf
 
What's New with AWS Lambda
What's New with AWS LambdaWhat's New with AWS Lambda
What's New with AWS Lambda
 
A Brief Look at Serverless Architecture
A Brief Look at Serverless ArchitectureA Brief Look at Serverless Architecture
A Brief Look at Serverless Architecture
 
Serverless by Example: Building a Real-Time Chat System
Serverless by Example: Building a Real-Time Chat SystemServerless by Example: Building a Real-Time Chat System
Serverless by Example: Building a Real-Time Chat System
 
AWS re:Invent 2016: Building Complex Serverless Applications (GPST404)
AWS re:Invent 2016: Building Complex Serverless Applications (GPST404)AWS re:Invent 2016: Building Complex Serverless Applications (GPST404)
AWS re:Invent 2016: Building Complex Serverless Applications (GPST404)
 
Building Serverless Backends with AWS Lambda and Amazon API Gateway
Building Serverless Backends with AWS Lambda and Amazon API GatewayBuilding Serverless Backends with AWS Lambda and Amazon API Gateway
Building Serverless Backends with AWS Lambda and Amazon API Gateway
 
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
 
(CMP407) Lambda as Cron: Scheduling Invocations in AWS Lambda
(CMP407) Lambda as Cron: Scheduling Invocations in AWS Lambda(CMP407) Lambda as Cron: Scheduling Invocations in AWS Lambda
(CMP407) Lambda as Cron: Scheduling Invocations in AWS Lambda
 
AWS re:Invent 2016: Amazon CloudWatch Logs and AWS Lambda: A Match Made in He...
AWS re:Invent 2016: Amazon CloudWatch Logs and AWS Lambda: A Match Made in He...AWS re:Invent 2016: Amazon CloudWatch Logs and AWS Lambda: A Match Made in He...
AWS re:Invent 2016: Amazon CloudWatch Logs and AWS Lambda: A Match Made in He...
 
Serverless Patterns: “No server is easier to manage than no server” - AWS Sec...
Serverless Patterns: “No server is easier to manage than no server” - AWS Sec...Serverless Patterns: “No server is easier to manage than no server” - AWS Sec...
Serverless Patterns: “No server is easier to manage than no server” - AWS Sec...
 
(GAM401) Build a Serverless Mobile Game w/ Cognito, Lambda & DynamoDB
(GAM401) Build a Serverless Mobile Game w/ Cognito, Lambda & DynamoDB(GAM401) Build a Serverless Mobile Game w/ Cognito, Lambda & DynamoDB
(GAM401) Build a Serverless Mobile Game w/ Cognito, Lambda & DynamoDB
 
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
 
Deep Dive: Amazon Lumberyard & Amazon GameLift
Deep Dive: Amazon Lumberyard & Amazon GameLiftDeep Dive: Amazon Lumberyard & Amazon GameLift
Deep Dive: Amazon Lumberyard & Amazon GameLift
 
AWS re:Invent 2016: All Your Chats are Belong to Bots: Building a Serverless ...
AWS re:Invent 2016: All Your Chats are Belong to Bots: Building a Serverless ...AWS re:Invent 2016: All Your Chats are Belong to Bots: Building a Serverless ...
AWS re:Invent 2016: All Your Chats are Belong to Bots: Building a Serverless ...
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless Architectures
 
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
 
Intro to AWS Lambda
Intro to AWS Lambda Intro to AWS Lambda
Intro to AWS Lambda
 
AWS re:Invent 2016: Monitoring, Hold the Infrastructure: Getting the Most fro...
AWS re:Invent 2016: Monitoring, Hold the Infrastructure: Getting the Most fro...AWS re:Invent 2016: Monitoring, Hold the Infrastructure: Getting the Most fro...
AWS re:Invent 2016: Monitoring, Hold the Infrastructure: Getting the Most fro...
 
5 Things You Don't Know About AWS Cloud
5 Things You Don't Know About AWS Cloud5 Things You Don't Know About AWS Cloud
5 Things You Don't Know About AWS Cloud
 
AWS Lambda: Event-driven Code for Devices and the Cloud
AWS Lambda: Event-driven Code for Devices and the CloudAWS Lambda: Event-driven Code for Devices and the Cloud
AWS Lambda: Event-driven Code for Devices and the Cloud
 

Andere mochten auch

AWS Lambda - A quick introduction #advancedaws
AWS Lambda - A quick introduction #advancedawsAWS Lambda - A quick introduction #advancedaws
AWS Lambda - A quick introduction #advancedawsChris Richardson
 
Tensorflow in Docker
Tensorflow in DockerTensorflow in Docker
Tensorflow in DockerEric Ahn
 
Introduction to TensorFlow
Introduction to TensorFlowIntroduction to TensorFlow
Introduction to TensorFlowMatthias Feys
 
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
 
Docker 로 Linux 없이 Linux 환경에서 개발하기
Docker 로 Linux 없이 Linux 환경에서 개발하기Docker 로 Linux 없이 Linux 환경에서 개발하기
Docker 로 Linux 없이 Linux 환경에서 개발하기iFunFactory Inc.
 
Building a Machine Learning App with AWS Lambda
Building a Machine Learning App with AWS LambdaBuilding a Machine Learning App with AWS Lambda
Building a Machine Learning App with AWS LambdaSri Ambati
 
Microservice Architecture on AWS using AWS Lambda and Docker Containers
Microservice Architecture on AWS using AWS Lambda and Docker ContainersMicroservice Architecture on AWS using AWS Lambda and Docker Containers
Microservice Architecture on AWS using AWS Lambda and Docker ContainersDanilo Poccia
 
Getting Started with AWS Lambda and the Serverless Cloud by Jim Tran, Princip...
Getting Started with AWS Lambda and the Serverless Cloud by Jim Tran, Princip...Getting Started with AWS Lambda and the Serverless Cloud by Jim Tran, Princip...
Getting Started with AWS Lambda and the Serverless Cloud by Jim Tran, Princip...Amazon Web Services
 
Tensorflow in production with AWS Lambda
Tensorflow in production with AWS LambdaTensorflow in production with AWS Lambda
Tensorflow in production with AWS LambdaFabian Dubois
 
Introduction to Deep Learning with TensorFlow
Introduction to Deep Learning with TensorFlowIntroduction to Deep Learning with TensorFlow
Introduction to Deep Learning with TensorFlowTerry Taewoong Um
 
기계학습(Machine learning) 입문하기
기계학습(Machine learning) 입문하기기계학습(Machine learning) 입문하기
기계학습(Machine learning) 입문하기Terry Taewoong Um
 
Using Docker for GPU Accelerated Applications
Using Docker for GPU Accelerated ApplicationsUsing Docker for GPU Accelerated Applications
Using Docker for GPU Accelerated ApplicationsNVIDIA
 
Docker and Windows: The State of the Union
Docker and Windows: The State of the UnionDocker and Windows: The State of the Union
Docker and Windows: The State of the UnionElton Stoneman
 
Large Scale Deep Learning with TensorFlow
Large Scale Deep Learning with TensorFlow Large Scale Deep Learning with TensorFlow
Large Scale Deep Learning with TensorFlow Jen Aman
 
Deploying deep learning models with Docker and Kubernetes
Deploying deep learning models with Docker and KubernetesDeploying deep learning models with Docker and Kubernetes
Deploying deep learning models with Docker and KubernetesPetteriTeikariPhD
 

Andere mochten auch (18)

AWS Lambda - A quick introduction #advancedaws
AWS Lambda - A quick introduction #advancedawsAWS Lambda - A quick introduction #advancedaws
AWS Lambda - A quick introduction #advancedaws
 
TensorFlow
TensorFlowTensorFlow
TensorFlow
 
Tensorflow in Docker
Tensorflow in DockerTensorflow in Docker
Tensorflow in Docker
 
Introduction to TensorFlow
Introduction to TensorFlowIntroduction to TensorFlow
Introduction to TensorFlow
 
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...
 
Docker 로 Linux 없이 Linux 환경에서 개발하기
Docker 로 Linux 없이 Linux 환경에서 개발하기Docker 로 Linux 없이 Linux 환경에서 개발하기
Docker 로 Linux 없이 Linux 환경에서 개발하기
 
Building a Machine Learning App with AWS Lambda
Building a Machine Learning App with AWS LambdaBuilding a Machine Learning App with AWS Lambda
Building a Machine Learning App with AWS Lambda
 
Microservice Architecture on AWS using AWS Lambda and Docker Containers
Microservice Architecture on AWS using AWS Lambda and Docker ContainersMicroservice Architecture on AWS using AWS Lambda and Docker Containers
Microservice Architecture on AWS using AWS Lambda and Docker Containers
 
Getting Started with AWS Lambda and the Serverless Cloud by Jim Tran, Princip...
Getting Started with AWS Lambda and the Serverless Cloud by Jim Tran, Princip...Getting Started with AWS Lambda and the Serverless Cloud by Jim Tran, Princip...
Getting Started with AWS Lambda and the Serverless Cloud by Jim Tran, Princip...
 
Tensorflow in production with AWS Lambda
Tensorflow in production with AWS LambdaTensorflow in production with AWS Lambda
Tensorflow in production with AWS Lambda
 
TensorFlow
TensorFlowTensorFlow
TensorFlow
 
Introduction to Deep Learning with TensorFlow
Introduction to Deep Learning with TensorFlowIntroduction to Deep Learning with TensorFlow
Introduction to Deep Learning with TensorFlow
 
Google TensorFlow Tutorial
Google TensorFlow TutorialGoogle TensorFlow Tutorial
Google TensorFlow Tutorial
 
기계학습(Machine learning) 입문하기
기계학습(Machine learning) 입문하기기계학습(Machine learning) 입문하기
기계학습(Machine learning) 입문하기
 
Using Docker for GPU Accelerated Applications
Using Docker for GPU Accelerated ApplicationsUsing Docker for GPU Accelerated Applications
Using Docker for GPU Accelerated Applications
 
Docker and Windows: The State of the Union
Docker and Windows: The State of the UnionDocker and Windows: The State of the Union
Docker and Windows: The State of the Union
 
Large Scale Deep Learning with TensorFlow
Large Scale Deep Learning with TensorFlow Large Scale Deep Learning with TensorFlow
Large Scale Deep Learning with TensorFlow
 
Deploying deep learning models with Docker and Kubernetes
Deploying deep learning models with Docker and KubernetesDeploying deep learning models with Docker and Kubernetes
Deploying deep learning models with Docker and Kubernetes
 

Ähnlich wie Serverless archtiectures

Node Summit 2018 - Optimize your Lambda functions
Node Summit 2018 - Optimize your Lambda functionsNode Summit 2018 - Optimize your Lambda functions
Node Summit 2018 - Optimize your Lambda functionsMatt Lavin
 
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
 
JavaDay Lviv: Serverless Archtiectures
JavaDay Lviv: Serverless ArchtiecturesJavaDay Lviv: Serverless Archtiectures
JavaDay Lviv: Serverless ArchtiecturesAntons Kranga
 
Alex Casalboni - Configuration management and service discovery - Codemotion ...
Alex Casalboni - Configuration management and service discovery - Codemotion ...Alex Casalboni - Configuration management and service discovery - Codemotion ...
Alex Casalboni - Configuration management and service discovery - Codemotion ...Codemotion
 
AWS Lambda with Serverless Framework and Java
AWS Lambda with Serverless Framework and JavaAWS Lambda with Serverless Framework and Java
AWS Lambda with Serverless Framework and JavaManish Pandit
 
Riga DevDays 2017 - Efficient AWS Lambda
Riga DevDays 2017 - Efficient AWS LambdaRiga DevDays 2017 - Efficient AWS Lambda
Riga DevDays 2017 - Efficient AWS LambdaAntons Kranga
 
Developingapiplug insforcs-151112204727-lva1-app6891
Developingapiplug insforcs-151112204727-lva1-app6891Developingapiplug insforcs-151112204727-lva1-app6891
Developingapiplug insforcs-151112204727-lva1-app6891NetApp
 
AWS for Startups, London - Programming AWS
AWS for Startups, London - Programming AWSAWS for Startups, London - Programming AWS
AWS for Startups, London - Programming AWSAmazon Web Services
 
2013 05-openstack-israel-heat
2013 05-openstack-israel-heat2013 05-openstack-israel-heat
2013 05-openstack-israel-heatAlex Heneveld
 
AWS Presents: Infrastructure as Code on AWS - ChefConf 2015
AWS Presents: Infrastructure as Code on AWS - ChefConf 2015AWS Presents: Infrastructure as Code on AWS - ChefConf 2015
AWS Presents: Infrastructure as Code on AWS - ChefConf 2015Chef
 
Amazon Web Services for PHP Developers
Amazon Web Services for PHP DevelopersAmazon Web Services for PHP Developers
Amazon Web Services for PHP DevelopersJeremy Lindblom
 
Spring and Cloud Foundry; a Marriage Made in Heaven
Spring and Cloud Foundry; a Marriage Made in HeavenSpring and Cloud Foundry; a Marriage Made in Heaven
Spring and Cloud Foundry; a Marriage Made in HeavenJoshua Long
 
Cutting Edge Data Processing with PHP & XQuery
Cutting Edge Data Processing with PHP & XQueryCutting Edge Data Processing with PHP & XQuery
Cutting Edge Data Processing with PHP & XQueryWilliam Candillon
 
Soa development using javascript
Soa development using javascriptSoa development using javascript
Soa development using javascriptDsixE Inc
 
Disaster Recovery Site on AWS - Minimal Cost Maximum Efficiency (STG305) | AW...
Disaster Recovery Site on AWS - Minimal Cost Maximum Efficiency (STG305) | AW...Disaster Recovery Site on AWS - Minimal Cost Maximum Efficiency (STG305) | AW...
Disaster Recovery Site on AWS - Minimal Cost Maximum Efficiency (STG305) | AW...Amazon Web Services
 
Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs
 Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs
Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbsAWS Chicago
 
Track 4 Session 2_MAD03 容器技術和 AWS Lambda 讓您專注「應用優先」.pptx
Track 4 Session 2_MAD03 容器技術和 AWS Lambda 讓您專注「應用優先」.pptxTrack 4 Session 2_MAD03 容器技術和 AWS Lambda 讓您專注「應用優先」.pptx
Track 4 Session 2_MAD03 容器技術和 AWS Lambda 讓您專注「應用優先」.pptxAmazon Web Services
 

Ähnlich wie Serverless archtiectures (20)

AWS Serverless Workshop
AWS Serverless WorkshopAWS Serverless Workshop
AWS Serverless Workshop
 
Node Summit 2018 - Optimize your Lambda functions
Node Summit 2018 - Optimize your Lambda functionsNode Summit 2018 - Optimize your Lambda functions
Node Summit 2018 - Optimize your Lambda functions
 
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...
 
JavaDay Lviv: Serverless Archtiectures
JavaDay Lviv: Serverless ArchtiecturesJavaDay Lviv: Serverless Archtiectures
JavaDay Lviv: Serverless Archtiectures
 
Alex Casalboni - Configuration management and service discovery - Codemotion ...
Alex Casalboni - Configuration management and service discovery - Codemotion ...Alex Casalboni - Configuration management and service discovery - Codemotion ...
Alex Casalboni - Configuration management and service discovery - Codemotion ...
 
AWS Lambda with Serverless Framework and Java
AWS Lambda with Serverless Framework and JavaAWS Lambda with Serverless Framework and Java
AWS Lambda with Serverless Framework and Java
 
Riga DevDays 2017 - Efficient AWS Lambda
Riga DevDays 2017 - Efficient AWS LambdaRiga DevDays 2017 - Efficient AWS Lambda
Riga DevDays 2017 - Efficient AWS Lambda
 
Developingapiplug insforcs-151112204727-lva1-app6891
Developingapiplug insforcs-151112204727-lva1-app6891Developingapiplug insforcs-151112204727-lva1-app6891
Developingapiplug insforcs-151112204727-lva1-app6891
 
AWS for Startups, London - Programming AWS
AWS for Startups, London - Programming AWSAWS for Startups, London - Programming AWS
AWS for Startups, London - Programming AWS
 
2013 05-openstack-israel-heat
2013 05-openstack-israel-heat2013 05-openstack-israel-heat
2013 05-openstack-israel-heat
 
AWS Presents: Infrastructure as Code on AWS - ChefConf 2015
AWS Presents: Infrastructure as Code on AWS - ChefConf 2015AWS Presents: Infrastructure as Code on AWS - ChefConf 2015
AWS Presents: Infrastructure as Code on AWS - ChefConf 2015
 
Amazon Web Services for PHP Developers
Amazon Web Services for PHP DevelopersAmazon Web Services for PHP Developers
Amazon Web Services for PHP Developers
 
Spring and Cloud Foundry; a Marriage Made in Heaven
Spring and Cloud Foundry; a Marriage Made in HeavenSpring and Cloud Foundry; a Marriage Made in Heaven
Spring and Cloud Foundry; a Marriage Made in Heaven
 
GradleFX
GradleFXGradleFX
GradleFX
 
Arquitecturas de microservicios - Medianet Software
Arquitecturas de microservicios   -  Medianet SoftwareArquitecturas de microservicios   -  Medianet Software
Arquitecturas de microservicios - Medianet Software
 
Cutting Edge Data Processing with PHP & XQuery
Cutting Edge Data Processing with PHP & XQueryCutting Edge Data Processing with PHP & XQuery
Cutting Edge Data Processing with PHP & XQuery
 
Soa development using javascript
Soa development using javascriptSoa development using javascript
Soa development using javascript
 
Disaster Recovery Site on AWS - Minimal Cost Maximum Efficiency (STG305) | AW...
Disaster Recovery Site on AWS - Minimal Cost Maximum Efficiency (STG305) | AW...Disaster Recovery Site on AWS - Minimal Cost Maximum Efficiency (STG305) | AW...
Disaster Recovery Site on AWS - Minimal Cost Maximum Efficiency (STG305) | AW...
 
Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs
 Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs
Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs
 
Track 4 Session 2_MAD03 容器技術和 AWS Lambda 讓您專注「應用優先」.pptx
Track 4 Session 2_MAD03 容器技術和 AWS Lambda 讓您專注「應用優先」.pptxTrack 4 Session 2_MAD03 容器技術和 AWS Lambda 讓您專注「應用優先」.pptx
Track 4 Session 2_MAD03 容器技術和 AWS Lambda 讓您專注「應用優先」.pptx
 

Kürzlich hochgeladen

%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...masabamasaba
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park masabamasaba
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Hararemasabamasaba
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...masabamasaba
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Bert Jan Schrijver
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfonteinmasabamasaba
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfonteinmasabamasaba
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is insideshinachiaurasa2
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxAnnaArtyushina1
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...masabamasaba
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2
 

Kürzlich hochgeladen (20)

%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 

Serverless archtiectures

  • 2. ~ WHOAMI ▸Full stack developer 10+ years ▸Innovation Center of Accenture Cloud Platform YEGOR FADEEV
  • 4. DON’T WORRY, THERE ARE SERVERS
  • 5. THERE ARE NO SERVERS THAT WE MANAGE
  • 6. DEVS WANT TO GO NOOPS http://martinfowler.com/bliki/DevOpsCulture.html
  • 7. DEVS WANT TO GO NODEVOPS http://martinfowler.com/bliki/DevOpsCulture.html
  • 9. - Highly Available Serverless Storage - Scaleable and Elastic - Replicated across 2 availability zones - Supports HTTP requestsS3
  • 10. Static HTML CSS/Media Rich JavaScript Apps GET http S3 StorageCloudFront USER
  • 11. Static HTML CSS/Media Rich JavaScript Apps R53 Domain GET http example.com S3 StorageCloudFront USER
  • 12. Static HTML CSS/Media Rich JavaScript Apps COST MODEL: $0.03 GiB per Month S3 HIGHLY AVAILABLE STORAGE - Covered by AWS S3 SLA - Durability: 99.999999999% - Availability: 99.99% SLOW WRITE OPERATIONS R53 Domain GET http example.com S3 StorageCloudFront USER
  • 14. GET Static HTML CSS/Media Rich JavaScript Apps S3 StorageCloudFront GET POST PUT DELETE Dynamic Data Data from Database Data from External Service dataAPI Gateway Lambda ajax http event USER
  • 15. LAMBDA - AWS Computing Service - Designed to reflect async Actor Model - Resilient and Scaleable - 512 RAM - Supports Runtimes - Java - Python - NodeJS - Go (implicitly) - Max Timeout 5 mins - Pricing: - 0.20$ per million requests. - Billable 100 milliseconds
  • 16. Lambda API Gateway EVENT SOURCE Kinesis Data Streams SNS Queue or Topic data Lambda other data CONSUMER OR EVENT CRON Job
  • 17. API Gateway Lambda + - API Management Tool - Authorization + Custom Authorizer - Defines: Environment Variables for Lambda - Can be defined with Swagger and imported - Code Supports Versioning - Integrated with CloudWatch - Lambda Containers are Cached for 5 minutes - Can be deployed with “apex.run” tool - User can write files in /tmp
  • 18. apply plugin: 'java' version = '1.0.0' mainClassName='Main' jar { archiveName = 'apex.jar' } repositories { mavenCentral() } dependencies { compile ( 'com.amazonaws:aws-lambda-java-core:1.1.0', 'com.amazonaws:aws-lambda-java-events:1.1.0' ) } GRADLE $ ./gradlew clean build BUILD SUCCESSFUL Total time: 9.134 secs SHELL
  • 19. public class Main implements RequestHandler<String, String> { @Override public String handleRequest(String input, Context context) { context.getLogger().log("My input is: " + input); return "Hello: " + input; } } JAVA { "runtime": "java8", "role": "arn:aws:iam::776022106184:role/apex_lambda_function", "handler": "Main::handleRequest", "memory": 512, "timeout": 32 } Apex.run $ apex deploy • function created SHELL
  • 20. GET POST PUT DELETE dataAPI Gateway Lambda ajax event USER DB_URL DB_PORT DB_USER Variables
  • 22. GET POST PUT DELETE dataAPI Gateway Lambda ajax event USER DB_URL DB_PORT DB_USER Variables
  • 23. GET POST PUT DELETE dataAPI Gateway Lambda ajax event USER VPC DB_URL DB_PORT DB_USER Variables
  • 24. GET POST PUT DELETE dataAPI Gateway Lambda ajax event USER VPC Authorizer Lambda DB_URL DB_PORT DB_USER Variables
  • 25. GET POST PUT DELETE dataAPI Gateway Lambda Ajax with access token event USER VPC Authorizer Lambda Request access token SSO Service R53 Domain api.example.com
  • 26. GET POST PUT DELETE dataAPI Gateway Lambda Ajax with access token event USER VPC Authorizer Lambda R53 Domain api.example.comRequest access token SSO Service Elastic Beanstalk container
  • 27. SAML Service Provider Elastic Beanstalk container Trust SAML Identity Provider Authenticate Request access token
  • 29. BUILD SERVERLESS APPLICATION • COGNITO - MAKE IT SECURE • DYNAMODB – STORE DATA • S3 BUCKET - KEEP WEB CONTENT • LAMBDA - DYNAMIC CONTENT • TERRAFORM - BUILD INFRASTRUCTURE
  • 30. USER AWS Services Amazon Cognito Client Application Identity Provider 1. Using the Application 2. Send Identity Provider Credentials 3. Get Authentication Token 4. Send Identity Pool ID + Authentication Token 5. Check Authebtication Token with Identity Provider 6. Get Identity ID + AWS Temp Credentials for the Authenticated Role 7. Call AWS Services using AWS Temp Credentials All AWS Services Cognito
  • 32. { "Version": "2012-10-17", "Statement": [{ "Effect": "Allow", "Action": [ "dynamodb:BatchGetItem", "dynamodb:BatchWriteItem", "dynaeleteItem", "dynamodb:modb:DGetItem", "dynamodb:PutItem", "dynamodb:Query", "dynamodb:UpdateItem“ ], "Resource": ["arn:aws:dynamodb:us-east-1:1111111111:table/answers"], "Condition": { "ForAllValues:StringEquals": { "dynamodb:LeadingKeys": ["${cognito- identity.amazonaws.com:sub}"]} } }] } AWS IAM IAM Policy
  • 33. Lambda Microservice AWS Lambdapublic class Main implements RequestHandler<Main.Request, Boolean> { private AmazonDynamoDBClient client = new AmazonDynamoDBClient(new EnvironmentVariableCredentialsProvider()); private DynamoDBMapper mapper = new DynamoDBMapper(client); @Override public Boolean handleRequest(Request request, Context context) { context.getLogger().log("My input is: " + request); Problem problem = mapper.load(Problem.class, request.getProblemId()); String expression = problem.getCode().replaceAll("__", request.getAnswer()) + "; problem();"; try { return eval(expression); } catch (ScriptException e) { return false; } } private Boolean eval(String expression) throws ScriptException { ScriptEngine engine = new ScriptEngineManager().getEngineByName("javascript"); return (Boolean) engine.eval(expression); } ... }
  • 34. Invoke Lambda AWS Lambda checkAnswer: function(problemId, answer) { return cognito.identity.then(function(identity) { var lambda = new AWS.Lambda(); var params = { FunctionName: 'spa_checkAnswer', Payload: JSON.stringify({ problemId: problemId, answer: answer }) }; return cognito.sendAwsRequest(lambda.invoke(params), function(){ return checkAnswer(problemId, answer); }) }) }
  • 35. Terraform variable "login_provider" { default = "105303240909- am1nkfpr1fmo9d2bce5pbkv.apps.googleusercontent.com" } resource "template_file" "login_provider_config" { template = "${file("${path.module}/../conf/cognito/config.json.tpl")}" vars { login_provider = "${var.login_provider}" } provisioner "local-exec" { command ="echo "${self.rendered}" > ${path.module}/../conf/cognito/config.json" } }
  • 36. First Deployment 1. Deploy infrastructure $ terraform apply 2. Deploy the content to s3 bucket $ npm install $ aws s3 sync app/ s3://s3-spa.demos3.com/ --acl public-read --profile spa 3. Import DynamoDB data $ aws dynamodb batch-write-item --request-items file://conf/dynamodb/sampledata/Problems.json --profile spa 4. Enjoy http://s3-spa.demos3.com.s3-website-us-east-1.amazonaws.com
  • 38. - SERVICE FABRIC - Runtimes: - ASP .NET (1Core) - NodeJS - etc - Deployment: - REST API - PowerShell - GOOGLE CLOUD FUNCTIONS (ALPHA) - Runtimes: - NodeJS (only) - Deployment: - gcloud
  • 40. PAY FOR ONLY WHAT YOU USE
  • 41. TAKEAWAYS READING ▸ Book: AWS Lambda in Action ▸ MEAP begin in 2016 February ▸ Publication: March 2017 ▸ Author: Danilo Poccia ▸ ISBN: 9781617293719 https://www.manning.com/books/aws-lambda-in-action
  • 42. TAKEAWAYS READING ▸ Book: Serverless Single Page Apps ▸ Published: 2016-06-20 ▸ Author: Ben Rady ▸ ISBN: 978-1-68050-149-0 https://www.amazon.com/Serverless-Single-Page-Apps-Available

Hinweis der Redaktion

  1. Serverless is a hot topic in the software architecture world. We’re already seeing books, open source frameworks, plenty of vendor products, and even a conference dedicated to the subject. But what is Serverless and why is (or isn’t) it worth considering? Through this session I will try to enlighten you a little on these questions. Like many trends in software there’s no clear view of what ‘Serverless’ is: 1. Serverless was first used to describe applications that significantly or fully depend on 3rd party applications / services (‘in the cloud’) to manage server-side logic and state. These are typically ‘rich client’ applications (think single page web apps, or mobile apps) that use the vast ecosystem of cloud: databases, authentication services etc. 2. Serverless can also mean applications where some amount of server-side logic is still written by the application developer but unlike traditional architectures it runs in stateless compute containers that are event-triggered, ephemeral (may only last for one invocation), and fully managed by a 3rd party. (Thanks to ThoughtWorks for their definition in their most recent Tech Radar.) One way to think of this is ‘Functions as a service / FaaS’ . 3. AWS Lambda is one of the most popular implementations of FaaS at present, but there are others
  2. The term ‘Serverless’ is confusing since with such applications there are both server hardware and server processes running somewhere, but the difference to normal approaches is that the organization building and supporting a ‘Serverless’ application is not looking after the hardware or the processes - they are outsourcing this to a vendor.
  3. You can host your static website entirely on Amazon S3. Once you enable your bucket for static website hosting, all your content is accessible to web browsers via the Amazon S3 website endpoint for your bucket.
  4. Each bucket serves a website namespace (e.g. "www.example.com"). Requests for your host name (e.g. "example.com" or "www.example.com") can be routed to the contents in your bucket. You can also redirect requests to another host name (e.g. redirect "example.com" to "www.example.com").
  5. AWS Lambda is arguably the most exciting service released in AWS since EC2. Lambda is a service that lets you run code on someone else’s machine. All you need to do is pick the runtime your code can run in, and provide the code. Currently, the supported runtimes are: - Node.js: v0.10.36, v4.3.2 - Java: Java 8 - Python: Python 2.7
  6. In AWS Lambda, Lambda functions and event sources are the core components in AWS Lambda. An event source is the entity that publishes events, and a Lambda function is the custom code that processes the events. Supported event sources refer to those AWS services that can be preconfigured to work with AWS Lambda. The configuration is referred to as event source mapping, which maps an event source to a Lambda function. It enables automatic invocation of your Lambda function when events occur. Examples: 1. Akka actor chain can be implemented with help of two services: Dynamodb and Lambda 2. Lifecycle hooks which triggered when autoscaling group fired an up/down policy event. Lambda could make some preparation before a new vm is up 3. CRON/ Periodic task which check one metric or another. For instance, Lambda which monitors number of tasks in a custom tasks queue and sends metrics/alarm into CW when it cross the threshold 4. CI/CD 5. Backend for Api Gateway
  7. API Gateway is another exciting service on AWS that aims to ease the task of creating APIs. You define your resources and their models, request transformations, locations where requests should be proxied to, response transformations; and you get a functioning API without deploying a single machine. An API Gateway endpoint can use a Lambda function as its backend, which is the sweet spot touted by serverless architecture advocates. Like every system in its early life, API Gateway and Lambda have minor bugs and areas of improvement. Overall, the combination of these technologies is lethal, and I’m interested in seeing how functionality in existing applications can be chipped away to harness the strengths of these so-called serverless architectures.
  8. You can use Maven or Gradle to build you Lambda function in Java.
  9. You can use Maven or Gradle to build you Lambda function in Java.
  10. Allow the lambda direct access to our database
  11. Add Lambda and DB in the same VPC Assign a private ip to DB Use this IP from Lambda
  12. Introduce Authorizer, yet another feature in Api Gateway It makes sure an access token is present in HTTP request, token is valid and verifies presence of necessary data in the token Base on the token content it accepts or denies the request
  13. Introduce SSO service which issues access tokens It talks to federation-sts and helps end user to authenticate against Accenture IDP Disadvantages: We have to manage infrastructure for SSO service
  14. With Elastic Beanstalk, you can quickly deploy and manage applications in the AWS Cloud without worrying about the infrastructure that runs those applications. AWS Elastic Beanstalk reduces management complexity without restricting choice or control. You simply upload your application, and Elastic Beanstalk automatically handles the details of capacity provisioning, load balancing, scaling, and application health monitoring.
  15. Amazon Cognito lets you easily add user sign-in to your mobile and web apps. With Amazon Cognito, you can also authenticate users through social identity providers such as Facebook, Twitter, or Amazon, or by using your own identity solution.
  16. This call is possible thanks to Fine-Grained Access Control for DynamoDB To implement this kind of fine-grained access control, you write an IAM permissions policy that specifies conditions for accessing database. 
  17. The permissions policy grants permissions that allow a set of DynamoDB actions on the answers table. It uses the dynamodb:LeadingKeys condition key to restrict access for unauthorized users. The Condition entry in this policy uses a substitution variable to grab the Cognito ID from the request. This ensures that only authenticated Cognito users can access the table, and that they only have access to the documents that they created. All you need is to attach this policy to Cognito IAM Role and you will be able to access DB from client’s code completely secure
  18. Sometimes you may want to hide the logic from prying eyes for security reason or don’t want to share the code This could be put into Lambda Lambda supports Java runtime
  19. One major pain point of using Lambda/API Gateway/Cognito is the difficulty of setting things up. So the project uses Terraform to ease that difficulty. Terraform is a tool that lets you define configurations, which it can run to provision resources on datacenters by providers such as AWS, Azure and Google Cloud. In this project, Terraform is used to provision the Lambda function/Cognito Identity Pool/DynamoDb/S3 Bucket. With Terraform installed, the project can be deployed by simply invoking: - terraform apply - terraform destroy
  20. Developing applications using Lambda differs from the way we are typically used to, in terms of codebase management, tooling, frameworks, testing and deployment. On one hand, Lambda offers us the entire AWS ecosystem with simple configurations, and on the other, it requires us to rethink how we approach building even small applications. There aren’t yet enough success stories and best practices out there to give one the confidence to build large applications using Lambda, but there’s enough information to start farming out computation heavy processes to Lambda. Lambda especially shines because of its ability to scale along with its workload.