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

AWSサービスで実現するバッチ実行環境のコンテナ/サーバレス化/ Container service of batch execution environment realized by AWS service

AWSサービスで実現するバッチ実行環境のコンテナ/サーバレス化/ Container service of batch execution environment realized by AWS service

AWS DevDay Tokyo 2019での発表資料です

Shoichiro Nagai(shnagai)

October 04, 2019
Tweet

More Decks by Shoichiro Nagai(shnagai)

Other Decks in Technology

Transcript

  1. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    T O K Y O
    2 0 1 9 . 1 0 . 0 3 - 0 4
    AWSαʔϏεͰ࣮ݱ͢Δ
    όον࣮ߦ؀ڥͷίϯςφ/αʔόϨεԽ
    ӬҪ উҰ࿠
    ίωώτגࣜձࣾ
    © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    T O K Y O
    2 0 1 9 . 1 0 . 0 3 - 0 4
    AWSαʔϏεͰ࣮ݱ͢Δ
    όον࣮ߦ؀ڥͷίϯςφ/αʔόϨεԽ
    ӬҪ উҰ࿠
    ίωώτגࣜձࣾ
    G - 5

    View full-size slide

  2. ࣗݾ঺հ
    ӬҪউҰ࿠
    ओͳ׆ಈ

    +BQBO$POUBJOFS%BZTW "844VNNJU

    ͸͡Ίͯͷ1)1ϓϩϑΣογϣφϧ։ൃ ೔ܦ4:45&.4 ϚϚϦ͕࣮ફ͢Δɹίϯ
    ςφҠߦͷਖ਼߈๏

    ίωώτΤϯδχΞϒϩάIUUQTUFDIDPOOFIJUPDPNBSDIJWFBVUIPSOBHBJT
    ίωώτגࣜձࣾɹΤϯδχΞ

    Πϯϑϥ΢ΣϒΦϖϨʔγϣϯػցֶश ࠷ۙ

    !TIOBHBJ

    View full-size slide

  3. "CPVUϚϚϦ
    ࣗΒબͿͨΊͷʮ஌ࣝʯΛఏڙ͢Δ
    Ո଒ʹͱͬͯΑΓྑ͍બ୒Λ͢ΔͨΊʹඞཁͳ͔֬ͳ৘ใʹج͍ͮͨʮ஌ࣝʯΛఏڙ͠·͢
    ҰาΛ౿Έग़͢ʮࣗ৴ʯΛҭΉ
    ஌ࣝͱͱ΋ʹɺҰาΛ౿Έग़͢ݪಈྗͱͳΔʮࣗ৴ʯΛҭΉͨΊͷ৔Λఏڙ͠·͢
    ߦಈͨ͠ϚϚΛड͚ೖΕΔʮࣾձʯΛͭ͘Δ
    ϚϚͷ੠Λࣾձʹൃ৴͠ɺϚϚͷબ୒Λड͚ೖΕΔ౔৕ͷ͋ΔࣾձΛͭ͘Γ·͢
    ʮͭͷ੾ΓޱʯͰϚϚΛࢧ͑·͢
    Ո଒ͷ଩औΓ໾Ͱ͋ΔzϚϚzΛࢧ͑Δ͜ͱΛ௨ͯ͠ɺՈ଒͕΋ͬͱ޾ͤʹաͤ͝ΔੈͷதΛͭ͘Γ·͢ɻ
    ϚϚϦ͕໿ଋ͢Δ͜ͱ
    ϚϚϦ͸ɺʮϚϚͷҰาΛࢧ͑ΔʯϒϥϯυͰ͢

    View full-size slide



  4. ˞ʮӾཡ਺ʯʮར༻ऀ਺ʯ͸ϝσΟΞͱΞϓϦͷ߹ܭ஋ʢ೥݄݄ͷฏۉ஋ʣ
    ˞ʮϚϚ޲͚/PΞϓϦʯ͸೥݄Πϯςʔδௐ΂ɹௐࠪର৅ɿ೛৷தʙ̎ࡀ̌ϲ݄ͷࢠڙΛ࣋ͭঁੑ O
    Λநग़
    ˞*OTUBHSBNͷϑΥϩϫʔ਺ɺ'BDFCPPLͷ͍͍Ͷ਺ɺ-*/&ͷͱ΋ͩͪ਺ͷ߹ܭ஋ ೥݄࣌఺

    ϚϚϦ ΞϓϦɾ8FC
    4/4 *OTUBHSBNɾ-*/&ɾ'BDFCPPL

    هࣄ
    ϚϚಉ࢜Ͱ೰ΈΛ૬ஊ͠߹͏2"ίϛϡχςΟΛத৺ʹ
    ϢʔβʔΛ֦େ͍ͯ͠·͢
    ʮϚϚϦʯͰϢʔβʔಉ͕࢜
    ͲΜͲΜܨ͕͍ͬͯ·͢
    ϚϚͷੜ׆ʹ໾ཱͭهࣄΛ
    ෯޿͍δϟϯϧͰ഑৴͍ͯ͠·͢
    ϚϚ޲͚/P̍ΞϓϦʹબग़
    ਓͷϚϚ͕બͿʮݱࡏ࢖͍ͬͯΔΞϓϦʯʹͯɺ
    ߲໨ ଞͷϚϚʹΦεεϝ͍ͨ͠ɺೝ஌౓ɺ

    ར༻཰ɺརศੑɺ޷ײ౓
    Ͱ̍ҐΛ֫ಘ͠·ͨ͠
    هࣄ਺
    6,000 هࣄҎ্
    ྦྷܭϑΝϯ਺
    ໿
    91 ສਓ
    ˞
    ݄ؒӾཡ਺
    ໿
    1.5ԯճ
    ˞
    ݄ؒར༻ऀ਺
    ໿
    650ສਓ
    ˞
    ˞
    l೰ΈzͱzڞײzΛ࣠ʹϚϚʹدΓఴ͍
    ΞϓϦɾ8FCɾ4/4ͱଟ֯తʹαʔϏεΛల։͍ͯ͠·͢
    "CPVUϚϚϦ

    View full-size slide

  5. 0
    450,000
    900,000
    1,350,000
    1,800,000
    2014/4
    2014/5
    2014/6
    2014/7
    2014/8
    2014/9
    2014/10
    2014/11
    2014/12
    2015/1
    2015/2
    2015/3
    2015/4
    2015/5
    2015/6
    2015/7
    2015/8
    2015/9
    2015/10
    2015/11
    2015/12
    2016/1
    2016/2
    2016/3
    2016/4
    2016/5
    2016/6
    2016/7
    2016/8
    2016/9
    2016/10
    2016/11
    2016/12
    2017/1
    2017/2
    2017/3
    2017/4
    2017/5
    2017/6
    2017/7
    2017/8
    2017/9
    2017/10
    2017/11
    2017/12
    2018/1
    2018/2
    2018/3
    2018/4
    2018/5
    2018/6
    2018/7
    2018/8


    ݄ؒ౤ߘ਺
    ໿
    150ສ݅
    िʹ೔Ҏ্ىಈ͢Δ
    ΞΫςΟϒϢʔβʔ
    ໿
    50
    ਓʹਓ
    57$.
    ์ө
    ΞϓϦ૯%-਺ສ
    ਓʹਓ
    ਓʹਓ
    ਓʹਓ
    ਓʹਓ
    ˞
    ˞ʮϚϚϦʯ಺ͷग़࢈༧ఆ೔Λઃఆͨ͠Ϣʔβʔ਺ͱɺްੜ࿑ಇলൃදʮਓޱಈଶ౷ܭʯͷग़ੜ਺͔Βࢉग़

    ˞िʹճҎ্ىಈ͢ΔϢʔβʔ
    ˞
    ೥ʹग़࢈ͨ͠ϚϚͷʮਓʹਓʯ͕ϚϚϦΛར༻த
    ೔ຊ࠷େڃن໛ΛތΔϒϥϯυ΁ͱ੒௕͍ͯ͠·͢
    ˞
    ೔ຊ࠷େڃن໛ΛތΔϒϥϯυ΁

    View full-size slide

  6. w ϗετܕόον࣮ߦ؀ڥͷ՝୊ΛৼΓฦΔ
    w όονॲཧͷίϯςφԽ

    ʲࣄྫʳ

    εέδϡʔϧܥόονॲཧΛίϯςφԽͯ͠&$44DIFEVMF5BTLʹҠߦ
    w όονॲཧͷίϯςφαʔόϨεԽ

    ʲࣄྫʳ

    ػցֶशͷֶशσʔλલॲཧϑϩʔ (MVF'BSHBUF
    Λ

    4UFQ'VODUJPOTͰඪ४Խ
    ΞδΣϯμ

    View full-size slide

  7. "84Ͱͷόονॲཧύλʔϯʹ͍ͭͯ
    ҰͭͰ΋ؾ͖ͮΛಘͯ΋Β͑Ε͹͏Ε͍͠Ͱ͢

    View full-size slide

  8. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    ϗετܕόον࣮ߦ؀ڥͷ՝୊ΛৼΓฦΔ

    View full-size slide

  9. ϗετܕόοναʔόͷྫ

    View full-size slide

  10. ୆ͷόοναʔό
    αʔϏεAόον: cron(10 0 * * *)
    αʔϏεBόον: cron(20 0 * * *)
    ӡ༻Cόον: cron(30 0 * * *)
    EC2
    1୆ͷEC2Ͱӡ༻
    cronͰεέδϡʔϧ؅ཧ
    ༷ʑͳόονॲཧΛू໿
    େ͖ͳίϯϐϡʔςΟϯάϦιʔε

    View full-size slide

  11. ୆ߏ੒ʹͯ͠৑௕Խ
    αʔϏεAόον: cron(10 0 * * *)
    αʔϏεBόον: cron(20 0 * * *)
    ӡ༻Cόον: cron(30 0 * * *)
    EC2
    αʔϏεAόον: cron(10 0 * * *)
    αʔϏεBόον: cron(20 0 * * *)
    ӡ༻Cόον: cron(30 0 * * *)
    EC2

    View full-size slide

  12. όονຖʹ"DUJWF4UBOECZʹ͢Δ
    αʔϏεAόον: cron(10 0 * * *)
    αʔϏεBόον: cron(20 0 * * *)
    # ӡ༻Cόον: cron(30 0 * * *)
    EC2
    # αʔϏεAόον: cron(10 0 * * *)
    # αʔϏεBόον: cron(20 0 * * *)
    ӡ༻Cόον: cron(30 0 * * *)
    EC2
    αʔϏεܥόοναʔό ӡ༻ܥόοναʔό

    View full-size slide

  13. ୆ࢮΜͩΒखಈͰϑΣΠϧΦʔόʔ
    αʔϏεAόον: cron(10 0 * * *)
    αʔϏεBόον: cron(20 0 * * *)
    # ӡ༻Cόον: cron(30 0 * * *)
    EC2
    αʔϏεAόον: cron(10 0 * * *)
    αʔϏεBόον: cron(20 0 * * *)
    ӡ༻Cόον: cron(30 0 * * *)
    EC2
    αʔϏεܥόοναʔό ӡ༻ܥόοναʔό

    ίϝϯτΞ΢τ
    ֎ͯ͠Activeʹ

    View full-size slide

  14. ෳ਺ͷαʔόʹશ͘ಉ͡มߋΛߦ͏ඞཁ͕͋Δ
    αʔϏεAόον: cron(10 0 * * *)
    αʔϏεBόον: cron(20 0 * * *)
    # ӡ༻Cόον: cron(30 0 * * *)
    EC2
    # αʔϏεAόον: cron(10 0 * * *)
    # αʔϏεBόον: cron(20 0 * * *)
    ӡ༻Cόον: cron(30 0 * * *)
    EC2
    αʔϏεܥόοναʔό ӡ༻ܥόοναʔό
    ΞϓϦέʔγϣϯσϓϩΠ
    ϓϥοτϑΥʔϜͷมߋ

    View full-size slide

  15. ෳ਺ͷαʔόʹશ͘ಉ͡มߋΛߦ͏ඞཁ͕͋Δ
    αʔϏεAόον: cron(10 0 * * *)
    αʔϏεBόον: cron(20 0 * * *)
    # ӡ༻Cόον: cron(30 0 * * *)
    EC2
    # αʔϏεAόον: cron(10 0 * * *)
    # αʔϏεBόον: cron(20 0 * * *)
    ӡ༻Cόον: cron(30 0 * * *)
    EC2
    αʔϏεܥόοναʔό ӡ༻ܥόοναʔό
    ΞϓϦέʔγϣϯσϓϩΠ
    ϓϥοτϑΥʔϜͷมߋ
    όοναʔόʹ͔͔Δӡ༻ෛՙ͸େ͖͍

    View full-size slide

  16. w ϓϥοτϑΥʔϜʹมߋΛՃ͑Δϋʔυϧ͕ߴ͍

    όοναʔόͰಈ͘ଟذʹΘͨΔॲཧ͕໰୊ͳ͘ಈ͘Α͏ʹߟྀ͢Δඞཁ͕͋Δ

    ෳ਺αʔόʹશ͘ಉ͡มߋΛՃ͑Δඞཁ͕͋Δ

    ৗʹԿ͔͠Βͷॲཧ͕ಈ͍͍ͯΔͷͰϩʔϧόοΫ͕೉͍͠
    w ӡ༻ෛՙ͕ߴ͍

    όοναʔόͷΠϯϑϥઃఆมߋ

    DSPOొ࿥ͷΦϖϨʔγϣϯ΍εςʔδϯάͰͷςετ࣮ߦ

    ো֐࣌ͷ੾Γ෼͚ όονݸผͷ໰୊ αʔόϦιʔε κϯϏϓϩηε͕ɺɺɺ

    ϗετܕόονॲཧͷ՝୊

    View full-size slide

  17. w ϓϥοτϑΥʔϜʹมߋΛՃ͑Δϋʔυϧ͕ߴ͍

    όοναʔόͰಈ͘ଟذʹΘͨΔॲཧ͕໰୊ͳ͘ಈ͘Α͏ʹߟྀ͢Δඞཁ͕͋Δ

    ෳ਺αʔόʹશ͘ಉ͡มߋΛՃ͑Δඞཁ͕͋Δ

    ৗʹԿ͔͠Βͷॲཧ͕ಈ͍͍ͯΔͷͰϩʔϧόοΫ͕೉͍͠
    w ӡ༻ෛՙ͕ߴ͍

    όοναʔόͷΠϯϑϥઃఆมߋ

    DSPOొ࿥ͷΦϖϨʔγϣϯ΍εςʔδϯάͰͷςετ࣮ߦ

    ো֐࣌ͷ੾Γ෼͚ όονݸผͷ໰୊ αʔόϦιʔε κϯϏϓϩηε͕ɺɺɺ

    ϗετܕόονॲཧͷ՝୊
    όονॲཧΛίϯςφԽ͢Δ͜ͱͰղܾ

    View full-size slide

  18. w ϦιʔεΛڞ༗͢Δ؍఺͔Β៛ີͳεέδϡʔϧ؅ཧ͕ඞཁ

    ݶΒΕͨϚγϯϦιʔεΛڞ༗͢ΔͷͰॏ͍ॲཧ͕ॏͳΒͳ͍Α͏ߟྀ

    ៛ີͳεέδϡʔϧ؅ཧ όον؅ཧ୆ா

    δϣϒεέδϡʔϥͷಋೖˠδϣϒεέδϡʔϥࣗମͷӡ༻͕ൃੜ

    εέδϡʔϦϯάͷܦҢ౳͸Ұ෦ʹଐਓԽ͢Δ͜ͱ΋͓͖͕ͪ
    w අ༻͕ߴ͘ͳΓ͕ͪ

    Ұ൪ϚγϯϦιʔεΛ࢖͏ॲཧΛϕʔεʹΠϯελϯεΛܾఆ͠ৗ࣌ىಈ

    ৑௕Խ΍໾ׂຖόοναʔόΛ࡞Δͱߋʹඅ༻͕ߴ͘ͳΔ

    Ϋϥ΢υͷ৔߹͸ɺඞཁͳ࣌ʹ࢖ͬͨ෼͚ͩͷඅ༻Λ෷͏ܗʹ͍ͨ͠
    ϗετܕόονॲཧͷ՝୊

    View full-size slide

  19. w ϦιʔεΛڞ༗͢Δ؍఺͔Β៛ີͳεέδϡʔϧ؅ཧ͕ඞཁ

    ݶΒΕͨϚγϯϦιʔεΛڞ༗͢ΔͷͰॏ͍ॲཧ͕ॏͳΒͳ͍Α͏ߟྀ

    ៛ີͳεέδϡʔϧ؅ཧ όον؅ཧ୆ா

    δϣϒεέδϡʔϥͷಋೖˠδϣϒεέδϡʔϥࣗମͷӡ༻͕ൃੜ

    εέδϡʔϦϯάͷܦҢ౳͸Ұ෦ʹଐਓԽ͢Δ͜ͱ΋͓͖͕ͪ
    w අ༻͕ߴ͘ͳΓ͕ͪ

    Ұ൪ϚγϯϦιʔεΛ࢖͏ॲཧΛϕʔεʹΠϯελϯεΛܾఆ͠ৗ࣌ىಈ

    ৑௕Խ΍໾ׂຖόοναʔόΛ࡞Δͱߋʹඅ༻͕ߴ͘ͳΔ

    Ϋϥ΢υͷ৔߹͸ɺඞཁͳ࣌ʹ࢖ͬͨ෼͚ͩͷඅ༻Λ෷͏ܗʹ͍ͨ͠
    ϗετܕόονॲཧͷ՝୊
    όονॲཧΛαʔόϨεԽ͢Δ͜ͱͰղܾ

    View full-size slide

  20. ͜Ε͔ΒͭͷࣄྫΛϕʔεʹ

    View full-size slide

  21. όον࣮ߦ؀ڥΛίϯςφɾαʔόϨεԽ͢Δ
    ϝϦοτʹ͍͓ͭͯ࿩͠·͢

    View full-size slide

  22. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    ʲࣄྫ1ʳ
    εέδϡʔϧܥόονॲཧΛίϯςφԽͯ͠
    ECS ScheduleTaskʹҠߦ

    View full-size slide

  23. w αʔϏεӡ༻Ͱ࢖͏εέδϡʔϧϕʔεόονΛίϯςφԽ
    w ͦΕʹΑΓղܾͨ͠՝୊ͱߏ੒ʹ͍ͭͯ
    ͜ͷࣄྫͰ͓࿩͢Δ͜ͱ

    View full-size slide

  24. w εέδϡʔϧܥͷόονॲཧ

    ࣄલʹఆٛͨ࣌ؒ͠ʹਖ਼֬ʹಈ͘͜ͱ͕ظ଴͞ΕΔ

    ಛఆͷαΠΫϧ ෼ຖ
    Ͱಈ͘͜ͱ͕ظ଴͞ΕΔ
    w όοναʔόͷDSPOͰεέδϡʔϧ؅ཧ

    όοναʔόʹΞϓϦέʔγϣϯΛσϓϩΠ

    DSPOUBCͰεέδϡʔϧ؅ཧ
    ѻ͏όονॲཧ

    View full-size slide

  25. w όονΛ࢘ΔDSPOαʔόͷӡ༻Λ΍Ί͍ͨ

    શαʔϏεڞ௨ͷ&$

    ಈ͍͍ͯΔͷ͸ɺ࣌ؒ௨Γʹಈ͘͜ͱ͕ظ଴͞ΕΔεέδϡʔϧܥόον
    w ΞϓϦέʔγϣϯ͸ίϯςφԽࡁͰͦͷࢿ࢈Λ׆͔͍ͨ͠

    ϕʔείʔυ͸XFCͱڞ௨ͳͷͰίϯςφԽࡁ

    "84Λج൫ͱͯ͠࢖͍ͬͯΔͷͰɺ"84ͰίϯςφͷόονॲཧΛ࣮ݱ͍ͨ͠

    ࣾ಺Ͱ͸%PDLFSͰͷ։ൃ͕ೃછΜͰ͖͍ͯͨ

    ʲίϯςφಋೖͷਖ਼߈๏ʳ

    IUUQTTQFBLFSEFDLDPNTIPJDIJSPODPOGSPOUBUJPOPGDPOUBJOFSUSBOTGFS
    ίωώτͷόοναʔόʹର͢Δ՝୊

    View full-size slide

  26. w ଐਓԽ͠΍͘͢ϨΨγʔͳӡ༻͕࢒͍ͬͯΔ

    ৽نొ࿥࣌͸ɺDSPOUBCͰखಈεέδϡʔϧొ࿥

    ϦϦʔεલͷςετ࣮ߦ͸44)ܦ༝Ͱόοναʔό͔Βಈ࡞֬ೝ

    DSPOUBCʹొ࿥͢Δͷ͸Ұ෦ͷΤϯδχΞͷΈ Ұ෦͔͠શ༰Λ஌Βͳ͍ঢ়ଶ

    w ΞϓϦέʔγϣϯϦϦʔεҎ֎͸ۃྗมߋΛՃ͑ͳ͍Α͏ʹ

    γϯάϧϙΠϯτͳͷͰࢭ·ΔͱαʔϏεʹӨڹେ

    ग़དྷΔ͚ͩมߋ͸Ճ͑ͣʹӡ༻͍ͨ͠ͱ͍͏ҙ͕ࣝಇ͘
    ίωώτͷόοναʔόʹର͢Δ՝୊

    View full-size slide

  27. ͜ΕΒͷ՝୊Λղܾ͢ΔͨΊʹ
    ίϯςφۦಈͳόον࣮ߦ؀ڥΛߏங

    View full-size slide

  28. όονॲཧΛίϯςφԽ͢Δ͜ͱͰ
    ͲͷΑ͏ͳϝϦοτ͕ಘΒΕΔͷ͔ʁ

    View full-size slide

  29. ᶃՄൖੑͷߴ͞Λ׆͔͢͜ͱͰϓϥοτϑΥʔϜมߋͷෑډ͕Լ͕Δ
    εςʔδϯά؀ڥ ϓϩμΫγϣϯ؀ڥ
    ։ൃ؀ڥ
    ΞϓϦέʔγϣϯ ΞϓϦέʔγϣϯ
    ΞϓϦέʔγϣϯ
    ΞϓϦέʔγϣϯ
    όοναʔό
    ࣮ߦ؀ڥ
    όοναʔό
    ࣮ߦ؀ڥ
    ΞϓϦέʔγϣϯ
    ࣮ߦ؀ڥ
    ΞϓϦέʔγϣϯ
    ࣮ߦ؀ڥ
    ઃఆมߋ ઃఆมߋ
    σϓϩΠ σϓϩΠ
    σϓϩΠ
    σϓϩΠ
    ઃఆมߋ͸ίϯςφ಺Ͱ׬݁

    View full-size slide

  30. ᶃՄൖੑͷߴ͞Λ׆͔͢͜ͱͰϓϥοτϑΥʔϜมߋͷෑډ͕Լ͕Δ
    εςʔδϯά؀ڥ ϓϩμΫγϣϯ؀ڥ
    ։ൃ؀ڥ
    ΞϓϦέʔγϣϯ ΞϓϦέʔγϣϯ
    ΞϓϦέʔγϣϯ
    ΞϓϦέʔγϣϯ
    όοναʔό
    ࣮ߦ؀ڥ
    όοναʔό
    ࣮ߦ؀ڥ
    ΞϓϦέʔγϣϯ
    ࣮ߦ؀ڥ
    ΞϓϦέʔγϣϯ
    ࣮ߦ؀ڥ
    ઃఆมߋ ઃఆมߋ
    σϓϩΠ σϓϩΠ
    σϓϩΠ
    σϓϩΠ
    ઃఆมߋ͸ίϯςφ಺Ͱ׬݁
    σϓϩΠཻ౓͕ΞϓϦέʔγϣϯίʔυ͔Β
    ΞϓϦέʔγϣϯ࣮ߦج൫ͦͷ΋ͷʹมΘΔ

    View full-size slide

  31. w ઐ༻ͷόοναʔό͸ෆཁʹ

    ͲͷόονΛͲͷϗετͰಈ͔͔͢͸ΦʔέετϨʔγϣϯπʔϧʹ͓೚ͤ

    όονॲཧίϯςφϓϩηεͷ࣮ߦʹूதग़དྷΔ

    DSPOUBCӡ༻͔Βͷଔۀ
    w ଐਓԽΛഉআग़དྷΔ

    ϓϥοτϑΥʔϜͷఆٛ͸%PDLFSGJMFͰίʔυԽ

    όον࣮ߦͷఆٛ΋ίʔυԽ͢Δ͜ͱͰ௨ৗͷ։ൃϑϩʔͰόονӡ༻͕ग़དྷΔ
    ᶄӡ༻ෛՙ͕Լ͕Δ

    View full-size slide

  32. "84ͰͲͷΑ͏ʹ
    ίϯςφج൫ͷόον࣮ߦ؀ڥΛ࡞Δ͔

    View full-size slide

  33. w ίϯςφPODSPO -BNCEB "84#BUDI౳Λൺֱݕ౼

    ౰࣌ͷΞʔΩςΫνϟબఆ࣌ͷQSPTDPOT͸ͪ͜Βʹ

    ʲ"NB[PO&$44DIFEVMF5BTLͰ࣮ݱ͢ΔεϚʔτͳ%PDLFSϕʔεͷόον࣮ߦ؀ڥʳ

    IUUQTUFDIDPOOFIJUPDPNFOUSZ

    w શͯͷཁ݅Λຬͨͨ͠ͷͰ&$44DIFEVMF5BTLͷ࠾༻Λܾఆ

    ͜Ε͔Β΍ΔͳΒཁ݅ʹΑͬͯ͸"84#BUDIͰ΋͍͍ͷ͔΋ େن໛σʔλ౳

    ౰࣌͸εέδϡʔϧىಈʹରԠ͍ͯ͠ͳ͔ͬͨ
    w ಋೖ౰ॳ͸ଞࣾࣄྫ͕͋·Γͳ͍ͱ͍͏ෆ҆͸͋ͬͨ

    4"ʹ૬ஊͯ͠ΞʔΩςΫνϟͷϨϏϡʔΛड͚Δ

    &$4ͷӡ༻࣮੷͸͋Γ஌ݟ͕͋ͬͨͷͰಋೖΛܾఆ
    ٕज़બఆ

    View full-size slide

  34. w &$4͸"84͕ఏڙ͢Δίϯςφ؅ཧͷϚωʔδυαʔϏε

    ίϯςφΦʔέετϨʔγϣϯπʔϧ
    w &$44DIFEVMF5BTL͸λεΫ ίϯςφ
    ͷ࣮ߦΛεέδϡʔ
    ϧ؅ཧͯ͘͠ΕΔػೳ

    $MPVE8BUDI&WFOUͱ࿈ܞ
    &$44DIFEVMF5BTLͱ͸
    Event 

    (time-based)

    View full-size slide

  35. ΞʔΩςΫνϟ
    ECR
    ECS ScheduleTask
    Task
    CloudWatch
    Event 

    (time-based)
    Aόον: cron(10 0 * * ? *)
    Bόον: cron(20 0 * * ? *)
    Cόον: cron(30 0 * * ? *)
    Tag: Release
    Task
    Task
    Aόον
    Bόον
    Cόον
    pull
    pull
    pull
    EC2
    EC2Λ৑௕ߏ੒ʹ͠SPOFճආ
    ECSλεΫ഑ஔઓུʹଇΓɺόϥ
    ϯεΑ͘λεΫ͸ىಈ͞ΕΔ

    View full-size slide

  36. &$44DIFEVMF5BTLͰͷ
    όον࣮ߦͷྲྀΕΛݟͯΈ·͠ΐ͏

    View full-size slide

  37. όον࣮ߦͷྲྀΕ +45

    ECR
    ECS ScheduleTask
    Task
    CloudWatch
    Event 

    (time-based)
    Aόον: cron(10 0 * * ? *)
    Bόον: cron(20 0 * * ? *)
    Cόον: cron(30 0 * * ? *)
    Tag: Release
    Aόον
    pull
    EC2

    View full-size slide

  38. όον࣮ߦͷྲྀΕ +45

    ECR
    ECS ScheduleTask
    Task
    CloudWatch
    Event 

    (time-based)
    Aόον: cron(10 0 * * ? *)
    Bόον: cron(20 0 * * ? *)
    Cόον: cron(30 0 * * ? *)
    Tag: Release
    Task
    Aόον
    Bόον
    pull
    EC2
    Bόονىಈ࣌͸ɺ
    Aόονىಈ࣌ʹग़དྷͨEC2্ͷ
    DockerϨΠϠΩϟογϡ͕ޮ͘ͷ
    Ͱߴ଎ىಈ

    View full-size slide

  39. +45
    ʹຊ൪σϓϩΠൃੜ

    View full-size slide

  40. Cόον͸ɺσϓϩΠ͞Εͨ৽͠
    ͍DockerΠϝʔδͰόονΛىಈ
    σϓϩΠ࣌ʹىಈ͍ͯͨ͠Bόο
    ν͸ɺӨڹͳ͘ॲཧΛଓ͚Δ
    όον࣮ߦͷྲྀΕ +45

    ECR
    ECS
    CloudWatch
    Event 

    (time-based)
    Aόον: cron(10 0 * * ? *)
    Bόον: cron(20 0 * * ? *)
    Cόον: cron(30 0 * * ? *)
    Tag: Release
    Task
    Task
    Bόον
    Cόον
    pull (new
    image)
    EC2

    View full-size slide

  41. w DSPOه๏Ͱεέδϡʔϧఆ͕ٛग़དྷΔͷͰΘ͔Γ΍͍͢

    $MPVE8BUDI&WFOUTͷDSPOࣜͷಛ௃

    ೥ͱ͍͏֓೦͕͋ΓϑΟʔϧυ

    λΠϜκʔϯ͸65$

    ຖ೔ʹىಈ͢Δ৔߹
    &$44DIFEVMF5BTLͷϝϦοτ

    View full-size slide

  42. w طଘͷ%PDLFSΠϝʔδΛࢿ࢈ͱͯ͠࢖͑Δ

    XFCͱಉ͡ίʔυϕʔεͰόονΛಈ͔͢৔߹͸DNE۟ͷॻ׵͚͑ͩͰ0,
    &$44DIFEVMF5BTLͷϝϦοτ
    ECR
    ECS
    CMD: /usr/sbin/httpd -DFOREGROUND
    CMD: bin/cake hoge_batch
    Web
    Batch
    Docker Pull

    View full-size slide

  43. w &$όοΫΤϯυߏ੒ͩͱίϯςφͷىಈ͕ૣ͍

    ىಈʹ͔͔Δ࣌ؒ͸਺ඵͳͷͰεέδϡʔϧىಈͷཁ݅ΛຬͨͤΔ

    %PDLFS࣮ߦϗετ͕ݻఆ͞ΕΔͷͰ%PDLFSͷϨΠϠΩϟογϡ͕ޮ͘

    'BSHBUF͸ϗετΛݻఆग़དྷͳ͍ͷͰϨΠϠΩϟογϡ͕ޮ͔ͳ͍&/*ͷ෇͚ସ
    ͑΋͋Γىಈʹ෼ऑ͔͔Δ લ͸෼΄Ͳ͔͔ͬͯͨͷͰૣ͘͸ͳ͍ͬͯΔ

    &$44DIFEVMF5BTLͷϝϦοτ

    View full-size slide

  44. w σϓϩΠ࣌ʹ࣮ߦதόον΁ͷߟྀ͕ෆཁ

    ىಈ࣌ʹ%PDLFSΠϝʔδΛQVMM͢ΔΞʔΩςΫνϟ

    ىಈதͷίϯςφ͸QVMMͨ͠ஈ֊ͷΞϓϦέʔγϣϯΛ࢖͏ͷͰӨڹΛड͚ͳ͍
    w $MPVE8BUDI-PHTͰ؆୯ʹϩά͕ݟΕΔ

    ඪ४ग़ྗΛ$MPVE8BUDI-PHT΁ग़ྗ

    "84ίϯιʔϧ͔ΒΞϓϦέʔγϣϯͷग़ྗΛ؆୯ʹݟΕΔ

    Θ͟Θ͟44)Λ͠ͳͯ͘΋0,
    &$44DIFEVMF5BTLͷϝϦοτ

    View full-size slide

  45. w (6*ͰόονҰཡ͕ݟΕΔ

    ίϝϯτ΋͚ͭΕΔͷͰόον؅ཧ୆ாͷ୅༻ʹͳΔ

    &$44DIFEVMF5BTLͷϝϦοτ

    View full-size slide

  46. w όοναʔόͷӡ༻͕ෆཁʹͳΔ

    ίϯςφͱ&$ͷ؅ཧ͸&$4͕ߦͬͯ͘ΕΔ

    &$ΛNVMUJ";Ͱӡ༻͢Δ͜ͱͰ410'ղফˠͲ͜Ͱىಈ͢Δ͔΋&$4͕Α͠ͳʹ
    w %PDLFSϨΠϠΩϟογϡΛ࢖͏͜ͱͰεέδϡʔϧ௨Γͷ

    όον࣮ߦ͕Մೳ
    w ىಈλΠϓͱͯ͠'BSHBUFΛ࢖͏͜ͱ΋ग़དྷΔ

    αʔόϨεͷϝϦοτ΋ڗडՄೳ
    &$44DIFEVMF5BTL͸Կ͕͏Ε͍͠ͷ͔

    View full-size slide

  47. w λεΫͷ࣮ߦཤྺ͕࣌ܥྻͰݟΕͳ͍

    ࣌ؒ࣠ͰͲͷλεΫ͕ಈ͍͍ͯͨͷ͔σόοά͢Δͷ͕গ͠໘౗ɻɻ
    վળͯ͠΄͍͠ϙΠϯτ

    View full-size slide

  48. w Ϋϥελ

    λεΫΛಈ͔͢ϗετ &$
    ͷू߹ମ

    'BSHBUFͷ࣌͸ɺͨͩͷശ
    w %PDLFSΠϝʔδ &$3

    w λεΫఆٛ

    %PDLFSίϯςφͷىಈύϥϝʔλͷఆٛ
    w Ϋϥελ಺ͷ4DIFEVMF5BTL

    $MPVE8BUDI&WFOUTͱཪͰ࿈ܞ͍ͯ͠Δ
    &$44DIFEVMF5BTLͰόονΛ૊ΉͨΊͷཁૉ

    View full-size slide

  49. w Ϋϥελ

    λεΫΛಈ͔͢ϗετ &$
    ͷू߹ମ

    'BSHBUFͷ࣌͸ɺͨͩͷശ
    w %PDLFSΠϝʔδ &$3

    w λεΫఆٛ

    %PDLFSίϯςφͷىಈύϥϝʔλͷఆٛ
    w Ϋϥελ಺ͷ4DIFEVMF5BTL

    $MPVE8BUDI&WFOUTͱཪͰ࿈ܞ͍ͯ͠Δ
    λεΫఆٛΛ5FSSBGPSNͰ؅ཧ
    λεΫఆٛΛTerraformͰ؅ཧ

    View full-size slide

  50. w όοναʔόͷӡ༻͕ଐਓԽ

    ৽نొ࿥࣌͸ɺDSPOUBCͰखಈεέδϡʔϧొ࿥

    ϦϦʔεલͷςετ࣮ߦ͸44)ܦ༝Ͱόοναʔό͔Βಈ࡞֬ೝ

    DSPOUBCʹొ࿥͢Δͷ͸Ұ෦ͷΤϯδχΞͷΈ Ұ෦͔͠શ༰Λ஌Βͳ͍ঢ়ଶ

    w ΞϓϦέʔγϣϯϦϦʔεҎ֎͸ۃྗมߋΛՃ͑ͳ͍Α͏ʹ

    γϯάϧϙΠϯτͳͷͰࢭ·ΔͱαʔϏεʹӨڹେ

    ग़དྷΔ͚ͩมߋ͸Ճ͑ͣʹӡ༻͍ͨ͠ͱ͍͏ҙ͕ࣝಇ͘
    όοναʔόͷଐਓԽղফ΁
    TerraformͰ؅ཧ͢Δ͜ͱͰղܾ

    View full-size slide

  51. w ։ൃऀ͕όονͷొ࿥มߋ࡟আΛ1VMM3FRVFTUܗࣜͰߦ͏

    5FSSBGPSNͷఆٛΛݟΕ͹ͲΜͳόον͕͋Δͷ͔ཧղͰ͖Δ

    DSPOUBCΛ୭͕ొ࿥νΣοΫ͢Δͷ͔໰୊Λղܾ
    w 5FSSBGPSNͷ࣮ߦ΋։ൃऀ͕ߦ͏

    UGTUBUFϑΝΠϧΛ4Ͱڞ௨؅ཧ͢Δ͜ͱͰखݩͰ࣮ߦͰ͖ΔΑ͏ʹ

    0QTνʔϜ΁ͷόονొ࿥ґཔ΋ෆཁʹ
    λεΫఆٛΛ5FSSBGPSNͰ؅ཧ

    View full-size slide

  52. 5FSSBGPSNͷఆٛ
    Descriptionॻ͘͜ͱͰͻͱ໨ͰΘ͔Δ
    ஋͸variables.tfͰ؅ཧ͢Δ͜ͱͰɺ
    ؀ڥࠩ෼Λٵऩ

    View full-size slide

  53. 13ϕʔεͰͷόονొ࿥
    εςʔδϯάͰͷ
    dry-run݁ՌΛఴ͑ͯPR࡞੒

    View full-size slide

  54. όονͷ։ൃϑϩʔ
    ίϯςφϕʔεͰ
    όονॲཧΛϩʔΧϧ։ൃ
    APͷϦϙδτϦͰ
    όονॲཧͷPR
    terraformͷϦϙδτϦͰ
    όονॲཧఆٛͷPR
    terraformܦ༝Ͱ
    ຊ൪ʹλεΫఆٛొ࿥
    εςʔδϯάͷECSͰ
    Ұ౓खಈ࣮ߦ͠ಈ࡞֬ೝ
    terraformܦ༝Ͱ
    εςʔδϯάʹλεΫఆٛొ࿥
    ϓϥοτϑΥʔϜมߋ͸ίϯςφͰ׬݁
    DockerͷՄൖੑͷߴ͞Ͱͦͷ··ผ؀ڥ΁

    View full-size slide

  55. όονͷ։ൃϑϩʔ
    ίϯςφϕʔεͰ
    όονॲཧΛϩʔΧϧ։ൃ
    APͷϦϙδτϦͰ
    όονॲཧͷPR
    terraformͷϦϙδτϦͰ
    όονॲཧఆٛͷPR
    terraformܦ༝Ͱ
    ຊ൪ʹλεΫఆٛొ࿥
    εςʔδϯάͷECSͰ
    Ұ౓खಈ࣮ߦ͠ಈ࡞֬ೝ
    terraformܦ༝Ͱ
    εςʔδϯάʹλεΫఆٛొ࿥
    ϓϥοτϑΥʔϜมߋ͸ίϯςφͰ׬݁
    DockerͷՄൖੑͷߴ͞Ͱͦͷ··ผ؀ڥ΁
    ։ൃσϓϩΠ֬ೝͱ͍͏։ൃϑϩʔΛ
    ͢΂ͯ։ൃऀͷ੹຿Ͱߦ͏͜ͱ͕Ͱ͖Δ

    View full-size slide

  56. w ίϯςφԽ͍ͯ͠ΔΞϓϦέʔγϣϯʹ͓͍ͯDSPOαʔόӡ
    ༻ͳ͠ʹεέδϡʔϧ࣮ߦ͕Մೳ
    w όοναʔόΛҙࣝͤͣʹɺόονॲཧϓϩηεͷվमͱ
    ͍͏ཻ౓ͰϓϥοτϑΥʔϜ΋ؚΊͯมߋ͕Մೳ
    w ఆٛΛίʔυ؅ཧ͢Δ͜ͱͰ௨ৗͷ։ൃαΠΫϧͰόονొ
    ࿥͕ՄೳʹͳΔ
    &$44DIFEVMF5BTLΛ࢖ͬͨόον࣮ߦ؀ڥͷ·ͱΊ

    View full-size slide

  57. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    ʲࣄྫ2ʳ
    ػցֶशͷֶशσʔλલॲཧϑϩʔ(Glue + Fargate)
    ΛStep FunctionsͰඪ४Խ

    View full-size slide

  58. w ػցֶशͷલॲཧΛαʔόϨεͰ৽نߏங
    w όονॲཧͰٻΊΒΕΔ͜ͱ΋ଟ͍ϫʔΫϑϩʔ΋αʔόϨ
    εʹߏங
    ͜ͷࣄྫͰ͓࿩͢Δ͜ͱ

    View full-size slide

  59. ݄ؒ਺ඦສ݅ͷ౤ߘ͔Βෆద੾ͳίϯςϯπΛݟ͚ͭΔ

    View full-size slide

  60. ݄ؒ਺ඦສ݅ͷ౤ߘ͔Βෆద੾ͳίϯςϯπΛݟ͚ͭΔ
    શͯͷ౤ߘΛ໨ࢹ֬ೝ͢Δ͜ͱ͸
    ग़དྷͳ͍ͷͰػցֶशΛ׆༻

    View full-size slide

  61. ΞʔΩςΫνϟ

    View full-size slide

  62. ΞʔΩςΫνϟ
    Ϟσϧ࡞੒લͷલॲཧʹ͓͚Δ
    όον࣮ߦΞʔΩςΫνϟʹ͍ͭͯઆ໌͠·͢

    View full-size slide

  63. w 3%4ʹอଘ͍ͯ͠Δσʔλ͔ΒֶशσʔλΛநग़

    "84(MVFΛ࢖ͬͨσʔλநग़ॲཧ
    w ֶशσʔλʹର͠ςΩετͷલॲཧͱϕΫτϧԽΛߦ͏

    ίϯςφԽͨ͠όονॲཧΛ'BSHBUFλεΫͰ࣮ߦ
    ͲͷΑ͏ͳॲཧΛߦ͍ͬͯΔ͔

    View full-size slide

  64. w σʔλͷநग़ɺม׵ɺϩʔυΛߦ͏ϚωʔδυαʔϏε
    w ؆୯ͳૢ࡞Ͱ&5-δϣϒΛߏஙՄೳ
    w αʔόϨεͳͷͰӡ༻ෆཁ͔ͭ௿ίετӡ༻͕Մೳ

    &5-ॲཧ͸Ϛγϯύϫʔ͕ٻΊΒΕΔॲཧ͕ଟ͍ͷͰίετޮ཰͸ॏཁ

    %16 %BUB1SPDFTTJOH6OJU
    ୯Ґͷ՝ۚ
    "84(MVFͱ͸

    View full-size slide

  65. w 3%4ʹอଘ͞Ε͍ͯΔσʔλΛநग़ɾՃ޻͠ɺ4ʹอଘ
    w ॲཧͷ಺༁

    σʔλ݅਺ɿ໿ສ݅

    +PC࣮ߦ࣌ؒɿ෼

    ग़ྗUTWσʔλɿ໿(#

    ʲ"84(MVFΛ༻͍ͯ&5-؀ڥΛߏங͓ͨ͠࿩ʢ3%4GPS.Z42-ˠ4ʣʳ

    IUUQTUFDIDPOOFIJUPDPNFOUSZ
    (MVFΛ࢖ͬͨσʔλநग़ॲཧ

    View full-size slide

  66. w (MVFͰநग़ͨ͠࠷৽ͷσʔλΛػցֶशͰ࢖͑Δܗʹม׵
    w 1ZUIPOΛ࢖ͬͨࣗવݴޠॲཧ͕ϝΠϯ

    ಠࣗͷϥϯλΠϜΛ࢖͍͍ͨͷͰίϯςφԽ

    4BHF.BLFSͷϏϧτΠϯίϯςφͰ͸࢖͍͍ͨϥΠϒϥϦ͕ରԠ͍ͯ͠ͳ͔ͬͨ
    w ։ൃϑϩʔ͸ϩʔΧϧ։ൃ13ϕʔε

    NBTUFSϚʔδ࣌ʹ&$3ʹ%PDLFSΠϝʔδΛQVTI
    w αʔόϨεͳͷͰόον࣮ߦ࣌ͷΈ՝͕ۚൃੜ

    ػցֶशͷલॲཧ͸ॏΊͷॲཧ͕ଟ͍ͷͰྉۚ໘ͰԸܙΛड͚΍͍͢
    'BSHBUFͰߦ͏લॲཧόον

    View full-size slide

  67. w ετϨʔδ༰ྔʹ੍ݶ͕͋Δ

    λεΫ಺ͰίϯςφͷϧʔτϘϦϡʔϜʹ(#ɺϚ΢ϯτ༻ͷڞ༗ϘϦϡʔ
    Ϝʹ(#ར༻Մೳ

    ͜ΕΛ௒͑ΔϑΝΠϧΛѻ͏৔߹͸อଘઌΛ4౳ʹ͢Δඞཁ͕͋Δ

    ΍&'4ͷϚ΢ϯτ͸ݱ࣌఺Ͱ͸ग़དྷͳ͍
    'BSHBUFͰେ͖ΊͷϑΝΠϧΛѻ͏৔߹ͷ஫ҙ఺

    View full-size slide

  68. ࣮ߦॱং͕ॏཁͳ
    ͭͷόονॲཧͰϫʔΫϑϩʔΛ૊Έ͍ͨ

    View full-size slide

  69. ͲͷΑ͏ͳύλʔϯ͕͋Δ͔

    View full-size slide

  70. w 424Λ࢖ͬͯδϣϒͷ࣮ߦॱংΛ੍ޚ

    -BNCEB·ͨ͸$MPVE8BUDI&WFOUTܦ༝ͰޙଓόονΛىಈ

    ΩϡʔΠϯάؒ࿈ͷຊདྷͷॲཧͱ͸ؔ܎ͳ͍ίʔυΛॻ͔ͳ͚Ε͹ͳΒͳ͍
    w ॲཧຖʹΤϥʔ௨஌΍ϦτϥΠ੍ޚΛೖΕΔ

    (MVFͰͷϦτϥΠ੍ޚͱΤϥʔ௨஌

    όονॲཧͷίʔυͰϦτϥΠ੍ޚͱΤϥʔ௨஌
    w ॲཧεςοϓ͕૿͑Δ΄Ͳશମ૾Λ೺Ѳ͢Δͷ͕ࠔ೉ʹͳΔ
    ΩϡʔΠϯάύλʔϯ

    View full-size slide

  71. w ॲཧຖʹεέδϡʔϧ࣮ߦ

    (MVFεέδϡʔϧ࣮ߦ ".

    'BSHBUFεέδϡʔϧ࣮ߦ ".

    ࠷ॳͷॲཧ͕͚ͯ͜ޙଓόον͕ಈ͍ͯ΋͍͍৔߹ͷΈʹ࢖͑Δ
    w ॲཧຖʹΤϥʔ௨஌΍ϦτϥΠ੍ޚΛೖΕΔ

    (MVFͰͷϦτϥΠ੍ޚͱΤϥʔ௨஌

    όονॲཧͷίʔυͰϦτϥΠ੍ޚͱΤϥʔ௨஌
    wॲཧεςοϓ͕૿͑Δ΄Ͳશମ૾Λ೺Ѳ͢Δͷ͕ࠔ೉ʹͳΔ
    εέδϡʔϧ࣮ߦύλʔϯ

    View full-size slide

  72. w ॲཧຖʹεέδϡʔϧ࣮ߦ

    (MVFεέδϡʔϧ࣮ߦ ".

    'BSHBUFεέδϡʔϧ࣮ߦ ".

    ࠷ॳͷॲཧ͕͚ͯ͜ޙଓόον͕ಈ͍ͯ΋͍͍৔߹ͷΈʹ࢖͑Δ
    w ॲཧຖʹΤϥʔ௨஌΍ϦτϥΠ੍ޚΛೖΕΔ

    (MVFͰͷϦτϥΠ੍ޚͱΤϥʔ௨஌

    όονॲཧͷίʔυͰϦτϥΠ੍ޚͱΤϥʔ௨஌
    wॲཧεςοϓ͕૿͑Δ΄Ͳશମ૾Λ೺Ѳ͢Δͷ͕ࠔ೉ʹͳΔ
    εέδϡʔϧ࣮ߦύλʔϯ
    ΋ͬͱศརʹग़དྷΔํ๏͸ͳ͍ͷ͔

    View full-size slide

  73. w ॲཧຖʹεέδϡʔϧ࣮ߦ

    (MVFεέδϡʔϧ࣮ߦ ".

    'BSHBUFεέδϡʔϧ࣮ߦ ".

    ࠷ॳͷॲཧ͕͚ͯ͜ޙଓόον͕ಈ͍ͯ΋͍͍৔߹ͷΈʹ࢖͑Δ
    w ॲཧຖʹΤϥʔ௨஌΍ϦτϥΠ੍ޚΛೖΕΔ

    (MVFͰͷϦτϥΠ੍ޚͱΤϥʔ௨஌

    όονॲཧͷίʔυͰϦτϥΠ੍ޚͱΤϥʔ௨஌
    wॲཧεςοϓ͕૿͑Δ΄Ͳશମ૾Λ೺Ѳ͢Δͷ͕ࠔ೉ʹͳΔ
    εέδϡʔϧ࣮ߦύλʔϯ
    4UFQ'VODUJPOTΛ࢖͏͜ͱͰ࣮ݱͰ͖ͨ

    View full-size slide

  74. w "84͕ఏڙ͢ΔαʔόʔϨεϫʔΫϑϩʔαʔϏε
    w ࿈ܞ͍ͯ͠Δ"84ϦιʔεΛ؆୯ʹ੍ޚग़དྷΔ

    ؆୯ʹݺͼग़͔ͭ͠δϣϒऴྃ଴͕ͪग़དྷΔ

    ࿈ܞαʔϏε͸ঃʑʹ૿͍͑ͯΔ
    w +40/ͰϫʔΫϑϩʔΛఆٛ

    ϦτϥΠ΍ΤϥʔϋϯυϦϯά͕Մೳ

    ॲཧͷલޙؔ܎Λͦͷ··ϏδϡΞϥΠζͯ͘͠ΕΔ

    4UFQ'VODUJPOTͱ͸

    View full-size slide

  75. 4UFQ'VODUJPOTͷఆٛ
    ॲཧᶃ
    ॲཧᶄ
    Τϥʔ௨஌
    ΤϥʔϋϯυϦϯά

    View full-size slide

  76. w TUBUF

    ࣮ߦ͢Δॲཧ୯Ґ-BNCEB &$4λεΫ (MVFFUD

    5ZQF۟Ͱॲཧ಺༰Λࢦఆ

    5BTL ͳΜΒ͔ͷॲཧ࣮ߦ

    $IPJDF ೖྗʹج͖ͮॲཧ෼ذ

    8BJU Ұఆ࣌ؒεϦʔϓ

    w TUBUFNBDIJOF

    TUFUFͷू߹ମ ϫʔΫϑϩʔຊମ

    +40/ϕʔεͷ"NB[POεςʔτϝϯτݴޠͰఆٛ

    ͜ͷ୯ҐͰϏδϡΞϥΠζ͞ΕΔ
    4UFQ'VODUJPOTͷߏ੒ཁૉ

    View full-size slide

  77. w $BUDI۟Ͱఆٛ͢Δ
    w ࣄલఆٛ͞ΕͨΤϥʔίʔυ

    4UBUFT"--͢΂ͯͷΤϥʔ໊ʹҰக͢ΔϫΠϧυΧʔυ

    4UBUFT5JNFPVUλΠϜΞ΢τؔ࿈

    4UBUFT5BTL'BJMFEλεΫͷ࣮ߦࣦഊ

    4UBUFT1FSNJTTJPOTఆٛͨ͠λεΫͷ࣮ߦݖݶ͕଍Γͳ͍
    ΤϥʔϋϯυϦϯά

    View full-size slide

  78. w 3FUSZ۟Ͱఆٛ͢Δ
    w ઃఆϑΟʔϧυ

    &SSPS&RVBMTର৅ͱͳΔΤϥʔ໊

    *OUFSWBM4FDPOET࠶ࢼߦ·ͰͷΠϯλʔόϧ

    .BY"UUFNQUT࠷େϦτϥΠ਺

    #BDLPGG3BUF࠶ࢼߦ࣌ͷ૿Ճ͢Δ৐਺ ྫඵɺඵɺඵɺɺɺ

    ϦτϥΠॲཧ

    View full-size slide

  79. "84Ϧιʔεͱͷ࿈ܞ೥݄࣌఺ δϣϒͷϋϯυϦϯάΛ
    Step Functionsଆʹ೚ͤΒΕΔ

    View full-size slide

  80. w ॲཧͷঢ়ଶΛϋϯυϦϯάͯ͘͠ΕΔͷͰ໘౗ͳ࣮૷͕ෆཁ
    w "84Ͱ׬݁͢ΔόονॲཧͷϫʔΫϑϩʔ͕૊Έ΍͍͢

    (MVFˠ&$4ˠMBNCEBΈ͍ͨͳ"84αʔϏεͷ࿈ܞ

    ෳ਺ͷ"84#BUDIΛ࢖ͬͨूܭॲཧ

    TMBDL௨஌༻ͷڞ௨ͷMBNCEBΛ૊ΈࠐΉ
    w αʔόϨεͳͷͰӡ༻ෆཁͰϫʔΫϑϩʔ͕૊ΊΔ
    4UFQ'VODUJPOTͷྑ͍ͱ͜Ζ

    View full-size slide

  81. w ॲཧͷঢ়ଶΛϋϯυϦϯάͯ͘͠ΕΔͷͰ໘౗ͳ࣮૷͕ෆཁ
    w "84Ͱ׬݁͢ΔόονॲཧͷϫʔΫϑϩʔ͕૊Έ΍͍͢

    (MVF&$4ͰαʔϏεؒ࿈ܥ

    ෳ਺ͷ"84#BUDIΛ࢖ͬͨूܭॲཧ
    w αʔόϨεͳͷͰӡ༻ෆཁͰϫʔΫϑϩʔ͕૊ΊΔ
    4UFQ'VODUJPOTͷྑ͍ͱ͜Ζ
    "84ͰϫʔΫϑϩʔΛ૊ΉέʔεͰ͸
    ͔ͳΓ͓͢͢Ί

    View full-size slide

  82. w ϦιʔεΛઐ༗ग़དྷΔͷͰίϯϐϡʔςΟϯάϦιʔεΛଟ
    ͘ར༻͢Δॲཧʹ޲͍͍ͯΔ

    େن໛σʔλͷूܭॲཧ΍ػցֶशͷલॲཧ

    ࢖ͬͨ෼͚ͩ՝ۚ͞ΕΔͷͰίετޮ཰͕ߴ͍
    w ଞͷॲཧΛߟྀ࣮ͨ͠ߦܭը͕ෆཁ

    ίϯϐϡʔςΟϯάϦιʔε໘ͷߟྀ

    खΛೖΕΔΞϓϦέʔγϣϯ͚ͩΛߟ͑Ε͹ྑ͍ͷͰ։ൃ΍ࢼݧ͕͠΍͍͢
    αʔόϨεͰόονॲཧΛ͢ΔϝϦοτ

    View full-size slide

  83. w ϦιʔεΛઐ༗ग़དྷΔͷͰίϯϐϡʔςΟϯάϦιʔεΛଟ
    ͘ར༻͢Δॲཧʹ޲͍͍ͯΔ

    େن໛σʔλͷूܭॲཧ΍ػցֶशͷલॲཧ

    ࢖ͬͨ෼͚ͩ՝ۚ͞ΕΔͷͰίετޮ཰͕ߴ͍
    w ଞͷॲཧΛߟྀ࣮ͨ͠ߦܭը͕ෆཁ

    ίϯϐϡʔςΟϯάϦιʔε໘ͷߟྀ

    खΛೖΕΔΞϓϦέʔγϣϯ͚ͩΛߟ͑Ε͹ྑ͍ͷͰ։ൃ΍ࢼݧ͕͠΍͍͢
    αʔόϨεͰόονॲཧΛ͢ΔϝϦοτ
    αʔόΛҙࣝͨ͠ӡ༻͕ෆཁͳͷͰ
    ࣮ߦ͢Δॲཧͷ͜ͱ͚ͩʹઐ೦ग़དྷΔ

    View full-size slide

  84. "-#ϩάΛ,JCBOBͰݟΔ࢓૊ΈΛαʔόϨεʹ
    Amazon Elasticsearch
    Service
    ALB S3 Bucket Lambda
    Event 

    (time-based)
    5෼ຖʹ
    όέοτʹϩάΛग़ྗ
    ObjectCreatedτϦΨ
    ͰLambda͕ىಈ
    ElasticserachʹBulkLoad
    GrokͰύʔε͠ɺΠϯ
    σοΫεొ࿥
    ΤϯδχΞ͸ɺ
    Kibanaܦ༝ͰϩάΛݟΔ
    աڈ෼ͷΠϯσοΫεΛ
    ఆظతʹ࡟আ

    View full-size slide

  85. ͜ΕΒͷࣄྫ͔Βߟ͑Δ
    "84Ͱόον࣮ߦΛߟ͑Δ࣌ͷํ਑

    View full-size slide

  86. w ·ͣ"84ͷϚωʔδυαʔϏεͰ࣮ݱग़དྷͳ͍͔ߟ͑Δ

    ˠ΋͔ͨ͠͠ΒόονॲཧͰͳͯ͘΋Α͍Մೳੑ΋ඞવతʹαʔόϨεߏ੒
    w -BNCEB 'BB4
    Ͱ࣮ݱग़དྷͳ͍͔Λߟ͑Δ

    ˠϥϯλΠϜͷ؅ཧ͕ෆཁͳͷͰ΍Γ͍ͨॲཧͷ͜ͱ͚ͩʹઐ೦ग़དྷΔ

    ˠαʔόϨε͔ͭ"84Ϧιʔεͱॊೈͳ࿈ܞ͕Մೳ
    w ಠࣗͷϥϯλΠϜΛ࢖ͬͯόονॲཧ͕͍ͨ͠

    ˠΞϓϦέʔγϣϯͷίϯςφԽ

    ˠ&$44DIFEVMF5BTLPS"84#BUDIΛ࢖͏ LTͱ͍͏બ୒ࢶ΋ग़ͯ͘Δ

    w "84্ͷॲཧͰϫʔΫϑϩʔΛ૊Έ͍ͨ

    ˠ4UFQ'VODUJPOTΛ࢖͏
    "84Ͱόον࣮ߦΛߟ͑Δ࣌ͷํ਑

    View full-size slide

  87. w ·ͣ"84ͷϚωʔδυαʔϏεͰ࣮ݱग़དྷͳ͍͔ߟ͑Δ

    ˠ΋͔ͨ͠͠ΒόονॲཧͰͳͯ͘΋Α͍Մೳੑ΋ඞવతʹαʔόϨεߏ੒
    w -BNCEB 'BB4
    Ͱ࣮ݱग़དྷͳ͍͔Λߟ͑Δ

    ˠϥϯλΠϜͷ؅ཧ͕ෆཁͳͷͰ΍Γ͍ͨॲཧͷ͜ͱ͚ͩʹઐ೦ग़དྷΔ

    ˠαʔόϨε͔ͭ"84Ϧιʔεͱॊೈͳ࿈ܞ͕Մೳ
    w ಠࣗͷϥϯλΠϜΛ࢖ͬͯόονॲཧ͕͍ͨ͠

    ˠΞϓϦέʔγϣϯͷίϯςφԽ

    ˠ&$44DIFEVMF5BTLPS"84#BUDIΛ࢖͏ LTͱ͍͏બ୒ࢶ΋ग़ͯ͘Δ

    w "84্ͷॲཧͰϫʔΫϑϩʔΛ૊Έ͍ͨ

    ˠ4UFQ'VODUJPOTΛ࢖͏
    "84Ͱόον࣮ߦΛߟ͑Δ࣌ͷํ਑
    ӡ༻όον࣮ߦͷ੹຿Λ
    Ͱ͖Δ͚ͩ"84ʹد͍ͤͯ͘͜ͱͰ
    ຊདྷՁ஋ͷ͋Δ։ൃʹ஫ྗ͢Δͷ͕େࣄ

    View full-size slide

  88. w ·ͣ"84ͷϚωʔδυαʔϏεͰ࣮ݱग़དྷͳ͍͔ߟ͑Δ

    ˠ΋͔ͨ͠͠ΒόονॲཧͰͳͯ͘΋Α͍Մೳੑ΋ඞવతʹαʔόϨεߏ੒
    w -BNCEB 'BB4
    Ͱ࣮ݱग़དྷͳ͍͔Λߟ͑Δ

    ˠϥϯλΠϜͷ؅ཧ͕ෆཁͳͷͰ΍Γ͍ͨॲཧͷ͜ͱ͚ͩʹઐ೦ग़དྷΔ

    ˠαʔόϨε͔ͭ"84Ϧιʔεͱॊೈͳ࿈ܞ͕Մೳ
    w ಠࣗͷϥϯλΠϜΛ࢖ͬͯόονॲཧ͕͍ͨ͠

    ˠΞϓϦέʔγϣϯͷίϯςφԽ

    ˠ&$44DIFEVMF5BTLPS"84#BUDIΛ࢖͏ LTͱ͍͏બ୒ࢶ΋ग़ͯ͘Δ

    w "84্ͷॲཧͰϫʔΫϑϩʔΛ૊Έ͍ͨ

    ˠ4UFQ'VODUJPOTΛ࢖͏
    "84Ͱόον࣮ߦΛߟ͑Δ࣌ͷํ਑
    )PXͱͯ͠ίϯςφ΍αʔόϨεͱ͍ͬͨ
    ΞʔΩςΫνϟΛཧղ͠
    ͦΕΒΛ࣮αʔϏεʹམͱ͠ࠐΉ࣌ʹ

    View full-size slide

  89. w ·ͣ"84ͷϚωʔδυαʔϏεͰ࣮ݱग़དྷͳ͍͔ߟ͑Δ

    ˠ΋͔ͨ͠͠ΒόονॲཧͰͳͯ͘΋Α͍Մೳੑ΋ඞવతʹαʔόϨεߏ੒
    w -BNCEB 'BB4
    Ͱ࣮ݱग़དྷͳ͍͔Λߟ͑Δ

    ˠϥϯλΠϜͷ؅ཧ͕ෆཁͳͷͰ΍Γ͍ͨॲཧͷ͜ͱ͚ͩʹઐ೦ग़དྷΔ

    ˠαʔόϨε͔ͭ"84Ϧιʔεͱॊೈͳ࿈ܞ͕Մೳ
    w ಠࣗͷϥϯλΠϜΛ࢖ͬͯόονॲཧ͕͍ͨ͠

    ˠΞϓϦέʔγϣϯͷίϯςφԽ

    ˠ&$44DIFEVMF5BTLPS"84#BUDIΛ࢖͏ LTͱ͍͏બ୒ࢶ΋ग़ͯ͘Δ

    w "84্ͷॲཧͰϫʔΫϑϩʔΛ૊Έ͍ͨ

    ˠ4UFQ'VODUJPOTΛ࢖͏
    "84Ͱόον࣮ߦΛߟ͑Δ࣌ͷํ਑
    "84ͩͬͨΓଞͷΫϥ΢υαʔϏεΛ
    ͍͔ʹ͏·͘࢖͍͚ͬͯΔ͔͕
    ͜Ε͔ΒߋʹٻΊΒΕͯ͘ΔεΩϧͩͱࢥ͏

    View full-size slide

  90. w ·ͣ"84ͷϚωʔδυαʔϏεͰ࣮ݱग़དྷͳ͍͔ߟ͑Δ

    ˠ΋͔ͨ͠͠ΒόονॲཧͰͳͯ͘΋Α͍Մೳੑ΋ඞવతʹαʔόϨεߏ੒
    w -BNCEB 'BB4
    Ͱ࣮ݱग़དྷͳ͍͔Λߟ͑Δ

    ˠϥϯλΠϜͷ؅ཧ͕ෆཁͳͷͰ΍Γ͍ͨॲཧͷ͜ͱ͚ͩʹઐ೦ग़དྷΔ

    ˠαʔόϨε͔ͭ"84Ϧιʔεͱॊೈͳ࿈ܞ͕Մೳ
    w ಠࣗͷϥϯλΠϜΛ࢖ͬͯόονॲཧ͕͍ͨ͠

    ˠΞϓϦέʔγϣϯͷίϯςφԽ

    ˠ&$44DIFEVMF5BTLPS"84#BUDIΛ࢖͏ LTͱ͍͏બ୒ࢶ΋ग़ͯ͘Δ

    w "84্ͷॲཧͰϫʔΫϑϩʔΛ૊Έ͍ͨ

    ˠ4UFQ'VODUJPOTΛ࢖͏
    "84Ͱόον࣮ߦΛߟ͑Δ࣌ͷํ਑
    ਐԽͷૣ͍֤αʔϏεΛΩϟονΞοϓ͠
    ࣮ࡍʹखΛಈ͔ͯ͠෢ثΛ૿΍͢͜ͱ͕େࣄ
    Ϋϥ΢υωΠςΟϒͳࢥ૝΁

    View full-size slide

  91. ίωώτͰ͸ΤϯδχΞੵۃ࠾༻தͰ͢ʂ

    ڵຯ͕͋Δํɺ΋ͬͱ࿩Λฉ͍ͯΈ͍ͨͱࢥ͏ํ͕͍·ͨ͠Βɹ
    ੠Λ͔͚͍͔ͯͨͩ͘ɺɹ!TIOBHBJ·Ͱ͝࿈བྷ͍ͩ͘͞
    ͍͞͝ʹએ఻

    View full-size slide

  92. Thank you!
    © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    ӬҪ উҰ࿠
    ίωώτגࣜձࣾ

    View full-size slide