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

サーバーレスアーキテクチャで Twilioを安全に運用しよう!

サーバーレスアーキテクチャで Twilioを安全に運用しよう!

Kiminari Homma

December 08, 2015
Tweet

More Decks by Kiminari Homma

Other Decks in Technology

Transcript

  1. ຊؒ ߖ੒ @kimihom ϘΫίί ӡӦऀ http://www.bokukoko.info/ CTO at selfree,llc Ruby

    on Rails, AWS, Heroku, Android, iOS TwilioJP-UG ϝϯόʔ
  2. TwiML Twilio Ͱి࿩Λड৴ɾൃ৴͢Δͱ͖ͳͲɺ Twilio ΁ಈ࡞໋ྩΛग़ͨ͢ΊͷXML Ͳ͏͢Ε͹͍͍ʁ ͜͏͠Ζ(TwiML) Webαʔόʔ <?xml version="1.0"

    encoding="UTF-8"?> <Response> <Gather action=“https://www.myapp.com/action”> <Play loop=“5”>https://www.myasset.com/voice.wav</Play> </Gather> </Response> αϯϓϧ
  3. REST API HTTP ௨৴Ͱ Twilio ͷ৘ใͷऔಘɾ࡞੒ɾߋ৽ɾ࡟আͳͲΛߦ͏ ֤ݴޠʹରԠ (PHP, Ruby, Python,

    Node.js etc) Webαʔόʔ ͜Ε΍ͬͯ ͜͏ͳΓ·ͨ͠ ྫ͑͹ ɾి࿩൪߸ͷऔಘɺߪೖɺ࡟আ ɾి࿩Λ͔͚Δɺ௨࿩ͷߋ৽ ɾSMS ૹ৴ ɾͦͷଞɺTwilio ϚΠϖʔδʹ͋Δૢ࡞ΛࣗલͰ࣮૷
  4. ϦΫΤετURL ͱ ϑΥʔϧόοΫURL ి࿩͕͔͔͖ͬͯͨͱ͖ʹɺ࠷ॳʹ Twilo ͕ฉ͖ʹߦ͘ URL Ͳ͏͢Ε͹͍͍ʁ Error! Webαʔόʔ

    ϦΫΤετURL ϦΫΤετ URL ͰTwiMLΛղੳͰ͖ͳ͔ͬͨ৔߹ʹฉ͖ʹߦ͘URL ϑΥʔϧόοΫ URL ϦΫΤετ URL Ͳ͏͢Ε͹͍͍ʁ ϑΥʔϧόοΫ URL ͜͏͠Ζ(TwiML)
  5. ϦΫΤετURL ͱ ϑΥʔϧόοΫURL ి࿩͕͔͔͖ͬͯͨͱ͖ʹɺ࠷ॳʹ Twilo ͕ฉ͖ʹߦ͘ URL Ͳ͏͢Ε͹͍͍ʁ Error! Webαʔόʔ

    ϦΫΤετURL ϦΫΤετ URL ͰTwiMLΛղੳͰ͖ͳ͔ͬͨ৔߹ʹฉ͖ʹߦ͘URL ϑΥʔϧόοΫ URL ϦΫΤετ URL Ͳ͏͢Ε͹͍͍ʁ ϑΥʔϧόοΫ URL ͜͏͠Ζ(TwiML) ?
  6. :PVS 4FSWFS Ϧ Ϋ Τ ε τ 6 3- Τ

    ϥ ʔ ʂ ి࿩ ᶃ ᶄ ᶅ "1* (BUFXBZ -BNCEB ϑ Υ ʔ ϧ ό ο Ϋ 6 3 - 5X J. -