SlideShare a Scribd company logo
1 of 33
Download to read offline
Hi, I’m Riza
Previous Talk
AWS Lambda is amazing
The price is awesome!
slideshare.net/rizafahmi/aws-lambda-with-claudiajs
BUT...
ClaudiaJS is great
What if...
What is UP?
WhatsApp Messenger is a freeware and
cross-pla!orm instant messaging and
Voice over IP (VoIP) service.[45] The
applica"on allows the sending of text
messages and voice calls, as well as video
calls, images and other media, documents,
and user loca"on.
What is UP?
What is UP?
Up deploys infinitely scalable
serverless apps, APIs, and sta!c
websites in seconds, so you
can get back to working on
what makes your product
unique.
What is UP?
Up focuses on deploying "vanilla" HTTP
servers so there's nothing new to learn,
just develop with your favorite exis"ng
frameworks such as Express, Koa,
Django, Golang net/h"p or others.
Supported
Language
Benefit of UP
Routing Local Testing
Quick Iteration
Better Logs
Feels Like Home
Installa!on
$ curl -sf https:
//up.apex.sh/install | sh
$ npm i -g up
OR
Ge"ng Started
$ npm init
$ npm install express
Ge"ng Started
const app = require("express")();
const { PORT = 3000 } = process.env;
app.get("/", (req, res) 
=> {
res.json({ status: "OK", source:
"development" });
});
app.listen(PORT);
Deploying to
staging
$ up
$ up url 
--open
Deploying to
produc!on
$ up production
$ up production url 
--open
This is too easy
Next Genera!on
API with GraphQL
slideshare.net/rizafahmi/graphql-story-intro-to-graphql
We’ll Build The
Empire
Title: Empire Strikes Back
Characters:
• Luke Skywalker
◦ Birth Year: 19BBY
◦ Gender: male
◦ Homeworld:
▪ Name: Tatooine
▪ Climate: arid
▪ Gravity: 1 standard
▪ Population: 200000
• C-3PO
◦ Birth Year: 112BBY
◦ Gender: n/a
◦ Homeworld:
▪ Name: Tatooine
▪ Climate: arid
▪ Gravity: 1 standard
▪ Population: 200000
Request in REST
API
1 Film 11 Characters
11 Homeworld
Request in
GraphQL
{
film(id: 2) {
title
characters {
name
birthYear
gender
homeworld {
name
climate
gravity
population
}
}
}
}
Request in
GraphQL
{
"data": {
"film": {
"title": "The Force Awakens",
"characters": [
{
"name": "Luke Skywalker",
"birthYear": "19BBY",
"gender": "male",
"homeworld": {
"name": "Tatooine",
"climate": "arid",
"gravity": "1 standard",
"population": “200000"
}
},

...
}
Let’s get to work $ npm install express-graphql graphql
GraphQL Server
const app = require("express")();
const graphqlHTTP = require("express-graphql");
const schema = require("./schema");
const { PORT = 3000 } = process.env;
app.get("/", (req, res) 
=> {
res.json({ status: "OK", source: "development" });
});
app.use(
"/graphql",
graphqlHTTP({
schema,
graphiql: true
})
);
app.listen(PORT);
GraphQL Types
const HomeworldType = new GraphQLObjectType({
name: "homeworld",
description: "Planet instance",
fields: () 
=> ({
name: {
type: GraphQLString,
resolve: planet 
=> planet.data.name
},
climate: {
type: GraphQLString,
resolve: planet 
=> planet.data.climate
},
gravity: {
type: GraphQLString,
resolve: planet 
=> planet.data.gravity
},
population: {
type: GraphQLString,
resolve: planet 
=> planet.data.population
}
})
});
GraphQL Types
const CharacterType = new GraphQLObjectType({
name: "characters",
description: "

...",
fields: () 
=> ({
name: {
type: GraphQLString,
resolve: character 
=> character.data.name
},
birthYear: {
type: GraphQLString,
resolve: character 
=> character.data.birth_year
},
gender: {
type: GraphQLString,
resolve: character 
=> character.data.gender
},
homeworld: {
type: HomeworldType,
resolve: character 
=>
axios(character.data.homeworld)
}
})
});
GraphQL Types
const FilmType = new GraphQLObjectType({
name: "Film",
description: "

...",
fields: () 
=> ({
title: {
type: GraphQLString,
resolve: film 
=> film.data.title
},
characters: {
type: new GraphQLList(CharacterType),
resolve: character 
=>
Promise.all(character.data.characters.map(char 
=>
axios(char)))
}
})
});
GraphQL Schema
module.exports = new GraphQLSchema({
query: new GraphQLObjectType({
name: "Query",
description: "

...",
fields: () 
=> ({
film: {
type: FilmType,
args: {
id: { type: GraphQLInt }
},
resolve: (root, args) 
=>
axios
.get(`https:
//swapi.co/api/films/$
{args.id}`)
.then(response 
=> response)
}
})
})
});
GraphQL Rocks!
Logs
$ up logs
$ up logs ‘message = “request”’
$ up logs 'method=GET duration
> 70ms’
$ up logs 'method=GET
duration > 40ms production'
Logs
$ up logs | cat
$ up logs 'message = "response"'
| jq -r '.fields.ip'
Metrics
$ up metrics
Requests: 7 ($0.00)
Duration min: 33ms
Duration avg: 493ms
Duration max: 1940ms
Duration sum: 5.981s ($0.00)
Errors 4xx: 0
Errors 5xx: 0
Invocations: 11 ($0.00)
Errors: 0
Delete Deployment $ up stack delete
And I’m done!
github.com/rizafahmi/aws-up-node-graphql
slideshare.net/rizafahmi
riza@hack!v8.com
randomscreencast.comrandomscreencastscreencast Tentang Berbagai teknologi

More Related Content

What's hot

AWS CodeDeploy - basic intro
AWS CodeDeploy - basic introAWS CodeDeploy - basic intro
AWS CodeDeploy - basic introAnton Babenko
 
Scaling WordPress - WP on AWS
Scaling WordPress - WP on AWSScaling WordPress - WP on AWS
Scaling WordPress - WP on AWSstk_jj
 
Neptue Graph Database - 0 to Production
Neptue Graph Database - 0 to ProductionNeptue Graph Database - 0 to Production
Neptue Graph Database - 0 to Productionisraelio
 
Creating asynchronous flows on AWS
Creating asynchronous flows on AWSCreating asynchronous flows on AWS
Creating asynchronous flows on AWSMetin Kale
 
Cloud Academy's AWS Hands on-labs
Cloud Academy's AWS Hands on-labsCloud Academy's AWS Hands on-labs
Cloud Academy's AWS Hands on-labsAlex Casalboni
 
Web workers and service workers
Web workers and service workersWeb workers and service workers
Web workers and service workersNitish Phanse
 
Ruby on Rails - UNISO
Ruby on Rails - UNISORuby on Rails - UNISO
Ruby on Rails - UNISOLucas Renan
 
Introduction to the Serverless paradigm
Introduction to the Serverless paradigmIntroduction to the Serverless paradigm
Introduction to the Serverless paradigmAlex Casalboni
 
Continuous delivery in AWS
Continuous delivery in AWSContinuous delivery in AWS
Continuous delivery in AWSAnton Babenko
 
Cloud Patterns Beuth Hochschule
Cloud Patterns Beuth HochschuleCloud Patterns Beuth Hochschule
Cloud Patterns Beuth HochschuleSascha Möllering
 
Infrastructure is code with the AWS cloud development kit
Infrastructure is code with the AWS cloud development kitInfrastructure is code with the AWS cloud development kit
Infrastructure is code with the AWS cloud development kitAWS User Group Pune
 
Python in the Serverless Era (PyCon IL 2016)
Python in the Serverless Era (PyCon IL 2016)Python in the Serverless Era (PyCon IL 2016)
Python in the Serverless Era (PyCon IL 2016)Benny Bauer
 
High Performance API Mashups with Node.js and ql.io
High Performance API Mashups with Node.js and ql.ioHigh Performance API Mashups with Node.js and ql.io
High Performance API Mashups with Node.js and ql.ioJonathan LeBlanc
 
Cut your hair and get an azure webjob
Cut your hair and get an azure webjobCut your hair and get an azure webjob
Cut your hair and get an azure webjobMark Greenway
 
TPSE Thailand 2015 - Rethinking Web with React and Flux
TPSE Thailand 2015 - Rethinking Web with React and FluxTPSE Thailand 2015 - Rethinking Web with React and Flux
TPSE Thailand 2015 - Rethinking Web with React and FluxJirat Kijlerdpornpailoj
 
Unobtrusive js
Unobtrusive jsUnobtrusive js
Unobtrusive jsbretticus
 
Java script202
Java script202Java script202
Java script202Wasiq Zia
 

What's hot (20)

AWS CodeDeploy - basic intro
AWS CodeDeploy - basic introAWS CodeDeploy - basic intro
AWS CodeDeploy - basic intro
 
Scaling WordPress - WP on AWS
Scaling WordPress - WP on AWSScaling WordPress - WP on AWS
Scaling WordPress - WP on AWS
 
Neptue Graph Database - 0 to Production
Neptue Graph Database - 0 to ProductionNeptue Graph Database - 0 to Production
Neptue Graph Database - 0 to Production
 
Easy REST with OpenAPI
Easy REST with OpenAPIEasy REST with OpenAPI
Easy REST with OpenAPI
 
Creating asynchronous flows on AWS
Creating asynchronous flows on AWSCreating asynchronous flows on AWS
Creating asynchronous flows on AWS
 
Handy JS Libraries
Handy JS LibrariesHandy JS Libraries
Handy JS Libraries
 
Cloud Academy's AWS Hands on-labs
Cloud Academy's AWS Hands on-labsCloud Academy's AWS Hands on-labs
Cloud Academy's AWS Hands on-labs
 
Go & WebAssembly
Go & WebAssembly Go & WebAssembly
Go & WebAssembly
 
Web workers and service workers
Web workers and service workersWeb workers and service workers
Web workers and service workers
 
Ruby on Rails - UNISO
Ruby on Rails - UNISORuby on Rails - UNISO
Ruby on Rails - UNISO
 
Introduction to the Serverless paradigm
Introduction to the Serverless paradigmIntroduction to the Serverless paradigm
Introduction to the Serverless paradigm
 
Continuous delivery in AWS
Continuous delivery in AWSContinuous delivery in AWS
Continuous delivery in AWS
 
Cloud Patterns Beuth Hochschule
Cloud Patterns Beuth HochschuleCloud Patterns Beuth Hochschule
Cloud Patterns Beuth Hochschule
 
Infrastructure is code with the AWS cloud development kit
Infrastructure is code with the AWS cloud development kitInfrastructure is code with the AWS cloud development kit
Infrastructure is code with the AWS cloud development kit
 
Python in the Serverless Era (PyCon IL 2016)
Python in the Serverless Era (PyCon IL 2016)Python in the Serverless Era (PyCon IL 2016)
Python in the Serverless Era (PyCon IL 2016)
 
High Performance API Mashups with Node.js and ql.io
High Performance API Mashups with Node.js and ql.ioHigh Performance API Mashups with Node.js and ql.io
High Performance API Mashups with Node.js and ql.io
 
Cut your hair and get an azure webjob
Cut your hair and get an azure webjobCut your hair and get an azure webjob
Cut your hair and get an azure webjob
 
TPSE Thailand 2015 - Rethinking Web with React and Flux
TPSE Thailand 2015 - Rethinking Web with React and FluxTPSE Thailand 2015 - Rethinking Web with React and Flux
TPSE Thailand 2015 - Rethinking Web with React and Flux
 
Unobtrusive js
Unobtrusive jsUnobtrusive js
Unobtrusive js
 
Java script202
Java script202Java script202
Java script202
 

Similar to Deploying Your Favorite Web App To AWS Lambda with Apex up

Development in the could: How do we do it(Cloud computing. Microservices. Faas)
Development in the could: How do we do it(Cloud computing. Microservices. Faas)Development in the could: How do we do it(Cloud computing. Microservices. Faas)
Development in the could: How do we do it(Cloud computing. Microservices. Faas)Preply.com
 
Node.js - async for the rest of us.
Node.js - async for the rest of us.Node.js - async for the rest of us.
Node.js - async for the rest of us.Mike Brevoort
 
Python Streaming Pipelines on Flink - Beam Meetup at Lyft 2019
Python Streaming Pipelines on Flink - Beam Meetup at Lyft 2019Python Streaming Pipelines on Flink - Beam Meetup at Lyft 2019
Python Streaming Pipelines on Flink - Beam Meetup at Lyft 2019Thomas Weise
 
Big Data Web applications for Interactive Hadoop by ENRICO BERTI at Big Data...
 Big Data Web applications for Interactive Hadoop by ENRICO BERTI at Big Data... Big Data Web applications for Interactive Hadoop by ENRICO BERTI at Big Data...
Big Data Web applications for Interactive Hadoop by ENRICO BERTI at Big Data...Big Data Spain
 
Cape Cod Web Technology Meetup - 2
Cape Cod Web Technology Meetup - 2Cape Cod Web Technology Meetup - 2
Cape Cod Web Technology Meetup - 2Asher Martin
 
Amazon EC2 Container Service Live Demo - Microservices Web Day
Amazon EC2 Container Service Live Demo - Microservices Web DayAmazon EC2 Container Service Live Demo - Microservices Web Day
Amazon EC2 Container Service Live Demo - Microservices Web DayAWS Germany
 
Breaking Up With Your Data Center Presentation
Breaking Up With Your Data Center PresentationBreaking Up With Your Data Center Presentation
Breaking Up With Your Data Center PresentationTelescope_Inc
 
Be a microservices hero
Be a microservices heroBe a microservices hero
Be a microservices heroOpenRestyCon
 
KrakenJS
KrakenJSKrakenJS
KrakenJSPayPal
 
Intravert Server side processing for Cassandra
Intravert Server side processing for CassandraIntravert Server side processing for Cassandra
Intravert Server side processing for CassandraEdward Capriolo
 
NYC* 2013 - "Advanced Data Processing: Beyond Queries and Slices"
NYC* 2013 - "Advanced Data Processing: Beyond Queries and Slices"NYC* 2013 - "Advanced Data Processing: Beyond Queries and Slices"
NYC* 2013 - "Advanced Data Processing: Beyond Queries and Slices"DataStax Academy
 
Event-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 EngineEvent-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 EngineRicardo Silva
 
Zoo Overview
Zoo OverviewZoo Overview
Zoo Overviewdjayzen
 
Programming the Physical World with Device Shadows and Rules Engine
Programming the Physical World with Device Shadows and Rules EngineProgramming the Physical World with Device Shadows and Rules Engine
Programming the Physical World with Device Shadows and Rules EngineAmazon Web Services
 
Infrastructure as code, using Terraform
Infrastructure as code, using TerraformInfrastructure as code, using Terraform
Infrastructure as code, using TerraformHarkamal Singh
 
Aws Lambda in Swift - NSLondon - 3rd December 2020
Aws Lambda in Swift - NSLondon - 3rd December 2020Aws Lambda in Swift - NSLondon - 3rd December 2020
Aws Lambda in Swift - NSLondon - 3rd December 2020Andrea Scuderi
 

Similar to Deploying Your Favorite Web App To AWS Lambda with Apex up (20)

locize tech talk
locize tech talklocize tech talk
locize tech talk
 
Development in the could: How do we do it(Cloud computing. Microservices. Faas)
Development in the could: How do we do it(Cloud computing. Microservices. Faas)Development in the could: How do we do it(Cloud computing. Microservices. Faas)
Development in the could: How do we do it(Cloud computing. Microservices. Faas)
 
Node.js - async for the rest of us.
Node.js - async for the rest of us.Node.js - async for the rest of us.
Node.js - async for the rest of us.
 
Graphql usage
Graphql usageGraphql usage
Graphql usage
 
Python Streaming Pipelines on Flink - Beam Meetup at Lyft 2019
Python Streaming Pipelines on Flink - Beam Meetup at Lyft 2019Python Streaming Pipelines on Flink - Beam Meetup at Lyft 2019
Python Streaming Pipelines on Flink - Beam Meetup at Lyft 2019
 
Big Data Web applications for Interactive Hadoop by ENRICO BERTI at Big Data...
 Big Data Web applications for Interactive Hadoop by ENRICO BERTI at Big Data... Big Data Web applications for Interactive Hadoop by ENRICO BERTI at Big Data...
Big Data Web applications for Interactive Hadoop by ENRICO BERTI at Big Data...
 
Cape Cod Web Technology Meetup - 2
Cape Cod Web Technology Meetup - 2Cape Cod Web Technology Meetup - 2
Cape Cod Web Technology Meetup - 2
 
Amazon EC2 Container Service Live Demo - Microservices Web Day
Amazon EC2 Container Service Live Demo - Microservices Web DayAmazon EC2 Container Service Live Demo - Microservices Web Day
Amazon EC2 Container Service Live Demo - Microservices Web Day
 
Breaking Up With Your Data Center Presentation
Breaking Up With Your Data Center PresentationBreaking Up With Your Data Center Presentation
Breaking Up With Your Data Center Presentation
 
locize tech stack
locize tech stacklocize tech stack
locize tech stack
 
Be a microservices hero
Be a microservices heroBe a microservices hero
Be a microservices hero
 
KrakenJS
KrakenJSKrakenJS
KrakenJS
 
Intravert Server side processing for Cassandra
Intravert Server side processing for CassandraIntravert Server side processing for Cassandra
Intravert Server side processing for Cassandra
 
NYC* 2013 - "Advanced Data Processing: Beyond Queries and Slices"
NYC* 2013 - "Advanced Data Processing: Beyond Queries and Slices"NYC* 2013 - "Advanced Data Processing: Beyond Queries and Slices"
NYC* 2013 - "Advanced Data Processing: Beyond Queries and Slices"
 
About Clack
About ClackAbout Clack
About Clack
 
Event-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 EngineEvent-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 Engine
 
Zoo Overview
Zoo OverviewZoo Overview
Zoo Overview
 
Programming the Physical World with Device Shadows and Rules Engine
Programming the Physical World with Device Shadows and Rules EngineProgramming the Physical World with Device Shadows and Rules Engine
Programming the Physical World with Device Shadows and Rules Engine
 
Infrastructure as code, using Terraform
Infrastructure as code, using TerraformInfrastructure as code, using Terraform
Infrastructure as code, using Terraform
 
Aws Lambda in Swift - NSLondon - 3rd December 2020
Aws Lambda in Swift - NSLondon - 3rd December 2020Aws Lambda in Swift - NSLondon - 3rd December 2020
Aws Lambda in Swift - NSLondon - 3rd December 2020
 

More from Riza Fahmi

Membangun Aplikasi Web dengan Elixir dan Phoenix
Membangun Aplikasi Web dengan Elixir dan PhoenixMembangun Aplikasi Web dengan Elixir dan Phoenix
Membangun Aplikasi Web dengan Elixir dan PhoenixRiza Fahmi
 
Berbagai Pilihan Karir Developer
Berbagai Pilihan Karir DeveloperBerbagai Pilihan Karir Developer
Berbagai Pilihan Karir DeveloperRiza Fahmi
 
Web dan Progressive Web Apps di 2020
Web dan Progressive Web Apps di 2020Web dan Progressive Web Apps di 2020
Web dan Progressive Web Apps di 2020Riza Fahmi
 
Remote Working/Learning
Remote Working/LearningRemote Working/Learning
Remote Working/LearningRiza Fahmi
 
How to learn programming
How to learn programmingHow to learn programming
How to learn programmingRiza Fahmi
 
Rapid App Development with AWS Amplify
Rapid App Development with AWS AmplifyRapid App Development with AWS Amplify
Rapid App Development with AWS AmplifyRiza Fahmi
 
Menguak Misteri Module Bundler
Menguak Misteri Module BundlerMenguak Misteri Module Bundler
Menguak Misteri Module BundlerRiza Fahmi
 
Beberapa Web API Menarik
Beberapa Web API MenarikBeberapa Web API Menarik
Beberapa Web API MenarikRiza Fahmi
 
MVP development from software developer perspective
MVP development from software developer perspectiveMVP development from software developer perspective
MVP development from software developer perspectiveRiza Fahmi
 
Ekosistem JavaScript di Indonesia
Ekosistem JavaScript di IndonesiaEkosistem JavaScript di Indonesia
Ekosistem JavaScript di IndonesiaRiza Fahmi
 
Perkenalan ReasonML
Perkenalan ReasonMLPerkenalan ReasonML
Perkenalan ReasonMLRiza Fahmi
 
How I Generate Idea
How I Generate IdeaHow I Generate Idea
How I Generate IdeaRiza Fahmi
 
Strategi Presentasi Untuk Developer Workshop Slide
Strategi Presentasi Untuk Developer Workshop SlideStrategi Presentasi Untuk Developer Workshop Slide
Strategi Presentasi Untuk Developer Workshop SlideRiza Fahmi
 
Lesson Learned from Prolific Developers
Lesson Learned from Prolific DevelopersLesson Learned from Prolific Developers
Lesson Learned from Prolific DevelopersRiza Fahmi
 
Clean Code JavaScript
Clean Code JavaScriptClean Code JavaScript
Clean Code JavaScriptRiza Fahmi
 
The Future of AI
The Future of AIThe Future of AI
The Future of AIRiza Fahmi
 
Chrome Dev Summit 2018 - Personal Take Aways
Chrome Dev Summit 2018 - Personal Take AwaysChrome Dev Summit 2018 - Personal Take Aways
Chrome Dev Summit 2018 - Personal Take AwaysRiza Fahmi
 
Essentials and Impactful Features of ES6
Essentials and Impactful Features of ES6Essentials and Impactful Features of ES6
Essentials and Impactful Features of ES6Riza Fahmi
 
Modern Static Site with GatsbyJS
Modern Static Site with GatsbyJSModern Static Site with GatsbyJS
Modern Static Site with GatsbyJSRiza Fahmi
 
Introduction to ReasonML
Introduction to ReasonMLIntroduction to ReasonML
Introduction to ReasonMLRiza Fahmi
 

More from Riza Fahmi (20)

Membangun Aplikasi Web dengan Elixir dan Phoenix
Membangun Aplikasi Web dengan Elixir dan PhoenixMembangun Aplikasi Web dengan Elixir dan Phoenix
Membangun Aplikasi Web dengan Elixir dan Phoenix
 
Berbagai Pilihan Karir Developer
Berbagai Pilihan Karir DeveloperBerbagai Pilihan Karir Developer
Berbagai Pilihan Karir Developer
 
Web dan Progressive Web Apps di 2020
Web dan Progressive Web Apps di 2020Web dan Progressive Web Apps di 2020
Web dan Progressive Web Apps di 2020
 
Remote Working/Learning
Remote Working/LearningRemote Working/Learning
Remote Working/Learning
 
How to learn programming
How to learn programmingHow to learn programming
How to learn programming
 
Rapid App Development with AWS Amplify
Rapid App Development with AWS AmplifyRapid App Development with AWS Amplify
Rapid App Development with AWS Amplify
 
Menguak Misteri Module Bundler
Menguak Misteri Module BundlerMenguak Misteri Module Bundler
Menguak Misteri Module Bundler
 
Beberapa Web API Menarik
Beberapa Web API MenarikBeberapa Web API Menarik
Beberapa Web API Menarik
 
MVP development from software developer perspective
MVP development from software developer perspectiveMVP development from software developer perspective
MVP development from software developer perspective
 
Ekosistem JavaScript di Indonesia
Ekosistem JavaScript di IndonesiaEkosistem JavaScript di Indonesia
Ekosistem JavaScript di Indonesia
 
Perkenalan ReasonML
Perkenalan ReasonMLPerkenalan ReasonML
Perkenalan ReasonML
 
How I Generate Idea
How I Generate IdeaHow I Generate Idea
How I Generate Idea
 
Strategi Presentasi Untuk Developer Workshop Slide
Strategi Presentasi Untuk Developer Workshop SlideStrategi Presentasi Untuk Developer Workshop Slide
Strategi Presentasi Untuk Developer Workshop Slide
 
Lesson Learned from Prolific Developers
Lesson Learned from Prolific DevelopersLesson Learned from Prolific Developers
Lesson Learned from Prolific Developers
 
Clean Code JavaScript
Clean Code JavaScriptClean Code JavaScript
Clean Code JavaScript
 
The Future of AI
The Future of AIThe Future of AI
The Future of AI
 
Chrome Dev Summit 2018 - Personal Take Aways
Chrome Dev Summit 2018 - Personal Take AwaysChrome Dev Summit 2018 - Personal Take Aways
Chrome Dev Summit 2018 - Personal Take Aways
 
Essentials and Impactful Features of ES6
Essentials and Impactful Features of ES6Essentials and Impactful Features of ES6
Essentials and Impactful Features of ES6
 
Modern Static Site with GatsbyJS
Modern Static Site with GatsbyJSModern Static Site with GatsbyJS
Modern Static Site with GatsbyJS
 
Introduction to ReasonML
Introduction to ReasonMLIntroduction to ReasonML
Introduction to ReasonML
 

Recently uploaded

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 

Recently uploaded (20)

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 

Deploying Your Favorite Web App To AWS Lambda with Apex up

  • 1.
  • 3. Previous Talk AWS Lambda is amazing The price is awesome! slideshare.net/rizafahmi/aws-lambda-with-claudiajs BUT... ClaudiaJS is great
  • 5. What is UP? WhatsApp Messenger is a freeware and cross-pla!orm instant messaging and Voice over IP (VoIP) service.[45] The applica"on allows the sending of text messages and voice calls, as well as video calls, images and other media, documents, and user loca"on.
  • 7. What is UP? Up deploys infinitely scalable serverless apps, APIs, and sta!c websites in seconds, so you can get back to working on what makes your product unique.
  • 8. What is UP? Up focuses on deploying "vanilla" HTTP servers so there's nothing new to learn, just develop with your favorite exis"ng frameworks such as Express, Koa, Django, Golang net/h"p or others.
  • 10. Benefit of UP Routing Local Testing Quick Iteration Better Logs Feels Like Home
  • 11. Installa!on $ curl -sf https: //up.apex.sh/install | sh $ npm i -g up OR
  • 12. Ge"ng Started $ npm init $ npm install express
  • 13. Ge"ng Started const app = require("express")(); const { PORT = 3000 } = process.env; app.get("/", (req, res) => { res.json({ status: "OK", source: "development" }); }); app.listen(PORT);
  • 15. Deploying to produc!on $ up production $ up production url --open
  • 16. This is too easy
  • 17. Next Genera!on API with GraphQL slideshare.net/rizafahmi/graphql-story-intro-to-graphql
  • 18. We’ll Build The Empire Title: Empire Strikes Back Characters: • Luke Skywalker ◦ Birth Year: 19BBY ◦ Gender: male ◦ Homeworld: ▪ Name: Tatooine ▪ Climate: arid ▪ Gravity: 1 standard ▪ Population: 200000 • C-3PO ◦ Birth Year: 112BBY ◦ Gender: n/a ◦ Homeworld: ▪ Name: Tatooine ▪ Climate: arid ▪ Gravity: 1 standard ▪ Population: 200000
  • 19. Request in REST API 1 Film 11 Characters 11 Homeworld
  • 20. Request in GraphQL { film(id: 2) { title characters { name birthYear gender homeworld { name climate gravity population } } } }
  • 21. Request in GraphQL { "data": { "film": { "title": "The Force Awakens", "characters": [ { "name": "Luke Skywalker", "birthYear": "19BBY", "gender": "male", "homeworld": { "name": "Tatooine", "climate": "arid", "gravity": "1 standard", "population": “200000" } }, ... }
  • 22. Let’s get to work $ npm install express-graphql graphql
  • 23. GraphQL Server const app = require("express")(); const graphqlHTTP = require("express-graphql"); const schema = require("./schema"); const { PORT = 3000 } = process.env; app.get("/", (req, res) => { res.json({ status: "OK", source: "development" }); }); app.use( "/graphql", graphqlHTTP({ schema, graphiql: true }) ); app.listen(PORT);
  • 24. GraphQL Types const HomeworldType = new GraphQLObjectType({ name: "homeworld", description: "Planet instance", fields: () => ({ name: { type: GraphQLString, resolve: planet => planet.data.name }, climate: { type: GraphQLString, resolve: planet => planet.data.climate }, gravity: { type: GraphQLString, resolve: planet => planet.data.gravity }, population: { type: GraphQLString, resolve: planet => planet.data.population } }) });
  • 25. GraphQL Types const CharacterType = new GraphQLObjectType({ name: "characters", description: " ...", fields: () => ({ name: { type: GraphQLString, resolve: character => character.data.name }, birthYear: { type: GraphQLString, resolve: character => character.data.birth_year }, gender: { type: GraphQLString, resolve: character => character.data.gender }, homeworld: { type: HomeworldType, resolve: character => axios(character.data.homeworld) } }) });
  • 26. GraphQL Types const FilmType = new GraphQLObjectType({ name: "Film", description: " ...", fields: () => ({ title: { type: GraphQLString, resolve: film => film.data.title }, characters: { type: new GraphQLList(CharacterType), resolve: character => Promise.all(character.data.characters.map(char => axios(char))) } }) });
  • 27. GraphQL Schema module.exports = new GraphQLSchema({ query: new GraphQLObjectType({ name: "Query", description: " ...", fields: () => ({ film: { type: FilmType, args: { id: { type: GraphQLInt } }, resolve: (root, args) => axios .get(`https: //swapi.co/api/films/$ {args.id}`) .then(response => response) } }) }) });
  • 29. Logs $ up logs $ up logs ‘message = “request”’ $ up logs 'method=GET duration > 70ms’ $ up logs 'method=GET duration > 40ms production'
  • 30. Logs $ up logs | cat $ up logs 'message = "response"' | jq -r '.fields.ip'
  • 31. Metrics $ up metrics Requests: 7 ($0.00) Duration min: 33ms Duration avg: 493ms Duration max: 1940ms Duration sum: 5.981s ($0.00) Errors 4xx: 0 Errors 5xx: 0 Invocations: 11 ($0.00) Errors: 0
  • 32. Delete Deployment $ up stack delete