Save 37% off PRO during our Black Friday Sale! »

About AWS Lambda and kintone

C9cacb1d0e96ab27dcb045177068820c?s=47 youyo
October 04, 2017

About AWS Lambda and kintone

C9cacb1d0e96ab27dcb045177068820c?s=128

youyo

October 04, 2017
Tweet

Transcript

  1. AWS Lambdaͱ kintoneʹ͍ͭͯ

  2. ࣗݾ঺հ • ੴᖒ௚ਓ(Naoto Ishizawa) • twitter: @youyo_ • Cloud Architect

    • I love golang, python, ruby
  3. ձࣾ֓ཁ ໊ࣾ גࣜձࣾϔϓλΰϯ IFQUBHPOJOD ୅ද ཱՖ୓໵ ڌ఺ ੨৿ݝࡾ୔ࢢɺٶ৓ݝઋ୆ࢢ ૑ۀ ೥݄̓

    ࣄۀ Ϋϥ΢υಋೖʹؔ͢ΔίϯαϧςΟϯά Ϋϥ΢υͷߏஙอकӡ༻ Ϋϥ΢υͷΤϯδχΞ޲͚ڭҭ ࢿ֨ "1/ίϯαϧςΟϯάύʔτφʔ Ұൠୈೋछిؾ௨৴ࣄۀऀ ౦๺ຊࣾͰ͸།Ұͷ AWSίϯαϧςΟϯάύʔτφʔ
  4. Πϯϑϥߏங/Ҡઃ ͓٬༷ʹ߹ΘͤͯΦʔμʔϝΠυͰAWS؀ڥΛ͝༻ҙ͠·͢ɻ ίϯςϯπΛΞοϓϩʔυ͢Δ͚ͩͰαʔϏεΛ։࢝Ͱ͖·͢ɻ ઃܭ ߏங ༧ࢉ ೲظ ηΩϡϦςΟ Ҡઃ ৑௕ੑ

    νϡʔχ ϯά
  5. ӡ༻΋ϑϧϚωʔδυ ͓٬༷͸ ίϯςϯπ੍࡞΍αʔϏεͷӡ༻͚ͩʹ ͝஫ྗ͍ͩ͘͞ɻ ؂ࢹ ো֐ ରԠ ࢧ෷ εέʔϧ Ξοϓ

    ηΩϡϦςΟ όοΫ Ξοϓ αϙʔτ ࡞ۀ୅ߦ
  6. AWSΛҙࣝͤͣʹ AWSͷϝϦοτΛʂ

  7. ౦๺Ͱͷ͓٬༷

  8. ౦๺Ͱͷ͓٬༷ Λ௒͑Δ ౦๺ͷαʔϏεɺϓϩδΣΫτΛ Ϋϥ΢υ্ͰՔಇ

  9. ࠷ۙͰ͸AI΍IoTͷ ϓϩδΣΫτ΋૿͖͍͑ͯͯ·͢

  10. https://www.youtube.com/watch?v=M_ErTEE9ZcM

  11. None
  12. AWS Lambda

  13. AWS Lambdaͷ֓ཁ “AWS Lambda ͸αʔόʔΛϓϩϏδϣχϯάͨ͠ Γ؅ཧ͠ͳͯ͘΋ίʔυΛ࣮ߦͰ͖ΔίϯϐϡʔςΟ ϯάαʔϏεͰ͢ɻAWS Lambda ͸…” http://docs.aws.amazon.com/ja_jp/lambda/latest/dg/welcome.html

  14. AWS Lambdaͷ֓ཁ ͬ͘͟Γݴ͏ͱɺ ϑΝϯΫγϣϯ(ίʔυ)ΛΞοϓϩʔυ͠ɺԿΒ͔ ͷΠϕϯτ(τϦΨʔ)ʹԠ౴ͯͦ͠ͷϑΝϯΫγϣ ϯΛ࣮ߦͯ͘͠ΕΔ࢓૊Έɻ Πϕϯτ Fn ϑΝϯΫγϣϯ

  15. Կ͕خ͍͠ͷ͔ʁ

  16. AWS Lambdaͷ֓ཁ • αʔόʔΛ؅ཧ͢Δඞཁ͕ͳ͍ • ࢖༻ྉۚ͸ϑΝϯΫγϣϯ(ίʔυ)ͷ࣮ߦʹ͔ ͔ͬͨ࣌ؒ෼͚ͩ • AWSͷ֤छαʔϏεͱ࿈ܞͰ͖Δ

  17. ࠷ߴ͡Όͳ͍͔ʂ

  18. શ෦͜ΕͰ࡞Ε͹͍͍ ͡Όͳ͍͔ʂʂ

  19. ݱ࣮͸؁͘ͳ͍

  20. దࡐదॴ

  21. ϚΠΫϩαʔϏε αʔόʔϨε

  22. monolithic architecture vs micro services • ϞϊϦγοΫͳΞϓϦέʔγϣϯ • ୯ҰͷΞϓϦʹෳ਺ͷػೳΛ࣋ͭγεςϜ •

    Α͋͘ΔWEBΞϓϦ w 3&45"1* w ೝূػೳ w Ϣʔβʔ؅ཧ w ʜ
  23. monolithic architecture vs micro services • ϚΠΫϩαʔϏε • ୯ҰͷػೳΛͦΕͧΕখ͞ͳαʔϏεͱͯ͠੾ Γग़͠ɺͦΕͧΕͷখ͞ͳαʔϏεΛ࿈ܞͤ͞

    ͯҰͭͷγεςϜΛߏ੒͢Δ w 3&45"1* w ೝূػೳ w Ϣʔβʔ؅ཧ w 1SPYZ
  24. monolithic architecture vs micro services .POPMJUI .JDSPTFSWJDFT εέʔϥϏϦςΟ ͢΂ͯͷػೳ͕εέʔϥϒϧͳઃ ܭͰ͋Δඞཁ͕͋Δ

    ػೳ αʔϏε ୯ҐͰεέʔϥ ϒϧͰ͋Ε͹ྑ͍ ։ൃ ̍ػೳͷվम͕ଞػೳʹӨڹΛ༩ ͑ΔՄೳੑ͕͋Δ ͢΂ͯͷػೳΛಉҰͷٕज़ελο ΫͰ։ൃ͢Δඞཁ͕͋Δ ػೳ αʔϏε ୯ҐͰ։ൃΛਐ ΊΔ͜ͱ͕Ͱ͖Δ ػೳ͝ͱʹҟͳΔٕज़ελοΫ ͷ࠾༻΋Մೳ ӡ༻ τϥϒϧ࣌ɺ̍ΞϓϦ಺Ͱ׬݁͠ ͍ͯΔͷͰ௥੻͸༰қ τϥϒϧ࣌ɺෳ਺αʔϏε͕࿈ ܞ͍ͯ͠ΔͷͰ௥੻͕ࠔ೉ͳ৔ ߹΋͋Δ
  25. αʔόʔϨε

  26. Serverless Architecture • ϚΠΫϩαʔϏεͷͻͱͭ • Faas(Function as a service) •

    ؔ਺ΛϑϧϚωʔδυͯ͘͠ΕΔ • AWS Lambda • Google cloud functions • Azure Functions • Functional Saas • ϑϧϚωʔδυαʔϏεͰɺ
 ؔ਺Λݺͼग़͢Α͏ʹར༻Ͱ͖ΔSaas • Amazon Cognito • Auth0 • Firebase Micro Services Monolithic Architecture Serverless Architecture Another Saas, Paas… Faas FSaas
  27. AWS Lambdaৄࡉ • Function as a service • ίʔυΛΞοϓϩʔυ͢Δ͚ͩͰར༻Մೳ •

    S3΍CloudWatchEventsͳͲଞͷαʔϏεͱ࿈ܞ • ݴޠ: nodejs, python, java, C# • ैྔ՝ۚɻίʔυ࣮ߦʹ͔͔ͬͨ࣌ؒͰ՝ۚɻ100ms୯Ґɻ • ϝϞϦׂ౰ྔΛௐઅ͢Δ͜ͱͰɺॲཧೳྗΛมߋͰ͖Δ • Dead letter queue, lambda@edge…
  28. ޲͖ɾෆ޲͖ͳΞʔΩςΫνϟ • ޲͍ͯΔ΋ͷ • ΠϕϯτυϦϒϯͳγεςϜ • εςʔτϨεͳΞϓϦέʔγϣϯ • ޲͍ͯͳ͍΋ͷ •

    ಉظతͳॲཧ΍ϦΞϧλΠϜੑΛॏࢹ͢Δ΋ͷ • εςʔτϑϧͳΞϓϦέʔγϣϯ
  29. ୅දతͳྫ • S3ʹΞοϓϩʔυ͞Εͨը૾ͷαϜωΠϧΛ࡞੒͢Δ

  30. ୅දతͳྫ • webhookΛAPI-GatewayͰड͚औΓɺAWS LambdaͰॲཧΛߦ͏ • HTTPϦΫΤετ΋ҰͭͷΠϕϯτͱͯ͠ѻ͏

  31. ฐࣾࣄྫ

  32. kintone+Lambda

  33. ͳͥkintone+Lambdaͳͷ͔ʁ • jsҎ֎ͷݴޠͰϩδοΫॲཧ͕ॻ͚Δ • αʔόαΠυͰͷॲཧ͕࣮૷Ͱ͖Δ • ֎෦αʔϏεͱͷ࿈ܞ͕͠΍͍͢ • kintoneͰະఏڙͷػೳΛlambdaͰ࣮૷ •

    ॲཧ͚ͨ࣌ؒͩ͠ͷैྔ՝ۚ(ͦ͏ͦ͏՝ۚ͞Εͳ ͍) • େྔσʔλͷొ࿥͸kintone͸ۤखͳͷͰɺΫϥ΢υ ଆʹҰ୴อଘͯ͠ɺLambdaͰΏͬ͘Γอଘ͢Δ • Lambda(AWS)ʹ͸σʔλΛಡΈॻ͖͢ΔUI͕ͳ͍
  34. ͓ޓ͍ʹۤखͳ෦෼Λ ิ׬Ͱ͖Δʂ

  35. Ͳ͏͍͏έʔεͰ࢖͑Δ͔ʁ • ֎෦αʔϏε΁ͷσʔλͷૹड৴ • σʔλͷՃ޻΍ϩδοΫॲཧʢAIܥαʔ Ϗεͱͷ࿈ܞͱ͔΋ʣ • ఆظδϣϒ • αʔόαΠυͷॲཧͷՄࢹԽɺWEBͰͷ

    σʔλ؅ཧ
  36. ฐࣾࣄྫ (΍ͬͯΈͨϨϕϧͰ͢ ͕…)

  37. ϥΠηϯε؅ཧ • ͓٬༷ͷϥΠηϯε؅ཧ
 ฐࣾͷۀ຿Ͱ͸SSL΍υϝΠϯͳͲ༗ޮظݶͷ͋ΔϥΠηϯεΛ؅ ཧ͠ద੾ʹߋ৽͢Δඞཁ͕͋Δɻ
 ߋ৽͠๨ΕΔͱେมͳ͜ͱʹ…. • ࢓૊Έ
 σʔλͷೖྗ͸kintoneͰߦ͏
 LambdaͰ̍೔̍ճΞϓϦΛಡΈࠐΈɺظݶ·Ͱಛఆͷ೔਺ͩͬͨ

    ΒslackͱϝʔϧͰ௨஌͢Δ
 (1ϲ݄લɺ2िؒલɺ1िؒલ….)
  38. AWS Lambda Amazon CloudWatch σʔλೖྗ ظݶνΣοΫ ىಈ slack௨஌ ϝʔϧ௨஌

  39. kintoneը໘ Slack΁ͷ௨஌

  40. সإ࠾఺ήʔϜ • ࣸਅΛղੳ͠ɺ୭͕Ұ൪সإ͔ͩͬͨΛڝ͏
 • ࢓૊Έ
 S3্ͷΞοϓϩʔυ͞ΕͨࣗຫͷࣸਅΛɺLambdaܦ༝ͰAmazon rekognitionͰղੳ
 ݁ՌΛKintoneͰՄࢹԽ

  41. সإ࠾఺ήʔϜ

  42. সإ࠾఺ήʔϜ

  43. ·ͱΊ • KitoneͱAWS, ͓ޓ͍ͷ௕ॴΛ׆͔͠୹ॴΛิ͏ • దࡐదॴͰΑΓྑ͍γεςϜΛ

  44. None