Slide 1

Slide 1 text

ʮ"84*P5ͷϕετϓϥΫςΟεʯ ͦΕϗϯτʂʁ 2019/02/23 JAWS Days 2019 3ZPIFJ .PSJNPUP 4POZ 4IVIFJ 4POPEB "84 vs Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc.

Slide 2

Slide 2 text

ࣗݾ঺հ ৿ຊ ྑฏ @ryoheimorimoto • ιχʔגࣜձࣾ / ιχʔωοτϫʔΫίϛϡχέʔγϣϯζגࣜձࣾ • AWSΛ׆༻ͨ͠αʔϏε։ൃʹैࣄ • aibo / Serverless / IoT • Ϙέ୲౰ Ԃా मฏ @sonoshu • ΞϚκϯ΢ΣϒαʔϏεδϟύϯגࣜձࣾ • AWS IoTؔ࿈ͷιϦϡʔγϣϯΞʔΩςΫτ • IoT / Greengrass / FreeRTOS • ποίϛ୲౰ Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc.

Slide 3

Slide 3 text

8IBUJT"84*P5 !SZPIFJNPSJNPUP !TPOPTIV AWS IoTɺ͍ͭ΋͓ੈ࿩ʹͳͬͯ·͢ʂʂ aibo ͷࣄྫɺ͍ͭ΋͓ੈ࿩ʹͳͬͯ·͢ʂ Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc.

Slide 4

Slide 4 text

8IBUJT"84*P5 !SZPIFJNPSJNPUP !TPOPTIV ͱ͜ΖͰ.. AWS IoTͬͯͲ͏͍͏αʔϏεͳΜͰ͔͢Ͷʁ ͑ɺ͍͖ͳΓͦͷ࣭໰..? Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc.

Slide 5

Slide 5 text

"84*P5$PSFͱ͸ • *P5σόΠεʹͱͬͯͷΫϥ΢υͷೖΓޱͱͳΔαʔϏε AWS IoT Core *P5σόΠεΛ "84Ϋϥ΢υ΍ ଞͷσόΠεʹ ҆શʹ઀ଓ େྔͷσόΠε઀ଓ ʹର͠εέʔϧɺ ϑϧϚωʔδυ "OBMZUJDT %BUBCBTF "*ͳͲ "84ͷ֤छαʔϏ εͱͷ׬શͳ౷߹ ૒ํ޲௨৴ʹΑ Γɺσʔλऩू ͱϦϞʔτ੍ޚ Λ࣮ݱ !TPOPTIV Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc.

Slide 6

Slide 6 text

"84*P5$PSFͷߏ੒ AWS IoT Core Messages Device Gateway Identity Service Messages Applications Device Shadow Message Broker API Registry Actions API Rules Engine AWS and non-AWS Services Analytics Amazon Kinesis Artificial Intelligence Amazon EMR Messaging Amazon SQS Amazon SNS Database Amazon Redshift Amazon DynamoDB Manage Amazon CloudWatch !TPOPTIV Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc.

Slide 7

Slide 7 text

ࣄྫ঺հ !SZPIFJNPSJNPUP !TPOPTIV aiboҎ֎ʹ΋։ൃͨ͠੡඼͕͋ΔΜͰɺ ͦΕΛ঺հ͠Α͏͔ͳ ͬͦ͘͞Ͱ͢·Μ ͳʹ͔͠ΒࣄྫΛ঺հͯ͠΄͠Μ͚ͩͲ.. Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc.

Slide 8

Slide 8 text

ϚϧνϑΝϯΫγϣϯϥΠτ !SZPIFJNPSJNPUP Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc.

Slide 9

Slide 9 text

ϚϧνϑΝϯΫγϣϯϥΠτ • ৭ʑͳηϯαʔ͕෇͍͍ͯ·͢ (Թ౓ɺ࣪౓ɺর౓ɺਓײɺetc...) • Իָ͕ௌ͚·͢ • ੺֎ઢૹ৴Ͱ͖ΔͷͰՈి͕ૢ࡞Ͱ͖·͢ • Έ·΋Γػೳ͕෇͍͍ͯ·͢ • ୐֎͔Βૢ࡞Ͱ͖·͢ • εϚʔτεϐʔΧʔ͔ΒԻ੠Ͱૢ࡞Ͱ͖·͢ (Alexa / Google Assistant ʹରԠ) • ఱҪʹઃஔ͢ΔͷͰअຐʹͳΓ·ͤΜ ͨͩͷγʔϦϯάϥΠτͰ͸͋Γ·ͤΜ !SZPIFJNPSJNPUP Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc.

Slide 10

Slide 10 text

ϚϧνϑΝϯΫγϣϯϥΠτ • ৭ʑͳηϯαʔ͕෇͍͍ͯ·͢ (Թ౓ɺ࣪౓ɺর౓ɺਓײɺetc...) • Իָ͕ௌ͚·͢ • ੺֎ઢૹ৴Ͱ͖ΔͷͰՈి͕ૢ࡞Ͱ͖·͢ • Έ·΋Γػೳ͕෇͍͍ͯ·͢ • ୐֎͔Βૢ࡞Ͱ͖·͢ • εϚʔτεϐʔΧʔ͔ΒԻ੠Ͱૢ࡞Ͱ͖·͢ (Alexa / Google Assistant ʹରԠ) • ఱҪʹઃஔ͢ΔͷͰअຐʹͳΓ·ͤΜ ͨͩͷγʔϦϯάϥΠτͰ͸͋Γ·ͤΜ !SZPIFJNPSJNPUP Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc.

Slide 11

Slide 11 text

΋ͪΖΜ "84*P5 ࢖ͬͯ·͢ʂ ☓ AWS IoT ͱ αʔόʔϨεΞʔΩςΫνϟ Λϑϧ׆༻ !SZPIFJNPSJNPUP Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc.

Slide 12

Slide 12 text

ΞʔΩςΫνϟ "84*P5 %FWJDF4%, *P5 UPQJD *P5 TIBEPX *P5 DFSUJGJDBUF &DIP "MFYBTLJMM *P5$PSF -BNCEB %ZOBNP%# "1*(BUFXBZ .255 QSPUPDPM ϚϧνϑΝϯΫγϣϯϥΠτ ϞόΠϧΞϓϦ *P5 QPMJDZ -BNCEB -BNCEB 4/4 "84$MPVE "84$MPVE !SZPIFJNPSJNPUP Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc.

Slide 13

Slide 13 text

͍Ζ͍Ζͱ޻෉͕͋Γ·ͨ͠ σόΠεূ໌ॻͷ؅ཧ 8FC"1* ΋࢖͍͍ͨΜ͚ͩͲ *P5 ͷ -PHHJOH େྔͷϝοηʔδૹ৴ ίωΫγϣϯͷ੾அݕ஌ 4IBEPXͷ࢖͍͔ͨ Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc. !SZPIFJNPSJNPUP

Slide 14

Slide 14 text

$BTF σόΠεূ໌ॻͷ؅ཧ Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc.

Slide 15

Slide 15 text

$BTFσόΠεূ໌ॻͷ؅ཧ !SZPIFJNPSJNPUP !TPOPTIV AWS IoTΛ࢖͏্ͰҰ൪ॏཁͳͷ͸ɺ ΍ͬͺΓσόΠεೝূͰ͢ΑͶɻ AWS IoT ಋೖʹ͋ͨͬͯͷٞ࿦Ͱ ࣌ؒΛཁ͢Δͷ͕͜͜Ͱ͢Ͷɻ ͪΐͬͱ֓ཁΛઆ໌͠·͢ɻ Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc.

Slide 16

Slide 16 text

"84*P5ʹΑΔσόΠεೝূ • ূ໌ॻʹΑΔσόΠε͝ͱͷೝূͱೝՄΛαϙʔτ AWS IoT Core ֤σόΠεΛೝ ূ͢ΔͨΊʹɺ σόΠε͝ͱʹ ҟͳΔূ໌ॻΛ อ࣋͢Δ { "Effect": "Allow", "Action": "iot:Publish", "Resource": [ "arn:*:topic/private-topic/${iot:ClientId}", "arn:*:topic/open-topic-space/*" ] }, { "Effect": "Allow", "Action": "iot:Subscribe", "Resource": [ "arn:*:topic/private-topic/${iot:ClientId}/*” ] } σόΠε͝ͱʹҟͳΔݖݶ Λ෇༩͢ΔͨΊʹɺσόΠ ε͝ͱʹҟͳΔϙϦγʔΛ อ࣋͢Δ !TPOPTIV Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc.

Slide 17

Slide 17 text

"84*P5ʹΑΔσόΠεೝূ • ূ໌ॻʹΑΔσόΠε͝ͱͷೝূͱೝՄΛαϙʔτ AWS IoT Core ֤σόΠεΛೝ ূ͢ΔͨΊʹɺ σόΠε͝ͱʹ ҟͳΔূ໌ॻΛ อ࣋͢Δ { "Effect": "Allow", "Action": "iot:Publish", "Resource": [ "arn:*:topic/private-topic/${iot:ClientId}", "arn:*:topic/open-topic-space/*" ] }, { "Effect": "Allow", "Action": "iot:Subscribe", "Resource": [ "arn:*:topic/private-topic/${iot:ClientId}/*” ] } σόΠε͝ͱʹҟͳΔݖݶ Λ෇༩͢ΔͨΊʹɺσόΠ ε͝ͱʹҟͳΔϙϦγʔΛ อ࣋͢Δ Ͳ͏΍ͬͯݸผͷݤΛσόΠεʹηΩϡΞʹ૊ΈࠐΉ͔ !TPOPTIV Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc.

Slide 18

Slide 18 text

"84*P5ʹΑΔσόΠεೝূ • εϚʔτϓϩμΫτʹ͓͍ͯ͸ɺ੡඼ग़ՙલʹ޻৔Ͱূ໌ॻͱ ରͱͳΔൿີݤΛ૊ΈࠐΉ͜ͱ͕Ұൠత !TPOPTIV AWS IoT Core Access Key Client.key CSR Client.csr Client.crt Client.crt Provisioning PC IoT Device "84$MPVE 'BDUPSZ Client.key 1. デバイスの 秘密鍵を作成 2. CSR を⽣成して AWS IoT に署名を リクエスト (access keyと secret keyが必要) Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc. 3. デバイス証 明書を発⾏して デバイスに返す 4. 秘密鍵と証明 書をデバイスのス トレージに保存。 秘密鍵はセキュア ストレージに保存

Slide 19

Slide 19 text

ϚϧνϑΝϯΫγϣϯϥΠτͷ՝୊ • ൿີݤͱσόΠεূ໌ॻͷΠϯετʔϧͲ͏͠Α͏ʁ໰୊ ͢Ͱʹࢢ৔ʹग़͍ͯΔ੡඼Λ"84*P5ʹରԠ͢Δඞཁ͕͋ͬͨ ཁ'05" $BTFσόΠεূ໌ॻͷ؅ཧ ϑΝʔϜ΢ΣΞͷ ߋ৽͸Ͱ͖Δ͚Ͳʜ ͕͢͞ʹൿີݤ ͷ഑৴͸ྑ͘ͳ͍ ؾ͕͢Δ FOTA͸Ͱ͖Δ σόΠε ϞόΠϧΞϓϦ !SZPIFJNPSJNPUP Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc.

Slide 20

Slide 20 text

ιϦϡʔγϣϯ • ϑΝʔϜΞοϓσʔτͰ͸ൿີݤ΍ূ໌ॻͷ഑৴͸ߦΘͳ͍ • ϑΝʔϜΞοϓσʔτޙʹσόΠε಺ͰൿີݤΛੜ੒͠ɺ$43Λ࡞ͬͯΫϥ΢υ΁ૹ৴ • Ϋϥ΢υଆͰ *P5$PSF "1* Ͱ $43 ʹ 4JHOJOHɺσόΠε΁ฦ٫ $BTFσόΠεূ໌ॻͷ؅ཧ (1) ϑΝʔϜΞοϓσʔτ (2) ൿີݤͱCSRੜ੒ (3) CSRૹ৴ (4) Signing (5) σόΠεূ໌ॻΛฦૹ (6) IoT Core ઀ଓ Ready !! !SZPIFJNPSJNPUP Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc.

Slide 21

Slide 21 text

ιϦϡʔγϣϯ • ϑΝʔϜΞοϓσʔτͰ͸ൿີݤ΍ূ໌ॻͷ഑৴͸ߦΘͳ͍ • ϑΝʔϜΞοϓσʔτޙʹσόΠε಺ͰൿີݤΛੜ੒͠ɺ$43Λ࡞ͬͯΫϥ΢υ΁ૹ৴ • Ϋϥ΢υଆͰ *P5$PSF "1* Ͱ $43 ʹ 4JHOJOHɺσόΠε΁ฦ٫ $BTFσόΠεূ໌ॻͷ؅ཧ (1) ϑΝʔϜΞοϓσʔτ (2) ൿີݤͱCSRੜ੒ (3) CSRૹ৴ (4) Signing (5) σόΠεূ໌ॻΛฦૹ (6) IoT Core ઀ଓ Ready !! !SZPIFJNPSJNPUP Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc. ϙΠϯτ • ൿີݤ͕σόΠε͔ΒҰ౓΋֎ʹग़ͳ͍ • ͜Ε͚ͩͰΘΓͱηΩϡΞ

Slide 22

Slide 22 text

ιϦϡʔγϣϯ • ϑΝʔϜΞοϓσʔτͰ͸ൿີݤ΍ূ໌ॻͷ഑৴͸ߦΘͳ͍ • ϑΝʔϜΞοϓσʔτޙʹσόΠε಺ͰൿີݤΛੜ੒͠ɺ$43Λ࡞ͬͯΫϥ΢υ΁ૹ৴ • Ϋϥ΢υଆͰ *P5$PSF "1* Ͱ $43 ʹ 4JHOJOHɺσόΠε΁ฦ٫ $BTFσόΠεূ໌ॻͷ؅ཧ (1) ϑΝʔϜΞοϓσʔτ (2) ൿີݤͱCSRੜ੒ (3) CSRૹ৴ (4) Signing (5) σόΠεূ໌ॻΛฦૹ (6) IoT Core ઀ଓ Ready !! !SZPIFJNPSJNPUP Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc. ϙΠϯτ • ൿີݤ͕σόΠε͔ΒҰ౓΋֎ʹग़ͳ͍ • ͜Ε͚ͩͰΘΓͱηΩϡΞ "OENPSF • ͳΓ͢·͠߈ܸͳͲ΁ͷରࡦͰ࣮ࡍ͸΋͏ͪΐͬͱؤு͍ͬͯͯɺ ϞόΠϧΞϓϦͱσόΠεؒͷηΩϡΞ௨৴ $43ͷૹ৴͸ϢʔβʔϩάΠϯͷ4FTTJPOΛ࢖ͬͯೝূ ͦͷଞ͍͔ͭ͘ͷηΩϡϦςΟରࡦ Λ࣮ࢪ͍ͯ͠Δ • ੡඼ʹΑͬͯηΩϡϦςΟڴҖ͸ҟͳΔͨΊɺཁݕ౼͢΂͠

Slide 23

Slide 23 text

$BTFσόΠεূ໌ॻͷ؅ཧ !SZPIFJNPSJNPUP !TPOPTIV ΍ͬͺΓਖ਼߈๏͸޻৔ͰͷΠϯετʔϧͩΑͶɻ Ͱ΋ͦΕ͕೉͍͠৔߹΋͋ͬͯͩͳ... ŠƄŬŔŠƄŬŔ Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc. ͍͖ͳΓಛघͳྫΛͿͬࠐΜͰ͖ͨͳw !TPOPTIV ޻৔Ͱ૊ΈࠐΊͳ͍έʔεͷσβΠϯ ύλʔϯ͕͋ΔͷͰ঺հ͢ΔΑ

Slide 24

Slide 24 text

%FWJDF#PPUTUSBQ • ݸผͷൿີݤɺূ໌ॻΛ޻৔Ͱ૊ΈࠐΊͳ͍έʔεʹ͓͚Δ σβΠϯύλʔϯ • σόΠεొ࿥ʹඞཁ࠷খݶͷݖݶΛ΋ͬͨূ໌ॻΛશσόΠε ڞ௨ͰຒࠐΈɺݸผͷূ໌ॻΛ͋ͱ͔Βμ΢ϯϩʔυ͢Δ • σόΠεͷূ໌ॻ͕ -FBL ͢ΔՄೳੑΛθϩʹ͢Δ͜ͱ͸ Ͱ͖ͳ͍ͷͰɺ-FBLͨ͠ͱ͖ͷӨڹΛϦεΫ෼ੳ͓ͯ͘͠ https://iotatlas.net/designs/ device_bootstrap/ !TPOPTIV Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc.

Slide 25

Slide 25 text

σόΠεূ໌ॻ -FBLͷӨڹൣғΛখ͘͢͞Δ • σόΠε͝ͱͷূ໌ॻʹ෇༩͢ΔݖݶΛ࠷খݶʹ͢Δ AWS IoT Core Attacker x { "Effect": "Allow", "Action": "iot:Publish", "Resource": [ "arn:*:topic/private-topic/${iot:ClientId}", "arn:*:topic/open-topic-space/*" ] }, { "Effect": "Allow", "Action": "iot:Subscribe", "Resource": [ "arn:*:topic/private-topic/${iot:ClientId}/*” ] } ౪ΜͩσόΠεʹׂΓ౰ ͯΒΕͨϙϦγʔͷൣғ Ͱ͔͠߈ܸ͞Εͳ͍ x Steal 3FWPLFͯ͠΋ର ৅ͷσόΠεҎ֎ ʹӨڹ͠ͳ͍ !TPOPTIV Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc.

Slide 26

Slide 26 text

σόΠεূ໌ॻ -FBLͷӨڹൣғΛখ͘͢͞Δ • "84*P5%FWJDF%FGFOEFSͷ $POGMJDUJOH$MJFOU*%T$IFDL Λ༗ޮԽ͢Δ AWS IoT Core Attacker ಉ͡ $MJFOU*%Ͱ ෳ਺σόΠε͔Β "84*P5$PSFʹ ઀ଓΛࢼΈͨ͜ͱΛ ݕग़ Steal AWS IoT Device Defender Connect by client ID A Connect by client ID A { "Effect": "Allow", "Action": "iot:Connect", "Resource": [ "arn:*:client/${iot:Connection.Thing.ThingName}", ] } $POOFDUՄೳͳ $MJFOU*%͸ҰҙʹߜΔ !TPOPTIV Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc.

Slide 27

Slide 27 text

޻৔Ͱͷূ໌ॻΠϯετʔϧ͕೉͍͠৔߹·ͱΊ • σόΠεͷূ໌ॻ͕ -FBL ͢ΔՄೳੑΛθϩʹ͢Δ͜ͱ͸Ͱ͖ ͳ͍͕ɺ-FBLͨ͠ͱ͖ͷඃ֐Λ࠷খݶʹ͢ΔΞϓϩʔν͸ଘ ࡏ͢Δ • Ͳ͜·ͰϦεΫ͕ڐ༰Ͱ͖Δ͔͸Ϣʔεέʔε΍ѻ͏ࢿ࢈ͷη ΩϡϦςΟϨϕϧ࣍ୈͳͷͰɺϦεΫ෼ੳΛηΦϦʔ௨Γ΍Γ ·͠ΐ͏ !TPOPTIV Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc.

Slide 28

Slide 28 text

$BTFσόΠεূ໌ॻͷ؅ཧ !SZPIFJNPSJNPUP !TPOPTIV ͿͬͪΌ͚ൿີݤͱূ໌ॻͷ؅ཧ͔͑ͬ͞͠Γ ΍Ε͹ɺ͋ͱ͸ࢥߟఀࢭͰ΋ͳΜͱ͔ͳΔΑͶ ......ͦΕ͸ݴ͍͗ͪ͢Ό͏ʁ (^ω^ ) ΦϨͷଘࡏՁ஋͕ͳ͘ͳͬͯ͠·͏΍Μ͚ Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc.

Slide 29

Slide 29 text

$BTF 8FC"1* ΋࢖͍͍ͨΜ͚ͩͲ Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc.

Slide 30

Slide 30 text

$BTF8FC"1* ΋࢖͍͍ͨΜ͚ͩͲ ϚϧνϑΝϯΫγϣϯϥΠτ͸৭ʑͳσʔλΛΞοϓϩʔυ͍ͯ͠Δ AWS IoTΛ࢖ΘͣʹWeb APIͰ্͍͛ͯΔέʔε΋ଟʑ !SZPIFJNPSJNPUP Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc.

Slide 31

Slide 31 text

$BTF8FC"1* ΋࢖͍͍ͨΜ͚ͩͲ ϚϧνϑΝϯΫγϣϯϥΠτ͸৭ʑͳσʔλΛΞοϓϩʔυ͍ͯ͠Δ AWS IoTΛ࢖ΘͣʹWeb APIͰ্͍͛ͯΔέʔε΋ଟʑ !TPOPTIV Why !? AWS IoTͷܦ࿏Λ࢖ͬͯ͘Εʙʙ !SZPIFJNPSJNPUP Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc.

Slide 32

Slide 32 text

$BTF8FC"1* ΋࢖͍͍ͨΜ͚ͩͲ Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc. ͍Ζ͍ΖͳϓϩμΫτ -BNCEB %ZOBNP%# "84$MPVE "84$MPVE 4/4 "1*(BUFXBZ ΋Ζ΋Ζͷࣄ৘Ͱ "84*P5 Λ૊ΈࠐΊͳ͍ਓ΋͍ΔͷͰ͢ɻ ޙଓॲཧ AWS IoTରԠ੡඼ ൚༻σʔλॲཧύΠϓϥΠϯ !SZPIFJNPSJNPUP 4USFBNT

Slide 33

Slide 33 text

$BTF8FC"1* ΋࢖͍͍ͨΜ͚ͩͲ Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc. ͍Ζ͍ΖͳϓϩμΫτ -BNCEB %ZOBNP%# "84$MPVE "84$MPVE 4/4 "1*(BUFXBZ ΋Ζ΋Ζͷࣄ৘Ͱ "84*P5 Λ૊ΈࠐΊͳ͍ਓ΋͍ΔͷͰ͢ɻ ޙଓॲཧ AWS IoTରԠ੡඼ ൚༻σʔλॲཧύΠϓϥΠϯ Web API ͷ΄͏͕౎߹͕͍͍ʂ͜ͱ΋͋Δɻ ͜ΕͬͯΞϯνύλʔϯʁ Web API ͷ΄͏͕౎߹͕͍͍ʂ͜ͱ΋͋Δɻ ͜ΕͬͯΞϯνύλʔϯʁ !SZPIFJNPSJNPUP 4USFBNT

Slide 34

Slide 34 text

$BTF8FC"1* ΋࢖͍͍ͨΜ͚ͩͲ Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc. ͍Ζ͍ΖͳϓϩμΫτ -BNCEB %ZOBNP%# "84$MPVE "84$MPVE 4/4 "1*(BUFXBZ ΋Ζ΋Ζͷࣄ৘Ͱ "84*P5 Λ૊ΈࠐΊͳ͍ਓ΋͍ΔͷͰ͢ɻ ޙଓॲཧ AWS IoTରԠ੡඼ ൚༻σʔλॲཧύΠϓϥΠϯ Web API ͷ΄͏͕౎߹͕͍͍ʂ͜ͱ΋͋Δɻ ͜ΕͬͯΞϯνύλʔϯʁ Web API ͷ΄͏͕౎߹͕͍͍ʂ͜ͱ΋͋Δɻ ͜ΕͬͯΞϯνύλʔϯʁ ͱ͜ΖͰ <՝୊> "1* ͷೝূͲ͏͠Α͏ʂʁ ͱ͜ΖͰ <՝୊> "1* ͷೝূͲ͏͠Α͏ʂʁ !SZPIFJNPSJNPUP 4USFBNT

Slide 35

Slide 35 text

$BTF8FC"1* ΋࢖͍͍ͨΜ͚ͩͲ Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc. Subscribe - devices/{id}/token *P5$PSF Publish - devices/{id}/token/request Publish - devices/{id}/token -BNCEB ྫ͑͹JWTͷTokenΛ࢖͏ͱɺ ൚༻ੑ͕͋ͬͯ࢖͍΍͍͢ STSͷTokenΛฦ͢ ͱ͍͏બ୒ࢶ΋͋Γ -BNCEB "1*(BUFXBZ POST /data %ZOBNP%# "84$MPVE "84$MPVE .255 QSPUPDPM Custom AuthorizerͳͲͰJWTΛݕূ ιϦϡʔγϣϯ • *P5 $PSFͷ .255 ܦ࿏Λ࢖ͬͯ "1*༻ͷ 5PLFO Λൃߦ͢Δ !SZPIFJNPSJNPUP

Slide 36

Slide 36 text

$BTF8FC"1* ΋࢖͍͍ͨΜ͚ͩͲ • "1*ͰϩάΛ͋͛Δ͜ͱࣗମ͸શવΞϯνύλʔϯͰ͸ͳ͍ • σόΠεͰൃੜͨ͠ϩάΛ·ͱΊͯૹΓ͍ͨͱ͔ɺ૒ํ޲௨৴͕͍Β ͳ͍৔߹ͳͲ͸ "1*Ͱ • ϩάͷΞοϓϩʔυͰ͖ΔઌΛ੍ޚ͢ΔͳͲɺࡉ͔͍ݖݶઃఆ Ͱ͖Δ఺͸ "84 *P5ͷϝϦοτ • "1*Ͱ΍Δ৔߹͸ࣗલͰ͔ͬ͠Γ΍Γ·͠ΐ͏ • ి஑ۦಈͩͬͨΓϞόΠϧωοτϫʔΫΛར༻͍ͯ͠Δ৔߹ɺ .2554Λ࢖ͬͨ΄͏͕ 5-4)BOETIBLFΛ͓͑͞Δ͜ͱ͕ Ͱ͖Δ • 5-4ͷස౓͸ి஑ফඅʹ௚݁͠·͢ • ௨৴ͷΦʔόʔϔου΋અ໿Ͱ͖Δ !TPOPTIV Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc.

Slide 37

Slide 37 text

༨ஊ "84*P5 ͷྺ࢙ !SZPIFJNPSJNPUP !TPOPTIV APIʹͩ͜ΘΔཧ༝͸΋͏ͪΐͬͱ͋ͬͯ.. ͦͷੲɺIoTͷ͓஋ஈ͕ΊͪΌߴͯ͘ɺ͔ͳΓ ݫ͍͠՝ۚମܥͩͬͨ࣌୅͕͋Γ·ͯ͠… ͦͷΠϝʔδ͍·ͩʹࠜڧ͍ͷΑͶɾɾ Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc.

Slide 38

Slide 38 text

༨ஊ "84*P5 ͷྺ࢙ Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc. !SZPIFJNPSJNPUP ʙ 2017೥ ΊͪΌΊͪΌ͓஋ஈ͕ߴ͔ͬͨ ( ผͷϓϩμΫτͰͷ࿩ ) • ίετࢼࢉͯ͠໨Μۄ͕ඈͼग़ͨ AWS IoTʹͦΕ΄Ͳґଘ͠ͳ͍ઃܭʹͨ͠ - σόΠεೝূͱPush௨஌ͷΈͰར༻ɺShadow΋࢖Θͳ͍ - ۃྗϝοηʔδαΠζΛখ͘͞ - AWS IoTͷܦ࿏Λ࢖Θͳͯ͘΋Կͱ͔ͳΔ෦෼͸Ͱ͖Δ͚ͩWeb APIΛ࢖͏

Slide 39

Slide 39 text

༨ஊ "84*P5 ͷྺ࢙ Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc. !SZPIFJNPSJNPUP 2018೥ ʙ ͍͖ͳΓ҆͘ͳͬͨ • ϝοηʔδαΠζͷ՝ۚ୯Ґ͕͍͖ͳΓ௒ઈ؇࿨ - 512 byte୯ҐͰ՝ۚ͞Ε͍ͯͨͷ͕ɺ5k byte୯Ґʹมߋ (·͔͞10ഒͱͳ !?!?) - গ͠Ͱ΋ Message Payload Λখ͘͞Ͱ͖ΔΑ͏ʹؤுͬͯઃܭͨ͠ͷʹ • Keep-Alive ͷ Ping ͕ແྉʹͳΓɺ઀ଓ࣌ؒʹΑΔ՝ۚʹͳͬͨ - Keep-Alive ͷͨΊͷ ping ࣌ؒΛΊͪΌΊͪΌߟ͑ͨͷʹ͌ ઃܭมΘͬͯ·͏΍Ζʔʔ

Slide 40

Slide 40 text

Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc. ༨ஊ "84*P5 ͷྺ࢙ AWS IoT Core Messages Device Gateway Identity Service Messages Device Shadow Message Broker API Registry Actions API Rules Engine • #FGPSF"84*P5$PSF಺ͷػೳΛͲΕ͚ͩ࢖ͬͯ΋ ࢖Θͳ ͯ͘΋ ϝοηʔδ୯ҐͰҰ཯՝ۚ • "GUFSར༻͢Δػೳʹ߹Θͤͯ՝ۚΛࡉ෼Խ ઀ଓ࣌ؒͷ߹ܭ ૹ৴͞Εͨϝο ηʔδ਺ 3FBEXSJUF਺ 3FBEXSJUF਺ ϧʔϧͷ࣮ߦ਺ ΞΫγϣϯͷ࣮ߦ਺ !TPOPTIV

Slide 41

Slide 41 text

༨ஊ "84*P5 ͷྺ࢙ AWS IoT Core Messages Device Gateway Identity Service Messages Device Shadow Message Broker API Registry Actions API Rules Engine • #BTJD*OHFTU /FX • 3VMFT&OHJOFʹͷΈΞοϓϩʔυ͢Ε͹͍͍σʔλͰ͋Δ৔߹ɺ .FTTBHF#SPLFSΛհ͞ͳ͍͜ͱͰ͞ΒͳΔίετ࡟ݮ Basic Ingest ࠷େ ͷ ίετ࡟ݮʹʂ !TPOPTIV Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc.

Slide 42

Slide 42 text

༨ஊ "84*P5 ͷྺ࢙ !SZPIFJNPSJNPUP !TPOPTIV ͦ͏͍͑͹... AWSIotLogsV2 ͸͍͍͘͢͝Updateͩͬͨ 1͙࣌ؒΒ͍ޠΕͦ͏ ͓͍΍ΊΖw Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc.

Slide 43

Slide 43 text

$BTF *P5 $PSFͷ -PHHJOH Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc.

Slide 44

Slide 44 text

$BTF *P5 $PSFͷ -PHHJOH !SZPIFJNPSJNPUP !TPOPTIV ͪΐͬͱ࿩ͷྲྀΕʹग़དྷϨʔεײ͕ͳ͍Ͱ͔͢Ͷʁ ʢɾ∀ɾʣűƅżűƅż... ͱΓ͋͑ͣAWSIotLogsV2ʹ͍ͭͯ࿩͠·͢Ͷ Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc.

Slide 45

Slide 45 text

$BTF *P5 $PSFͷ -PHHJOH Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc. 2018-12-22 15:18:06.252 TRACEID:09467ee5-cab8-4dc5-ac20-72ab649533a0 PRINCIPALID:XXX [INFO] EVENT:MQTTClient Subscribe TOPICNAME:$aws/events/presence/connected/MyIoTDevice MESSAGE:Subscribe Status: SUCCESS 2018-12-22 15:18:06.252 TRACEID:75f582b5-7849-b94a-aea3-b11c9b15eedc PRINCIPALID:XXX [INFO] EVENT:MQTTClient Subscribe MESSAGE: IpAddress: 2003:45:4636:... SourcePort: 52599 AWSIotLogs (چϩάܗࣜ) AWSIotLogsV2 { "timestamp": "2017-08-10 15:39:30.961", "logLevel": "INFO", "traceId": "672ec480-31ce-fd8b-b5fb-22e3ac420699", "accountId": "123456789012", "status": "Success", "eventType": "Publish-In", "protocol": "MQTT", "topicName": "$aws/things/MyThing/shadow/get", "clientId": "abf27092886e49a8a5c1922749736453", "principalId": "145179c40e2219e18a909d896a5340b74cf97a39641beec2fc3eeafc5a932167", "sourceIp": "205.251.233.181", "sourcePort": 13490 } ࢖͍ͮΒ͔ͬͨϩά͕͔ͳΓྑ͘ͳͬͨ +40/ϩά͸ਖ਼ٛʂʂ !SZPIFJNPSJNPUP

Slide 46

Slide 46 text

$BTF *P5 $PSFͷ -PHHJOH Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc. CloudWatch Logs Insights ͱ ͔ͳΓ૬ੑ͕ྑ͍ (ઌ೔ͷ re:Invent 2018 Ͱൃද͞ΕͨαʔϏε) ͱΓ͋͑ͣDefaultͷQuery ϩάΠϕϯτ਺Λ؆୯ʹՄࢹԽ‥ʂ طʹ͔ͳΓ࢖͑ͦ͏ͳ༧ײ͕͠·͢Ͷɻ !SZPIFJNPSJNPUP ৭ʑͱ࿩͍ͨ͜͠ͱ͸͋ΔͷͰ͕͢ɺͱΓ͋͑ͣ͜Ε͚ͩͰ΋ɻ

Slide 47

Slide 47 text

$BTF *P5 $PSFͷ -PHHJOH Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc. ΫΤϦʹ࢖͑ΔϓϩύςΟΛҰཡԽͯ͘͠ΕΔ ೖྗิ׬΋͘͠Ε·͢Ͷ !SZPIFJNPSJNPUP

Slide 48

Slide 48 text

$BTF *P5 $PSFͷ -PHHJOH Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc. ඪ४ίϚϯυΛ࢖ͬͯಛఆͷ MQTT Client ID ͷ σόΠεͷϩά͚ͩΛநग़ͨ͠Γ... !SZPIFJNPSJNPUP

Slide 49

Slide 49 text

$BTF *P5 $PSFͷ -PHHJOH Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc. ͞ΒʹͦͷσόΠεͷಛఆͷ MQTT Event ͷϩά͚ͩΛநग़ͨ͠Γ... !SZPIFJNPSJNPUP

Slide 50

Slide 50 text

$BTF *P5 $PSFͷ -PHHJOH Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc. Visualize΋؆୯ શσόΠεͷΠϕϯτൃੜঢ়گ ಛఆͷσόΠεͷΈʹߜΓࠐΈ !SZPIFJNPSJNPUP (ͱ͋Δςετ؀ڥͷϩάΛVisualizeͨ͠΋ͷ)

Slide 51

Slide 51 text

CloudWatch Logs Insights Λ࢖ͬͯΈΑ͏ʂ $BTF *P5 $PSFͷ -PHHJOH Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc. • AWSIoTLogsV2 ͱ૬ੑ࠷ߴʂʂ (AWS IoT༻ͷ͓ศརDefault Query SetΛ༻ҙͯ͘͠ΕΔͱঘ͏Ε͍͠ͳ͊) • ֤छίϚϯυ΍ϏϧτΠϯؔ਺͕௚ײతͰ࢖͍΍͍͢ • ԿΑΓ΋ΫΤϦ͕ ര଎ʂʂʂ • ແ਺ͷIoT σόΠεΛѻ͏Α͏ͳέʔεͰ͸ɺ ΫΤϦ଎౓͸͔ͳΓॏཁ (ͨͩ͠ύέࢮʹ͸஫ҙͶ) !SZPIFJNPSJNPUP

Slide 52

Slide 52 text

$BTF େྔͷϝοηʔδૹ৴ Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc.

Slide 53

Slide 53 text

$BTF େྔͷϝοηʔδૹ৴ Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc. !SZPIFJNPSJNPUP !TPOPTIV ಉ࣌ʹͨ͘͞ΜͷσόΠεʹϝοηʔδΛ ૹΓͨ͘ͳΔϢʔεέʔε͕ͨ·ʹ͋Γ·͢Ͷʁ ͑ɺ͋·Γͳ͍ʁʁ Ͳ͏͍͏ϢʔεέʔεͳͷΑʁʁ ͏͙ͬɺɺྫ͑͹... ۓٸ஍਒଎ใͱ͔...? !SZPIFJNPSJNPUP

Slide 54

Slide 54 text

$BTF େྔͷϝοηʔδૹ৴ Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc. ແ਺ͷσόΠε΁ͷେྔͷϝοηʔδ഑৴ ஍਒ͩʂ !SZPIFJNPSJNPUP ※ϚϧνϑΝϯΫγϣϯϥΠτʹ ஍਒଎ใͷػೳ͸͋Γ·ͤΜ

Slide 55

Slide 55 text

$BTF େྔͷϝοηʔδૹ৴ Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc. ແ਺ͷσόΠε΁ͷେྔͷϝοηʔδ഑৴ ஍਒ͩʂ ϝοηʔδϒϩʔΧʔͷ ֤छ੍ݶʹ஫ҙ͢΂͠ʂʂ ϝοηʔδϒϩʔΧʔͷ ֤छ੍ݶʹ஫ҙ͢΂͠ʂʂ !SZPIFJNPSJNPUP

Slide 56

Slide 56 text

.FTTBHF#SPLFS ͷ੍ݶ • $POOFDUJPO͋ͨΓͷඵؒ 1VCMJTI੍ݶ • σόΠε΁ͷඵؒ 1VCMJTI੍ݶ $BTF େྔͷϝοηʔδૹ৴ Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc. → https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_iot !SZPIFJNPSJNPUP ͜ͷ͋ͨΓɺͲ͏ͳΜͰ͔͢ͶԂా͞Μʁ ্ݶ؇࿨ͱ͔૬ஊՄೳʁ !SZPIFJNPSJNPUP ͭ·Γɺಉ࣌ʹ (ඵؒ) 20,000୆·Ͱ͔͠ૹΕͳ͍ʂ ͦͷଞͷ੍ݶ͸ ੍ݶϖʔδ Λ͝ࢀর͍ͩ͘͞

Slide 57

Slide 57 text

.FTTBHF#SPLFS ͷ੍ݶ • $POOFDUJPO͋ͨΓͷඵؒ 1VCMJTI੍ݶ • σόΠε΁ͷඵؒ 1VCMJTI੍ݶ $BTF େྔͷϝοηʔδૹ৴ Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc. → https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_iot !SZPIFJNPSJNPUP ͜ͷ͋ͨΓɺͲ͏ͳΜͰ͔͢ͶԂా͞Μʁ ্ݶ؇࿨ͱ͔૬ஊՄೳʁ !SZPIFJNPSJNPUP ͭ·Γɺಉ࣌ʹ (ඵؒ) 20,000୆·Ͱ͔͠ૹΕͳ͍ʂ ͦͷଞͷ੍ݶ͸ ੍ݶϖʔδ Λ͝ࢀর͍ͩ͘͞ !TPOPTIV ΞΧ΢ϯτશମͷ Publish ੍ݶ͸૬ஊՄೳ Connection ͋ͨΓͷ੍໿͸্ݶ؇࿨Ͱ͖ͳ͍ͷͰ஫ҙ!!

Slide 58

Slide 58 text

$BTF େྔͷϝοηʔδૹ৴ Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc. ϓϥΫςΟε • ͭͷ5PQJDʹूதͯ͠4VCTDSJCFͤ͞ΔΑΓ΋ɺྫ͑͹σόΠε*%ͷ຤ඌͷ ਺ࣈͳͲΛ࢖ͬͯ5PQJDΛ෼ࢄͤͨ͞΄͏͕ύϑΥʔϚϯεʹ͸༗ར Ξϯνύλʔϯ ΑΓྑ͍ߏ੒ devices/all devices/all/0 devices/all/1 ... devices/all/9 ಉ࣌ʹେྔͷϝοηʔδΛૹΔࡍͷύϑΥʔϚϯε !SZPIFJNPSJNPUP

Slide 59

Slide 59 text

$BTF େྔͷϝοηʔδૹ৴ Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc. ϓϥΫςΟε • ͭͷ5PQJDʹूதͯ͠4VCTDSJCFͤ͞ΔΑΓ΋ɺྫ͑͹σόΠε*%ͷ຤ඌͷ ਺ࣈͳͲΛ࢖ͬͯ5PQJDΛ෼ࢄͤͨ͞΄͏͕ύϑΥʔϚϯε͸༗ར Ξϯνύλʔϯ ΑΓྑ͍ߏ੒ devices/all devices/all/0 devices/all/1 ... devices/all/9 ಉ࣌ʹେྔͷϝοηʔδΛૹΔࡍͷύϑΥʔϚϯε ஫ҙ఺ • 5PQJDΛ෼ࢄͯ͠΋ɺಉ࣌ϝοηʔδϯά্ݶͷ ͸มΘΒͳ͍ͷͰ஫ҙ • ϝοηʔδૹ৴ޙʹσόΠε͕ "$, ྫ͑͹ 8FC"1*ͨͨ͘ͱ͔ Λ͢Δͱ αʔόʔଆ͕աෛՙঢ়ଶʹͳΔͷͰ஫ҙ !SZPIFJNPSJNPUP

Slide 60

Slide 60 text

Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc. $BTF େྔͷϝοηʔδૹ৴ • ಉ࣌Ͱ͋Δඞཁ͕ͳ͚Ε͹ɺ1VTI௨஌Λߦͬͨ͋ͱͷ "DLͷ UQT Λ੍ޚ͢Δʹ͸ +PCΛ׆༻͢Δͷ͕͓͢͢Ί Operator IoT Core IoT Device Management S3 10 devices / min 20 devices / min 40 devices / min ෼ؒʹίϚϯυΛ ૹΔ୆਺Λࢦఆɺ ঃʑʹ૿΍͢Α͏ ͳઃఆ΋Մೳ ഑৴͍ͨ͠ϑΝΠ ϧ͕͋Ε͹ॺ໊ݕ ূίʔυ͓Αͼॺ ໊෇͖ 63-Λ഑৴ Ͱ͖Δ !TPOPTIV

Slide 61

Slide 61 text

$BTF ίωΫγϣϯͷ੾அݕ஌ Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc.

Slide 62

Slide 62 text

$BTFίωΫγϣϯͷ੾அݕ஌ !SZPIFJNPSJNPUP !TPOPTIV ϚϧνϑΝϯΫγϣϯϥΠτͬͯ γʔϦϯάϥΠτͳΜͰ͢ɻ นεΠον໰୊͕ਂࠁͳΜ͢Α‥ ʁʁʁ Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc.

Slide 63

Slide 63 text

$BTFίωΫγϣϯͷ੾அݕ஌ Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc. ී௨ͷՈͷนʹ͸ɺγʔϦϯάϥΠτ༻ͷ ओిݯεΠον͕͋Γ·͢Ͷʁ นεΠον͕ԡ͞ΕΔͱɺϚϧνϑΝϯΫγϣϯϥΠτ͸ిݯOFFʹ ͳͬͯ͠·͏ͷͰ͢ʂ (౰ͨΓલͩ) ͳͷͰɺΫϥ΢υͱͷৗ࣌઀ଓ͕Ͱ͖ͳ͘ͳͬͯ͠·͏͜ͱ͕͋Γ·͢ ͜͏͍͏΍ͭ !SZPIFJNPSJNPUP

Slide 64

Slide 64 text

$BTFίωΫγϣϯͷ੾அݕ஌ Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc. Կ͕໰୊͔ʁ ͍͖ͳΓओిݯ͕མͱ͞ΕΔͱɺΫϥΠΞϯτ͔Β MQTT ͷ Disconnect ΛݺͿλΠϛϯά͕ ͳ͍ͷͰɺΫϥ΢υଆ͸ίωΫγϣϯ͕੾அ͞Εͨ͜ͱʹؾ͚ͮͳ͍ (௨ৗɺClient ͔Β MQTT ੾அ͢Δͱ͖͸ɺ໌ࣔతʹ Disconnect ͢Δ͕ɺ͜Ε͕Ͱ͖ͳ͍) !SZPIFJNPSJNPUP ϚϧνϑΝϯΫγϣϯϥΠτͷωοτϫʔΫঢ়ଶΛ Alexa ʹ Report State Ͱ͖ͳ͍ͷͰɺ Alexa͕ʮΞϨΫαɺϥΠτ͚ͭͯʯ ΍ ʮΞϨΫαɺΤΞίϯফͯ͠ʯΛड͚෇͚ͪΌ͏ ΞϨΫαɺΤΞίϯ͚ͭͯ ͸͍ɺΤΞίϯΛ͚ͭ·͢ ... ͋Εʁ൓Ԡ͠ͳ͍…

Slide 65

Slide 65 text

$BTFίωΫγϣϯͷ੾அݕ஌ Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc. ιϦϡʔγϣϯ ιϦϡʔγϣϯ MQTTͷ LWT Λར༻ͯ͠੾அݕ஌͠ɺAlexa ʹ Report State ͢Δ * LWT : Last Will And Testamentɺ͍ΘΏΔҨݴϝοηʔδ (ͪΌΜͱAWS IoTͷMessage Broker΋LWTରԠͯ͠ΔΜͰ͢Ͷʙ) !SZPIFJNPSJNPUP ※ ωοτϫʔΫ੾அݕ஌ʹ͸ Lifecycle Event ͱ͍͏࢓૊Έ΋͋Δ͕ɺॾൠͷࣄ৘Ͱ࠾༻ݟૹΓ *P5$PSF -BNCEB ωοτϫʔΫ੾அ LWT Message "MFYBTLJMM ΦϑϥΠϯঢ়ଶΛ Report State LWT Λར༻ͨ͠ΦϑϥΠϯݕ஌ ిݯOFF

Slide 66

Slide 66 text

$BTFίωΫγϣϯͷ੾அݕ஌ Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc. /PUFT ɾϦΞϧλΠϜੑ͸ແ͍ͷͰ஫ҙ ɾ"MFYBʹ3FQPSU4UBUF͠ͳ͍ͱ͍͏൑அ΋ΞϦ ˠ69ͱ࣮૷޻਺ͷτϨʔυΦϑ !SZPIFJNPSJNPUP ΞϨΫαɺΤΞίϯ͚ͭͯ ΦϑϥΠϯͷΑ͏Ͱ͢ *P5$PSF -BNCEB ωοτϫʔΫ੾அ LWT Message "MFYBTLJMM ΦϑϥΠϯঢ়ଶΛ Report State LWT Λར༻ͨ͠ΦϑϥΠϯݕ஌ ిݯOFF

Slide 67

Slide 67 text

$BTFίωΫγϣϯͷ੾அݕ஌ Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc. When does a broker send the LWT message? • The broker detects an I/O error or network failure. • The client fails to communicate within the defined Keep Alive period. • The client does not send a DISCONNECT packet before it closes the network connection. • The broker closes the network connection because of a protocol error. (MQTT Essentials ΑΓҾ༻) Tips - Message Broker ͸Ͳ͏͍͏ͱ͖ʹ LWT Message Λൃߦͯ͘͠ΕΔ͔ʁ !SZPIFJNPSJNPUP

Slide 68

Slide 68 text

$BTF 4IBEPXͷ࢖͍͔ͨ Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc.

Slide 69

Slide 69 text

$BTF4IBEPXͷ࢖͍͔ͨ !SZPIFJNPSJNPUP !TPOPTIV AWS IoT ʹ͸ Shadow ͱ͍͏ศརͳ ࢓૊Έ͕͋ΔΑͶɻ ܰ͘આ໌ͯ͠΋Β͓͏͔ͳʁ ͓͚ɺ·͔ͤͱ͚ Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc.

Slide 70

Slide 70 text

%FWJDF4IBEPXͱ͸ʁ • Ϋϥ΢υͰ *P5 σόΠεͷঢ়ଶͷϨϓϦΧΛอ࣋͢Δ͜ͱͰɺ ෆ҆ఆͳ௨৴؀ڥԼͰ΋ɺΞϓϦέʔγϣϯ͕ *P5σόΠεͱ ΍ΓऔΓ͢Δ͜ͱΛՄೳʹ͢Δ 4ZOD 4ZOD 4ZOD ΞϓϦʹ͸ *P5σ όΠεͱͷ΍Γऔ Γʹ 3&45"1*Λ ఏڙ *P5σόΠεʹ͸ .255ͰϦΞϧλ ΠϜʹߋ৽Λ௨஌ Ұ࣌తͳΦϑϥΠϯͳͲɺ ͋Δ΂͖ঢ়ଶ %FTJSFE 4UBUF ͱ࣮ࡍͷঢ়ଶ 3FQPSUFE4UBUF ͕ҟͳ Δঢ়ଶΛ؅ཧͰ͖Δ !TPOPTIV Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc.

Slide 71

Slide 71 text

%FWJDF4IBEPXͷϑϩʔ Write Read ΞϓϦ͸ 3FQPSUFE4UBUFΛ ࢀরͯ͠σόΠε ͷ࠷৽ঢ়ଶΛऔಘ ΞϓϦ͸σόΠ εʹίϚϯυΛૹ ৴͢ΔͨΊ %FTJSFE4UBUFΛ ߋ৽ "84*P5͕σό Πεͷ %FTJSFE 4UBUFͱ 3FQPSUFE 4UBUFʹࠩ෼ %FMUB Λݕग़ͯ͠ɺσόΠ εʹ 1VTI௨஌ Notify 3FQPSUFE 4UBUF %FTJSFE 4UBUF "DUJPO 3FQPSUFE 4UBUFʹ "DUJPO ޙͷঢ়ଶΛ௨஌ %FTJSFE4UBUF͸ OVMMʹ໭͢ %FWJDF 4IBEPX 3FQPSUFE4UBUF ʹσόΠεͷݱࡏ ͷঢ়ଶ͕Ξοϓϩ ʔυ͞Ε͍ͯΔ !TPOPTIV Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc.

Slide 72

Slide 72 text

$BTF4IBEPXͷ࢖͍͔ͨ !SZPIFJNPSJNPUP !TPOPTIV ͱ͍͏ײ͡ͷػೳͰ͢ɻ ศརͰ͠ΐʁ Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc. ͘͢͝ྑ͍ػೳͩΑͶɻ ϚϧνϑΝϯΫγϣϯϥΠτͰ͸ γϯϓϧͳ࢖͍͔ͨʹప͍ͯ͠·͢ɻ

Slide 73

Slide 73 text

$BTF4IBEPXͷ࢖͍͔ͨ Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc. ΦϑϥΠϯ࣌ʹσόΠε΁ͷϝοηʔδૹ৴͕ෆཁͳͷͰɺ Shadow ͷ Desired ͸࢖Θͣʹγϯϓϧͳߏ੒ʹɻ "MFYBTLJMM *P5 TIBEPX *P5$PSF .255 QSPUPDPM -BNCEB .255 QSPUPDPM IoT reported state *P5$PSF -BNCEB &DIP ΞϨΫαɺϥΠτ͚ͭͯ Ի੠ίϚϯυ͸ී௨ͷMQTTϝοηʔδ Alexa ΁ͷ Report State ͸ Shadow Λར༻ !SZPIFJNPSJNPUP

Slide 74

Slide 74 text

4IBEPX +PC .255ͷͲΕΛબ୒ͯ͠ίϚϯυΛ *P5σόΠεʹૹΔ΂͖͔ɺ.255Λར༻͢Δ৔߹ɺ Ͳ͏͍ͬͨ 5PQJDઃܭʹ͢΂͖͔ɺͱ͍ͬͨ৘ใ͕ ϗϫΠτϖʔύʔʹ·ͱ·͍ͬͯ·͢ͷͰ ࢀߟʹ͍ͯͩ͘͠͞ɻ ӳޠͰ͕͢ɾɾ • جຊͱͳΔ .255ͷ QVCTVCͰίϚϯυΛૹͬͨ΄͏͕ ͍͍γφϦΦ΋ଘࡏ͠·͢ɻ • *P5σόΠεʹͯɺͦͷॠؒͷΈ࣮ߦ͞ΕΔ΂͖ͰɺσόΠεʹૄ௨ Ͱ͖ͳ͍৔߹͸ΤϥʔΛ͔͑͢΂͖έʔε • ҰͭͷίϚϯυΛෳ਺ͷσόΠε͕ಉ࣌ʹ࣮ߦ͢΂͖έʔε !TPOPTIV $BTF4IBEPXͷ࢖͍͔ͨ Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc. https://aws.amazon.com/jp/whitepapers/#iot

Slide 75

Slide 75 text

Ҏ্Ͱࣄྫ঺հ͓͠·͍ Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc. !SZPIFJNPSJNPUP !TPOPTIV ͦ͏͍͑͹ IoT ͷ SA ༷ʹΞʔΩςΫνϟΛ Ұ౓΋૬ஊͨ͜͠ͱͳ͍ͳ͊ɻ ͥΜͿࣗ෼ͨͪͰͰߟ͑ͨΘɻ ͓͍͓͍Զͷଘࡏҙٛ͸...ͬͯ͹Αɻ ΑΓྑ͍ΞʔΩςΫνϟΛఏҊͰ͖Δ͔΋ ͠Εͳ͍ͷͰɺͥͻ૬ஊ͍ͯͩ͘͠͞Ͷʂ

Slide 76

Slide 76 text

·ͱΊ Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc. ηογϣϯλΠτϧ͸ ɺ ʮAWS IoT ͷϕετϓϥΫςΟεʯͦΕϗϯτʂʁ Ͱ͕ͨ͠ɺ౴͑͸ ϗϯτ ͳؾ͕͠·͢ɻ ͨͩ͠ɺϓϩμΫτʹԠͨ͡࠷దղΛߟ͑Δͷ͕Ұ൪େࣄͰ͢ɻ ࠔͬͨΒSAʹ૬ஊ͠·͠ΐ͏ɻ ͦͯ͠... AWS IoT Λ࢖͍౗ͦ͏ʂʂ ΈΜͳͰϕετϓϥΫςΟεΛҭ͍͖ͯͯ·͠ΐ͏ɻ

Slide 77

Slide 77 text

͓ΘΓʹ Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc. !SZPIFJNPSJNPUP !TPOPTIV ϚϧνϑΝϯΫγϣϯϥΠτ΍ϫϯίͳͲɺ ฐࣾͷIoT੡඼ΛͥͻΑΖ͓͘͠ئ͍͠·͢ʂ (※Ϗδωεύʔτφʔ΋୳͍ͯ͠ΔͷͰͥͻ͓੠͕͚Λʂ) AWS IoT ؔ࿈αʔϏεͰ͓ࠔΓͷࡍ͸ ͥͻ͓੠͕͚͍ͩ͘͞ʂ And special thanks to : ߴ࡚͘Μ / @sudooow / ARG͞Μ Eto͞Μ / Kim͘Μ / Iwai͘Μ

Slide 78

Slide 78 text

͓͠·͍ɻ !SZPIFJNPSJNPUP !TPOPTIV ͋Μ·Γອ࠽ײ͸ແ͔ͬͨͳ... ͤ΍ͳ... Copyright 2019 Sony Network Communications Inc. / Amazon Web Services Inc.