Slide 1

Slide 1 text

now © 2017 @aggre

Slide 2

Slide 2 text

Cloud hell Lambda Cloud Functions SAM Local Azure Functions Cloud Functions Local Emulator Azure Functions Core Tools DynamoDB Local LocalStack template.yaml local.settings.json Step Functions

Slide 3

Slide 3 text

Simplicity

Slide 4

Slide 4 text

$ now

Slide 5

Slide 5 text

now === 'Just a Node.js server’ && now === 'Ultra easy deployment'

Slide 6

Slide 6 text

$ vi server.js require('http').createServer((req, res) => { res.end('▲ Hello World') }).listen(process.env.PORT)

Slide 7

Slide 7 text

$ vi package.json { "name": "try-now", "scripts": { "start": "node server.js" } }

Slide 8

Slide 8 text

$ now

Slide 9

Slide 9 text

$ now > Enter your email: [email protected]

Slide 10

Slide 10 text

$ now > Enter your email: [email protected] >We sent an email to [email protected]. Please follow the steps provided

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

$ now > Enter your email: [email protected] >We sent an email to [email protected]. Please follow the steps provided > Ready! https://try-now-wenliudgwx.now.sh [3s] > You (aggre) are on the OSS plan. Your code and logs will be made public. > Are you sure you want to proceed with the deployment? [y|N]: y > Deployment complete!

Slide 13

Slide 13 text

$ curl https://try-now-wenliudgwx.now.sh ▲ Hello World

Slide 14

Slide 14 text

✔ Auto-scale ✔ Auto-freeze ✔ Free SSL ✔ HTTP/2 ✔ Custom domain ✔ Alias

Slide 15

Slide 15 text

module.exports = (req, res) => { res.end('Welcome to Micro') } micro

Slide 16

Slide 16 text

But… …Lambda …Cloud Functions …Azure Functions

Slide 17

Slide 17 text

But… Lambda Cloud Functions Azure Functions now

Slide 18

Slide 18 text

AWS $ now aws login > AWS credentials found in "~/.aws/credentials". > Would you like to use them? [Y|n]: y > Ready! Credentials will be read from your AWS config when needed

Slide 19

Slide 19 text

AWS $ vi now.json { "name": "try-now", "description": "from now to lambda", "regions": "us-wese-1" }

Slide 20

Slide 20 text

Deploy $ now aws > ✔ Build generated a 12.07KB zip [1s] > ✔ API resources created (id: "now-try-now- 0ZfLN4pSAI") [10s] > Success! https://p5o38dwqt3.execute-api.us- west-1.amazonaws.com/now [12s]

Slide 21

Slide 21 text

Done! $ curl https://p5o38dwqt3.execute-api.us-west- 1.amazonaws.com/now

Slide 22

Slide 22 text

Done? $ curl https://p5o38dwqt3.execute-api.us-west- 1.amazonaws.com/now {"message": "Internal server error"}

Slide 23

Slide 23 text

Issues…

Slide 24

Slide 24 text

now Lambda?

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

Thank you!