Slide 1

Slide 1 text

AWS SAM + Rubyͷ͢ʍΊ 2021-03-24(Wed ) Fukuoka.rb 200ճ LTେձ (#???) Ԭቌ ༤ฏ 1

Slide 2

Slide 2 text

ॕɾFukuoka.rb 200ճ!! 🎉🎉🎉

Slide 3

Slide 3 text

ࣗݾ঺հ Ԭቌ ༤ฏ Okazaki Yuhei ‣ I D - @yuuu @Y_uuu ‣ ࣗݾ঺հ • FusicͷIoTΫϥ΢υΤϯδχΞ • ݩɾ૊ࠐΈΤϯδχΞ(2018೥͔ΒWebܥ΁ ) • ࠷ۙͷ͓࢓ࣄ͸ઐΒAzure ‣ Skil l 3 image ʘNewʗ

Slide 4

Slide 4 text

AWS Lambda 4 ‣ ͍ΘΏΔFaaS (Function as a Service) - αʔόϨε - εςʔτϨε - ίϯςφ - Πϕϯτۦಈ - ͪΐͬͱͨ͠ϓϩάϥϜΛ؆୯ʹಈ͔ͤΔ

Slide 5

Slide 5 text

Lambda͸RubyͰ΋ॻ͚Δ 5 ‣ re:Invent 2018Ͱൃද - Rubyist׻تʂ - ฐࣾͰ΋RubyͰͷ࣮૷͕૿͑Δ ‣ 2020೥2݄ʹruby 2.7΋ରԠ

Slide 6

Slide 6 text

΋ͬͱར༻͞ΕΔ΂͖ 6 ‣ ଞͷݴޠʹൺ΂Δͱਓؾ͕௿͍Β͍͠ https://www.datadoghq.com/ja/state-of-serverless/

Slide 7

Slide 7 text

Rubyistʹ΋ͬͱLambdaΛ࢖ͬͯ΋Β͍͍ͨʂ AWS SAM + Rubyͷ͢ʍΊ

Slide 8

Slide 8 text

AWS SAM 8 ‣ SAM=Serverless Application Mode l - LambdaΛத৺ͱͨ͠AWSϦιʔεΛ؆୯ʹ࡞੒ - CLIΛ࢖ͬͯ؆୯ʹߏஙɾςετɾσϓϩΠՄೳ

Slide 9

Slide 9 text

3 STEPͰ؆୯σϓϩΠʂ ࢖͍ํ

Slide 10

Slide 10 text

STEP0. ࣄલ४උ 10 ‣ AWSΞΧ΢ϯτͷ࡞੒ ‣ AWS SAM CLIͷΠϯετʔϧ - https://docs.aws.amazon.com/ja_jp/serverless-application-model/latest/ developerguide/serverless-sam-cli-install.html ‣ AWSೝূ৘ใͷઃఆ - https://docs.aws.amazon.com/ja_jp/serverless-application-model/latest/ developerguide/serverless-getting-started-set-up-credentials.html AWS SAMΛ࢖͏ͨΊʹҎԼͷ४උ͕ඞཁͰ͢

Slide 11

Slide 11 text

STEP1. ϓϩδΣΫτ࡞੒ 11 AWS SAM CLIΛ࢖ͬͯϓϩδΣΫτΛ࡞੒͠·͢

Slide 12

Slide 12 text

STEP1. ϓϩδΣΫτ࡞੒ 12 ໎Θͣʮ3 - ruby2.7ʯΛબ୒͠·͠ΐ͏

Slide 13

Slide 13 text

STEP2.ίʔσΟϯά 13 ༧Ίhello_world͕αϯϓϧͱͯ͠༻ҙ͞Ε͍ͯΔ

Slide 14

Slide 14 text

STEP2.ίʔσΟϯά 14 AWSϦιʔεߏ੒Λtemplate.ymlʹهड़

Slide 15

Slide 15 text

STEP2.ίʔσΟϯά 15 ඞཁͳRubyGemΛGemfileʹ௥Ճ

Slide 16

Slide 16 text

STEP2.ίʔσΟϯά 16 app.rbʹRubyͷϓϩάϥϜΛهड़

Slide 17

Slide 17 text

STEP3.σϓϩΠ 17 AWS SAM CLIΛ࢖ͬͯϏϧυˠσϓϩΠ

Slide 18

Slide 18 text

STEP3.σϓϩΠ 18 AWS SAM CLIΛ࢖ͬͯϏϧυˠσϓϩΠ

Slide 19

Slide 19 text

API͕׬੒ 19 https://bit.ly/3qUzb0K

Slide 20

Slide 20 text

࠷ۙ࡞ͬͨ΋ͷΛ঺հ Ԡ༻ྫ

Slide 21

Slide 21 text

Թ౓ηϯαΛ࢖ͬͨIoTγεςϜ 21 Թ౓ηϯα͔Βଌఆ஋Λऩूˠ௨஌ https://github.com/yuuu/iot_dev_starting_book_site AWS SAMͰߏங

Slide 22

Slide 22 text

Թ౓ηϯαΛ࢖ͬͨIoTγεςϜ 22 ϒϥ΢βͰଌఆ஋ΛάϥϑԽ https://github.com/yuuu/iot_dev_starting_book_site AWS SAMͰߏங

Slide 23

Slide 23 text

ToFଌڑηϯαΛ࢖ͬͨண࠲؂ࢹγεςϜ 23 ଌఆ஋ʹԠͨ͡ϑΟʔυόοΫ੍ޚ https://github.com/yuuu/build_and_learn_soracom_book_site AWS SAMͰߏங

Slide 24

Slide 24 text

ฐࣾࣾһͷ20ࡀͷ஀ੜ೔ΛΧ΢ϯτμ΢ϯ͢ΔSlack Bot 24 ੒ਓࣾһ͔ΒͷΞυόΠεΛఴ͑ͯΧ΢ϯτμ΢ϯϝοηʔδΛPOST

Slide 25

Slide 25 text

·ͱΊ 25 •RubyͰLambdaΛॻ͖·͠ΐ͏ʂ • ͜͜·Ͱ5෼Ҏ಺ʹऩ·͍ͬͯΔ͸ͣʘ(^o^)ʗ

Slide 26

Slide 26 text

͝ਗ਼ௌ͍͖ͨͩ͋Γ͕ͱ͏͍͟͝·ͨ͠ Thank You We are Hiring ! https://recruit.fusic.co.jp/