now
© 2017 @aggre
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
Simplicity
$ now
now === 'Just a Node.js server’
&&
now === 'Ultra easy deployment'
$ vi server.js
require('http').createServer((req, res) => {
res.end('▲ Hello World')
}).listen(process.env.PORT)
$ vi package.json
{
"name": "try-now",
"scripts": {
"start": "node server.js"
}
}
$ now
$ now
> Enter your email: hiroyuki.aggre@gmail.com
$ now
> Enter your email: hiroyuki.aggre@gmail.com
>We sent an email to hiroyuki.aggre@gmail.com.
Please follow the steps provided
$ now
> Enter your email: hiroyuki.aggre@gmail.com
>We sent an email to hiroyuki.aggre@gmail.com.
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!
$ curl https://try-now-wenliudgwx.now.sh
▲ Hello World
✔ Auto-scale
✔ Auto-freeze
✔ Free SSL
✔ HTTP/2
✔ Custom domain
✔ Alias
module.exports = (req, res) => {
res.end('Welcome to Micro')
}
micro
But…
…Lambda
…Cloud Functions
…Azure Functions
But…
Lambda
Cloud Functions
Azure Functions
now
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
AWS
$ vi now.json
{
"name": "try-now",
"description": "from now to lambda",
"regions": "us-wese-1"
}
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]
Done!
$ curl https://p5o38dwqt3.execute-api.us-west-
1.amazonaws.com/now
Done?
$ curl https://p5o38dwqt3.execute-api.us-west-
1.amazonaws.com/now
{"message": "Internal server error"}
Issues…
now
Lambda?
Thank you!

now