Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

now

2,265 views

Published on

Speaker Deck 👉 https://speakerdeck.com/aggre/now

Serverless Conf Tokyo 2017 での LT 資料です。

Published in: Technology
  • Be the first to comment

  • Be the first to like this

now

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

×