Upgrade to Pro — share decks privately, control downloads, hide ads and more …

サーバーレスシステムのチーム開発

tomoki10
July 03, 2020

 サーバーレスシステムのチーム開発

AWSでのサーバーレスシステムの利点やチームでの開発方法について紹介しています。

前半は改めてサーバーレスとはどんな利点があったのか振り返っています。オンプレからクラウドになる中でどこが便利になったのか、さらにサーバーレスはどんな問題を解決できるのか記載しています。

後半では、サーバーレスシステムを開発するチームに所属して、今まで行ってきた開発方式や実際に使っているツールなどを紹介しました。

■解説動画
https://www.youtube.com/watch?v=zWIjG997s98&t=65s

tomoki10

July 03, 2020
Tweet

More Decks by tomoki10

Other Decks in Technology

Transcript


  1. $9ࣄۀຊ෦ࠤ౻ஐथ
    αʔόʔϨεγεςϜͷνʔϜ։ൃ

    View full-size slide

  2. ͜ͷηογϣϯͰ෼͔Δ͜ͱ
    ର৅ऀ
    w αʔόʔϨεͬͯฉ͍ͨ͜ͱ͸͋Δ͚ͲԿ͕ྑ͍ͷ͔ؾʹͳΔํ
    w "84-BNCEBͱ͔࢖ͬͨ͜ͱ͸͋Δ͚Ͳ࣮ࡍۀ຿Ͱ͸
    ͲͷΑ͏ʹνʔϜͰ։ൃ͍ͯ͠Δͷ͔ؾʹͳΔํ
    ηογϣϯͷΰʔϧ
    w αʔόʔϨεʹ͍ͭͯ͋Δఔ౓ཧղͰ͖Δ
    w αʔόʔϨεͳγεςϜͷ։ൃମ੍ͱ։ൃํ๏ΛཧղͰ͖Δ

    View full-size slide

  3. ࣗݾ঺հ
    ໊લɿࠤ౻ஐथ
    ෦ॺɿ$9ࣄۀຊ෦
    ໾ׂɿαʔόαΠυΤϯδχΞ
    લ৬ɿ4*FSͷ4&Λ೥ऑ
    ݱࡏɿ*P5νʔϜ
    ɹɹɹ8FC"1**P5όοΫΤϯυͷ։ൃ
    ޷͖ͳ"84αʔϏεɿ-BNCEBɺ$%,

    View full-size slide

  4. ͸͡Ίʹ
    αʔόʔϨεͳγεςϜͱ͸Կͳͷ͔

    View full-size slide

  5. ैདྷͱͷൺֱ ΦϯϓϨ

    WEBαʔό
    • ͱͯ΋γϯϓϧWebαʔϏεͷྫ

    View full-size slide

  6. • ͱͯ΋γϯϓϧWebαʔϏεͷྫ
    ैདྷͱͷൺֱ ΦϯϓϨ

    WEBαʔό
    w Ωϟογϡαʔό͸ʁ
    w $%/͸ʁ
    w υϝΠϯ͸ʁ
    w %#αʔό͸
    w ϩʔυόϥϯαʔ͸ʁ
    ຊ֨తͳӡ༻Λߟ͑ΔͳΒʜ

    View full-size slide

  7. ɹɹ AWS Cloud
    ैདྷͷγεςϜߏ੒
    ैདྷͱͷൺֱ "84

    Amazon CloudFront Elastic Load
    Balancing
    Amazon EC2
    Amazon RDS
    Amazon Simple
    Storage Service
    Amazon Route 53

    View full-size slide

  8. ैདྷͱͷൺֱ "84

    ैདྷͷγεςϜ
    Amazon CloudFront Elastic Load
    Balancing
    Amazon EC2
    Amazon RDS
    Amazon Simple
    Storage Service
    Amazon Route 53
    ɹɹ AWS Cloud w αʔόʔͷ؅ཧ͕ඞཁ
    ੬ऑੑରԠ
    04ͷߋ৽
    w ଴ػ࣌ؒͷඅ༻͕͔͔Δ

    View full-size slide

  9. αʔόʔϨεͳઃܭ
    αʔόʔϨεγεςϜ 4JOHMF1BHF"QQMJDBUJPO

    Amazon CloudFront
    Amazon Simple
    Storage Service
    Amazon Route 53 Amazon API
    Gateway
    AWS
    Lambda
    Amazon
    DynamoDB
    ɹɹ AWS Cloud

    View full-size slide

  10. αʔόʔϨεͳઃܭ
    αʔόʔϨεγεςϜ 4JOHMF1BHF"QQMJDBUJPO

    Amazon CloudFront
    Amazon Simple
    Storage Service
    Amazon Route 53 Amazon API
    Gateway
    AWS
    Lambda
    Amazon
    DynamoDB
    w αʔόʔͷ؅ཧ͕ෆཁ
    04؅ཧෆཁ
    αʔόʔͷ
    ੬ऑੑରԠෆཁ
    w ࢖༻ͨ͠෼͚ͩ՝ۚ
    ɹɹ AWS Cloud

    View full-size slide

  11. αʔόʔϨεͱ͸Կ͔
    $/$'4FSWFSMFTT8IJUFQBQFSW
    ʮ8IBUJTTFSWFSMFTTDPNQVUJOH ʯΑΓ ௒ҙ༁

    wαʔόʔϨείϯϐϡʔςΟϯάͱ͸ɺαʔόʔ؅ཧΛඞཁͱ͠ͳ͍ΞϓϦ
    έʔγϣϯΛߏங࣮ͯ͠ߦ͢Δͱ͍͏֓೦ɻΠϕϯτʹԠ࣮ͯ͡ߦɺεέʔϦϯ
    άɺ՝͕ۚߦΘΕΔɻ
    wαʔό͕ແ͘ͳΔΘ͚Ͱ΋ӡ༻ΤϯδχΞ͕͍Βͳ͍Θ͚Ͱ΋ͳ͍ɻαʔόʔ
    ͷ؅ཧʹ͔͔Δ࣌ؒͱϦιʔεΛϓϥοτϑΥʔϜଆʹ࣋ͨͤΔͱ͍͏ߟ͑ํɻ
    w։ൃऀ͸ΑΓϏδωεϩδοΫʹूதͰ͖Δ
    wӡ༻ΤϯδχΞ͸ΑΓॏཁͳλεΫʹूதͰ͖Δ
    IUUQTHJUIVCDPNDODGXHTFSWFSMFTTUSFFNBTUFSXIJUFQBQFSTTFSWFSMFTTPWFSWJFX

    View full-size slide

  12. αʔόʔϨεͱ͸Կ͔
    $/$'4FSWFSMFTT8IJUFQBQFSW
    ʮ8IBUJTTFSWFSMFTTDPNQVUJOH ʯΑΓ ௒ҙ༁

    wαʔόʔϨείϯϐϡʔςΟϯάͱ͸ɺαʔόʔ؅ཧΛඞཁͱ͠ͳ͍ΞϓϦ
    έʔγϣϯΛߏங࣮ͯ͠ߦ͢Δͱ͍͏֓೦ɻΠϕϯτʹԠ࣮ͯ͡ߦɺεέʔϦϯ
    άɺ՝͕ۚߦΘΕΔɻ
    wαʔό͕ແ͘ͳΔΘ͚Ͱ΋ӡ༻ΤϯδχΞ͕͍Βͳ͍Θ͚Ͱ΋ͳ͍ɻαʔόʔ
    ͷ؅ཧʹ͔͔Δ࣌ؒͱϦιʔεΛϓϥοτϑΥʔϜଆʹ࣋ͨͤΔͱ͍͏ߟ͑ํɻ
    w։ൃऀ͸ΑΓϏδωεϩδοΫʹूதͰ͖Δ
    wӡ༻ΤϯδχΞ͸ΑΓॏཁͳλεΫʹूதͰ͖Δ
    IUUQTHJUIVCDPNDODGXHTFSWFSMFTTUSFFNBTUFSXIJUFQBQFSTTFSWFSMFTTPWFSWJFX

    View full-size slide

  13. ݸਓతʹࢥ͏αʔόʔϨεͷར఺
    w ΠϕϯτۦಈͳγεςϜઃܭ
    Amazon S3 AWS Lambda
    Amazon
    DynamoDB
    AWS Lambda Amazon S3
    ը૾ΞοϓϩʔυΛ
    ى఺ʹॲཧΛ࣮ߦ
    DBͷσʔλ௥ՃΛ
    ى఺ʹॲཧΛ࣮ߦ

    View full-size slide

  14. ݸਓతʹࢥ͏αʔόʔϨεͷར఺
    w ΠϕϯτۦಈͳγεςϜઃܭ
    ΠϕϯτۦಈͰૄ݁߹ʹγεςϜΛ࡞ΕΔ
    վम͠΍͍͢γεςϜ͕࡞ΕΔ

    View full-size slide

  15. ։ൃྖҬ
    ࣗ෼ͷ୲౰͢Δ։ൃྖҬ
    (IoTνʔϜͷ1PJͷྫ)

    View full-size slide


  16. ୲౰ྖҬͷΠϝʔδ
    *P5 όοΫΤϯυ ϑϩϯτΤϯυ
    ୲౰Օॴ

    View full-size slide


  17. ࣮ࡍʹ୲౰͍ͯ͠Δۀ຿
    w όοΫΤϯυ։ൃ
    ϏδωεϩδοΫΛ5ZQF4DSJQUͰ։ൃ
    AWS Lambda
    41"༻ͷ"1*ͱ͔
    όονॲཧͱ͔
    AWS Lambda
    Amazon API
    Gateway
    Amazon
    DynamoDB
    Amazon
    CloudWatch
    Amazon
    DynamoDB

    View full-size slide


  18. ࣮ࡍʹ୲౰͍ͯ͠Δۀ຿
    w ΞʔΩςΫνϟઃܭ
    "84$%,ͰΠϯϑϥͷઃܭ΋5ZQF4DSJQUͰߏங
    AWS Lambda
    41"༻ͷ"1*ͱ͔
    όονॲཧͱ͔
    AWS Lambda
    Amazon API
    Gateway
    Amazon
    DynamoDB
    Amazon
    CloudWatch
    Amazon
    DynamoDB

    View full-size slide

  19. ීஈͷۀ຿
    ઃܭɾ࣮૷ͷྲྀΕ
    ઃܭ
    ઃܭϨϏϡʔ
    ࣮૷
    ࣮૷ϨϏϡʔ
    w Πϯϑϥɾۀ຿ઃܭ
    "84ͷΠϯϑϥߏ੒ͷઃܭͱ
    %#ɾ"1*ͳͲͷۀ຿ઃܭΛ·ͱΊ࣮ͯࢪ
    w ࣮૷
    ઃܭͨ͠಺༰ʹԊͬͯϓϩάϥϜͷ࣮૷
    Ϣχοτςετɺ&&ςετΛ࣮૷

    View full-size slide


  20. ։ൃͷྲྀΕ ઃܭ

    ઃܭɾ࣮૷ͷྲྀΕ
    ઃܭ
    ઃܭϨϏϡʔ
    ࣮૷
    ࣮૷ϨϏϡʔ
    "TDJJ%PDͱ1MBOU6.-Ͱγʔέϯεਤ࡞੒
    https://dev.classmethod.jp/articles/atom-plantuml-sequence/

    View full-size slide


  21. ։ൃͷྲྀΕ ઃܭ

    "TDJJ%PDͱ1MBOU6.-Ͱγʔέϯεਤ࡞੒
    https://dev.classmethod.jp/articles/atom-plantuml-sequence/
    ઃܭɾ࣮૷ͷྲྀΕ
    ઃܭ
    ઃܭϨϏϡʔ
    ࣮૷
    ࣮૷ϨϏϡʔ

    View full-size slide


  22. ։ൃͷྲྀΕ(ઃܭ)
    4XBHHFS6*Ͱ"1*ઃఆΛఆٛ
    https://github.com/swagger-api/swagger-ui
    ઃܭɾ࣮૷ͷྲྀΕ
    ઃܭ
    ઃܭϨϏϡʔ
    ࣮૷
    ࣮૷ϨϏϡʔ

    View full-size slide


  23. ։ൃͷྲྀΕ(ઃܭ)
    %SBXJPͰ"84ͷϦιʔεߏ੒Λઃܭ
    ઃܭɾ࣮૷ͷྲྀΕ
    ઃܭ
    ઃܭϨϏϡʔ
    ࣮૷
    ࣮૷ϨϏϡʔ

    View full-size slide


  24. ։ൃͷྲྀΕ(ઃܭϨϏϡʔ)
    ઃܭɾ࣮૷ͷྲྀΕ
    ઃܭ
    ઃܭϨϏϡʔ
    ࣮૷
    ࣮૷ϨϏϡʔ
    (JU)VCͰ1VMM3FRVFTUͰ૬ޓʹϨϏϡʔ
    ΞαΠϯ͢Δͱ4MBDL௨஌͕ඈΜͰศར

    View full-size slide

  25. ։ൃ؀ڥߏங
    ઃܭɾ࣮૷ͷྲྀΕ
    ઃܭ
    ઃܭϨϏϡʔ
    ࣮૷
    ࣮૷ϨϏϡʔ
    5ZQF4DSJQUͰ։ൃ
    w ZBSOͰύοέʔδ؅ཧ
    w XFCQBDLͰτϥϯεύΠϧόϯυϧ؅ཧ
    https://dev.classmethod.jp/articles/deploying-lambda-with-webpack-typescript-cdk/

    View full-size slide

  26. ։ൃ؀ڥ४උ
    w֤छϓϥάΠϯͰίʔυࣗಈ੔ܗ΍
    ։ൃޮ཰ͷ޲্
    ✦ &4-JOU
    ✦ 1SFUUJFS
    ✦ (JU)JTUPSZ
    ✦ (JU-FOT
    ✦ -JWF4IBSF
    5ZQF4DSJQU74$PEFͰ։ൃ
    ઃܭɾ࣮૷ͷྲྀΕ
    ઃܭ
    ઃܭϨϏϡʔ
    ࣮૷
    ࣮૷ϨϏϡʔ

    View full-size slide


  27. ΫϦʔϯΞʔΩςΫνϟͰ࣮૷
    https://dev.classmethod.jp/articles/serverless-testing-using-typescript-and-jest/
    ։ൃͷྲྀΕ(࣮૷)
    ઃܭɾ࣮૷ͷྲྀΕ
    ઃܭ
    ઃܭϨϏϡʔ
    ࣮૷
    ࣮૷ϨϏϡʔ

    View full-size slide


  28. ։ൃͷྲྀΕ(࣮૷)
    AWS Lambda
    Amazon API Gateway Amazon DynamoDB
    -BNCEB
    )BOEMFSɿΠϕϯτ+40/ͷύʔε
    %PNBJOɿυϝΠϯͷ࣮૷
    *OGSBɿ%#΁ͷΞΫηε
    ྫ͑͹ɺσʔλऔಘ͢Δ"1*ͷ৔߹
    ઃܭɾ࣮૷ͷྲྀΕ
    ઃܭ
    ઃܭϨϏϡʔ
    ࣮૷
    ࣮૷ϨϏϡʔ

    View full-size slide


  29. ։ൃͷྲྀΕ(࣮૷)
    5ZQF4DSJQUͰ։ൃ ΠϕϯτΛܕఆٛ

    ઃܭɾ࣮૷ͷྲྀΕ
    ઃܭ
    ઃܭϨϏϡʔ
    ࣮૷
    ࣮૷ϨϏϡʔ

    View full-size slide

  30. 5ZQF4DSJQUͰ։ൃ ΠϕϯτͷॲཧΛ࣮૷


    ։ൃͷྲྀΕ(࣮૷)
    ઃܭɾ࣮૷ͷྲྀΕ
    ઃܭ
    ઃܭϨϏϡʔ
    ࣮૷
    ࣮૷ϨϏϡʔ

    View full-size slide


  31. ։ൃͷྲྀΕ(࣮૷)
    wϢχοτςετ
    w&&ςετ
    AWS Lambda
    Amazon API
    Gateway
    Amazon
    DynamoDB
    AWS Lambda
    Amazon API
    Gateway
    Amazon
    DynamoDB
    ઃܭɾ࣮૷ͷྲྀΕ
    ઃܭ
    ઃܭϨϏϡʔ
    ࣮૷
    ࣮૷ϨϏϡʔ

    View full-size slide


  32. ։ൃͷྲྀΕ(࣮૷)
    w&&ςετ
    &&ςετ͸ϞοΫͰͳ͘؀ڥ͝ͱͷ
    "84ΞΧ΢ϯτͰ"84αʔϏεؚΊͯߏஙɾ࣮ߦ
    ɹɹ AWS Cloud ɹɹ AWS Cloud ɹɹ AWS Cloud
    ։ൃ༻؀ڥ
    εςʔδϯά
    ؀ڥ
    ຊ൪؀ڥ
    ઃܭɾ࣮૷ͷྲྀΕ
    ઃܭ
    ઃܭϨϏϡʔ
    ࣮૷
    ࣮૷ϨϏϡʔ

    View full-size slide


  33. ։ൃͷྲྀΕ(࣮૷)
    ɹɹ AWS Cloud ɹɹ AWS Cloud ɹɹ AWS Cloud
    ։ൃ༻؀ڥ
    εςʔδϯά
    ؀ڥ
    ຊ൪؀ڥ
    AWS CDK
    ಉҰઃఆͰσϓϩΠ
    ઃܭɾ࣮૷ͷྲྀΕ
    ઃܭ
    ઃܭϨϏϡʔ
    ࣮૷
    ࣮૷ϨϏϡʔ

    View full-size slide


  34. ઃܭɾ࣮૷ͷྲྀΕ
    ઃܭ
    ઃܭϨϏϡʔ
    ࣮૷
    ࣮૷ϨϏϡʔ
    (JU)VCͰ1VMM3FRVFTUͰ૬ޓʹϨϏϡʔ
    ։ൃͷྲྀΕ(࣮૷ϨϏϡʔ)

    View full-size slide

  35. ·ͱΊ
    w αʔόʔϨεͳγεςϜͱ͸Կͳͷ͔ʁ 'BB4

    ɹ։ൃऀ͕։ൃ͚ͩʹूதͰ͖ΔͨΊͷํ๏
    ɹΠϕϯτۦಈͰαʔϏεΛૄ݁߹ʹ࡞ΕΔ

    View full-size slide

  36. ·ͱΊ
    w αʔόʔϨεͰͷ։ൃͷྲྀΕ
    ɹΫϦʔϯΞʔΩςΫνϟͰઃܭɾ࣮૷ɾςετ
    ɹϚϧνΞΧ΢ϯτͰͷ&&ςετ࣮ߦ

    View full-size slide


  37. ͝ࢹௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ɻ
    νϟϯωϧొ࿥͓ئ͍͠·͢ɻ
    Ϋϥεϝιουגࣜձࣾ ެࣜYoutubeνϟϯωϧ

    View full-size slide