{"id":13367,"date":"2020-12-08T11:35:47","date_gmt":"2020-12-08T02:35:47","guid":{"rendered":"https:\/\/sendgrid.kke.co.jp\/blog\/?p=13367"},"modified":"2022-10-05T16:23:06","modified_gmt":"2022-10-05T07:23:06","slug":"sendgrid%e3%83%bbtwilio%e3%83%bbaws-lambda%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e3%83%a1%e3%83%bc%e3%83%ab%e3%81%8b%e3%82%89sms%e3%81%b8%e3%83%a1%e3%83%83%e3%82%bb%e3%83%bc%e3%82%b8%e3%82%92%e9%80%81","status":"publish","type":"post","link":"https:\/\/sendgrid.kke.co.jp\/blog\/?p=13367","title":{"rendered":"SendGrid\u30fbTwilio\u30fbAWS Lambda\u3092\u4f7f\u3063\u3066\u30e1\u30fc\u30eb\u304b\u3089SMS\u3078\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u9001\u3063\u3066\u307f\u305f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2021\/04\/20201208_blog.png\" alt=\"SendGrid\u30fbTwilio\u30fbAWS Lambda\u3092\u4f7f\u3063\u3066\u30e1\u30fc\u30eb\u304b\u3089SMS\u3078\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u9001\u3063\u3066\u307f\u305f\" width=\"100%\" class=\"aligncenter size-full wp-image-15890\" srcset=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2021\/04\/20201208_blog.png 650w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2021\/04\/20201208_blog-300x185.png 300w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><\/p>\n<p>\u65b0\u4eba\u306e\u9752\u6728\u3067\u3059\uff01<\/p>\n<p>\u4eca\u56de\u306f\u3001Twilio\u306e\u30d6\u30ed\u30b0\u300c<a href=\"https:\/\/www.twilio.com\/blog\/serverless-email-sms-gateway-lambda\" rel=\"noopener\" target=\"_blank\">Build a Serverless Email to SMS Gateway with Twilio and AWS Lambda<\/a>\u300d\u3067\u53d6\u308a\u4e0a\u3052\u3089\u308c\u3066\u3044\u308b\u3001SendGrid\u3068Twilio\u3001AWS Lambda\uff08\u4ee5\u5f8cLambda\uff09 \u3092\u4f7f\u3063\u305f\u30e1\u30fc\u30eb\u304b\u3089SMS\u3078\u306e\u8ee2\u9001\u6a5f\u80fd\u306e\u69cb\u7bc9\u306b\u3064\u3044\u3066\u7d39\u4ecb\u3057\u307e\u3059\u3002<br \/>\nSendGrid, Twilio, AWS\u3092\u52c9\u5f37\u3059\u308b\u3068\u3044\u3046\u610f\u5473\u3082\u8fbc\u3081\u3066\u4e0a\u8a18\u30d6\u30ed\u30b0\u8a18\u4e8b\u306e\u5185\u5bb9\u3092\u5b9f\u88c5\u3057\u3066\u307f\u307e\u3057\u305f\u3002\u305d\u308c\u305e\u308c\u306e\u6a5f\u80fd\u3092\u5b9f\u969b\u306b\u624b\u3092\u52d5\u304b\u3057\u306a\u304c\u3089\u5b66\u3079\u308b\u306e\u3067\u3001\u7686\u3055\u3093\u3082\u8a66\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\uff01<\/p>\n<h3>\u30e1\u30fc\u30eb\u3092SMS\u306b\u8ee2\u9001\u3059\u308b\u6d41\u308c<\/h3>\n<p>\u3042\u308b\u7279\u5b9a\u306e\u30c9\u30e1\u30a4\u30f3\u306b\u5bfe\u3057\u3066\u30e1\u30fc\u30eb\u3092\u9001\u308b\u3068\u3001\u305d\u306e\u30e1\u30fc\u30eb\u306e\u5185\u5bb9\u304cSMS\u3068\u306a\u3063\u3066\u6307\u5b9a\u306e\u96fb\u8a71\u756a\u53f7\u306b\u5c4a\u304d\u307e\u3059\u3002<br \/>\n\u6d41\u308c\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture1.png\" alt=\"\u30e1\u30fc\u30eb\u3092SMS\u306b\u8ee2\u9001\u3059\u308b\u6d41\u308c\" width=\"100%\" class=\"aligncenter size-full wp-image-13370\" srcset=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture1.png 2245w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture1-300x76.png 300w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture1-768x195.png 768w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture1-1024x260.png 1024w\" sizes=\"(max-width: 2245px) 100vw, 2245px\" \/><\/p>\n<ol>\n<li><span style=\"background-color:#d3d3d3\">&lt;SMS\u3092\u5c4a\u3051\u305f\u3044\u96fb\u8a71\u756a\u53f7&gt;@&lt;\u81ea\u5206\u3067\u7ba1\u7406\u3057\u3066\u3044\u308b\u30c9\u30e1\u30a4\u30f3&gt;<\/span>\u5b9b\u306b\u30e1\u30fc\u30eb\u3092\u9001\u4fe1\uff08\u4f8b\uff1a+81XXXXXXXXXX@example.com\uff09<\/li>\n<li>SendGrid\u3067\u30e1\u30fc\u30eb\u3092\u53d7\u3051\u53d6\u308a\u3001Lambda\u4e0a\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u30c7\u30fc\u30bf\u3092POST<\/li>\n<li>Lambda\u4e0a\u3067SMS\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u4f5c\u6210\u3057\u3001Twilio\u306eAPI\u3067\u30b9\u30de\u30db\u3078\u8ee2\u9001<\/li>\n<\/ol>\n<h3>\u624b\u9806<\/h3>\n<p>\u5fc5\u8981\u306a\u3082\u306e<\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/bdm1981\/emailtosms-gateway\" rel=\"noopener\" target=\"_blank\">\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9<\/a><\/li>\n<li><a href=\"https:\/\/www.twilio.com\/console\" rel=\"noopener\" target=\"_blank\">Twilio\u30a2\u30ab\u30a6\u30f3\u30c8<\/a><\/li>\n<li><a href=\"https:\/\/app.sendgrid.com\/\" rel=\"noopener\" target=\"_blank\">SendGrid\u30a2\u30ab\u30a6\u30f3\u30c8<\/a><\/li>\n<li><a href=\"https:\/\/console.aws.amazon.com\/\" rel=\"noopener\" target=\"_blank\">AWS\u30a2\u30ab\u30a6\u30f3\u30c8<\/a><\/li>\n<li><a href=\"https:\/\/www.twilio.com\/console\/phone-numbers\/search\" rel=\"noopener\" target=\"_blank\">Twilio\u96fb\u8a71\u756a\u53f7<\/a><\/li>\n<li><a href=\"https:\/\/git-scm.com\/\" rel=\"noopener\" target=\"_blank\">Git<\/a><\/li>\n<li><a href=\"https:\/\/www.npmjs.com\/\" rel=\"noopener\" target=\"_blank\">npm<\/a><\/li>\n<li>\u30c9\u30e1\u30a4\u30f3\uff08<a href=\"https:\/\/www.freenom.com\/ja\/index.html\" rel=\"noopener\" target=\"_blank\">Freenom<\/a>\u3001<a href=\"https:\/\/www.onamae.com\/\" rel=\"noopener\" target=\"_blank\">\u304a\u540d\u524d.com<\/a>\u306a\u3069\u3067\u53d6\u5f97\uff09<\/li>\n<\/ul>\n<p>\u79c1\u304c\u52d5\u4f5c\u78ba\u8a8d\u3057\u305f\u74b0\u5883\u306f\u3001macOS Catalina (10.15.7)\u30fbGoogle Chrome (87.0.4280.67)\u3067\u3059\u3002Git\u3068npm\u306fHomebrew\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3057\u305f\u3002<\/p>\n<h4>Step 1: Twilio\u30a2\u30ab\u30a6\u30f3\u30c8\u60c5\u5831\u306e\u78ba\u8a8d<\/h4>\n<p>Twilio\u30a2\u30ab\u30a6\u30f3\u30c8\u3092\u307e\u3060\u6301\u3063\u3066\u3044\u306a\u3044\u65b9\u306f\u3001\u5148\u306b<a href=\"https:\/\/www.twilio.com\/blog\/how-to-create-twilio-account-jp\" rel=\"noopener\" target=\"_blank\">\u30a2\u30ab\u30a6\u30f3\u30c8\u3092\u4f5c\u6210<\/a>\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<br \/>\n\u6a5f\u80fd\u5236\u9650\u306f\u3042\u308a\u307e\u3059\u304c\u3001<a href=\"https:\/\/support.twilio.com\/hc\/en-us\/articles\/360044841214-Twilio\" rel=\"noopener\" target=\"_blank\">\u7121\u6599\u306e\u30c8\u30e9\u30a4\u30a2\u30eb\u30a2\u30ab\u30a6\u30f3\u30c8<\/a>\u3082\u5229\u7528\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u60c5\u5831\u3092\u5f8c\u3067\u4f7f\u3044\u307e\u3059:<\/p>\n<ul>\n<li><strong>Account SID<\/strong>: <a href=\"https:\/\/jp.twilio.com\/console\" rel=\"noopener\" target=\"_blank\">Twilio\u306e\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9<\/a>\u306b\u8a18\u8f09<\/li>\n<li><strong>Auth Token<\/strong>: \u540c\u3058\u304fTwilio\u306e\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u306b\u8a18\u8f09<\/li>\n<li><strong>Twilio Phone Number<\/strong>: SMS\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u9001\u4fe1\u5143\u3068\u306a\u308b\u96fb\u8a71\u756a\u53f7<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture2.png\" alt=\"Twilio\u30a2\u30ab\u30a6\u30f3\u30c8\u60c5\u5831\u306e\u78ba\u8a8d\" width=\"100%\" class=\"aligncenter size-full wp-image-13371\" srcset=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture2.png 1254w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture2-300x182.png 300w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture2-768x467.png 768w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture2-1024x622.png 1024w\" sizes=\"(max-width: 1254px) 100vw, 1254px\" \/><\/p>\n<h4>Step 2: \u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u306e\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<\/h4>\n<p><a href=\"https:\/\/www.twilio.com\/blog\/serverless-email-sms-gateway-lambda\" rel=\"noopener\" target=\"_blank\">\u5f15\u7528\u5143\u306e\u30d6\u30ed\u30b0\u8a18\u4e8b<\/a>\u306b\u3088\u308b\u3068\u3001<\/p>\n<aside>\nAWS Lambda doesn\u2019t allow you to install npm packages through its online interface. Because of this limitation, we&#8217;ll be packaging up the code and packages offline.<br \/>\n<\/aside>\n<p>Lambda\u306bnpm\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u76f4\u63a5\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u306a\u3044\u3001\u3068\u306e\u3053\u3068\u306a\u306e\u3067\u3001\u4eca\u56de\u306f\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u4e00\u5ea6\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3001\u30ed\u30fc\u30ab\u30eb\u74b0\u5883\u3067\u30d1\u30c3\u30b1\u30fc\u30b8\u5316\u3057\u305f\u4e0a\u3067AWS\u3078\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u624b\u9806\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059:<\/p>\n<ol>\n<li>GitHub\u304b\u3089<a href=\"https:\/\/github.com\/bdm1981\/emailtosms-gateway\" rel=\"noopener\" target=\"_blank\">\u30ea\u30dd\u30b8\u30c8\u30ea<\/a>\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3082\u3057\u304f\u306fclone\u3059\u308b<br \/>\n<span style=\"background-color:#d3d3d3\">% git clone https:\/\/github.com\/bdm1981\/emailtosms-gateway.git<\/span><\/li>\n<li><span style=\"background-color:#d3d3d3\">cd<\/span>\u3067\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u5185\u306b\u79fb\u52d5\u3057\u3001<span style=\"background-color:#d3d3d3\">npm install<\/span>\u3092\u5b9f\u884c\u3059\u308b<\/li>\n<li>\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u5185\u306e\u30d5\u30a1\u30a4\u30eb\u30fb\u30d5\u30a9\u30eb\u30c0\u3092ZIP\u3059\u308b<\/li>\n<\/ol>\n<p>\u3053\u3053\u3067\u3072\u3068\u3064\u6ce8\u610f\u70b9\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n\u30d1\u30c3\u30b1\u30fc\u30b8\u5316\u306e\u969b\u306f\u3001\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u4e2d\u8eab\u3092\u9078\u629e\u3057\u3066ZIP\u306b\u3059\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\uff08\u3053\u3053\u3067\u306fArchive.zip\u3068\u3057\u307e\u3059\uff09\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture3.png\" alt=\"\u30d1\u30c3\u30b1\u30fc\u30b8\u5316\u306fZIP\" width=\"100%\" class=\"aligncenter size-full wp-image-13372\" srcset=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture3.png 1116w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture3-300x165.png 300w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture3-768x423.png 768w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture3-1024x563.png 1024w\" sizes=\"(max-width: 1116px) 100vw, 1116px\" \/><\/p>\n<p>\u3053\u308c\u306f\u79c1\u81ea\u8eab\u304c\u72af\u3057\u305f\u30df\u30b9\u3067\u3059\u304c\u3001<br \/>\n \/emailtosms-gateway\u3092\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3054\u3068ZIP\u306b\u3057\u3066Lambda\u4e0a\u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b\u3068\u3001\u30a2\u30d7\u30ea\u5b9f\u884c\u6642\u306b\u6b21\u306e\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u4e0a\u624b\u304f\u52d5\u4f5c\u3057\u307e\u305b\u3093:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nRuntime.HandlerNotFound: index.handler is undefined or not exported\r\n<\/pre>\n<p>\u3053\u308c\u306f\u3001ZIP\u5727\u7e2e\u306e\u969b\u306b\u4e0d\u8981\u306a\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304c\u5165\u3063\u3066\u3057\u307e\u3044\u3001\u30a2\u30d7\u30ea\u304c\u30d1\u30b9\u3092\u89e3\u6c7a\u3067\u304d\u306a\u304f\u306a\u3063\u305f\u3053\u3068\u304c\u539f\u56e0\u3067\u51fa\u305f\u30a8\u30e9\u30fc\u3067\u3059\u3002\uff08\u53c2\u7167\uff1a<a href=\"https:\/\/stackoverflow.com\/questions\/61856434\/aws-lambda-function-returning-runtime-handlernotfound-error\" rel=\"noopener\" target=\"_blank\">stackoverflow &#8211; AWS Lambda function returning Runtime.HandlerNotFound error<\/a>\uff09<\/p>\n<p>\u6b21\u306e\u30b9\u30c6\u30c3\u30d7\u3067\u3001zip\u30d5\u30a1\u30a4\u30eb\uff08Archive.zip\uff09\u3092Lambda\u3078\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u307e\u3059\uff01<\/p>\n<p>\u3067\u3059\u304c\u305d\u306e\u524d\u306b\u3001\u4eca\u56de\u5b9f\u884c\u3059\u308b<span style=\"background-color:#d3d3d3\">index.js<\/span>\u306e\u4e2d\u8eab\u304c\u6c17\u306b\u306a\u308b\u65b9\u306e\u305f\u3081\u306b\u3001\u30b3\u30fc\u30c9\u306e\u4e00\u90e8\u3092\u8f09\u305b\u3066\u304a\u304d\u307e\u3059:<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\nexports.handler = async (event) =&gt; {\r\n  let data = await parser.parse(event);\r\n\r\n  console.log(&quot;input data: &quot;, data);\r\n\r\n  if (validateSender(data.from)) {\r\n    \/\/ parse the to number from the left-hand side of the email address\r\n\r\n    let regexp = \/(^.\\d+&#x5B;^@])\/g;\r\n\r\n    let to = data.to.match(regexp)&#x5B;0];\r\n\r\n    let body = `Subject: ${data.subject}\\nMessage: ${data.text}`;\r\n\r\n    let message = await client.messages.create({\r\n      body: body,\r\n\r\n      from: process.env.FROM,\r\n\r\n      to: to,\r\n    });\r\n\r\n    console.log(&quot;Message Output: &quot;, message);\r\n\r\n    const response = {\r\n      statusCode: 200,\r\n\r\n      body: JSON.stringify({ input: data, output: message }),\r\n    };\r\n\r\n    return response;\r\n  } else {\r\n    const response = {\r\n      statusCode: 403,\r\n\r\n      body: &quot;Unauthorized Sender&quot;,\r\n    };\r\n\r\n    return response;\r\n  }\r\n};\r\n<\/pre>\n<p>\u304a\u304a\u307e\u304b\u306a\u30b3\u30fc\u30c9\u306e\u6d41\u308c\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059:<\/p>\n<ul>\n<li>SendGrid\u304b\u3089\u9001\u3089\u308c\u308b\u30da\u30a4\u30ed\u30fc\u30c9\u304b\u3089\u3001<span style=\"background-color:#d3d3d3\">from<\/span>\u3068<span style=\"background-color:#d3d3d3\">to<\/span>\u3001<span style=\"background-color:#d3d3d3\">body<\/span>\u3001<span style=\"background-color:#d3d3d3\">subject<\/span>\u3092\u53d6\u308a\u51fa\u3059<\/li>\n<li><span style=\"background-color:#d3d3d3\">from<\/span>\u30a2\u30c9\u30ec\u30b9\u3092\u3001Lambda\u306e\u74b0\u5883\u5909\u6570\u8a2d\u5b9a\u3067\u8a31\u53ef\u3057\u305f\u9001\u4fe1\u30c9\u30e1\u30a4\u30f3\u306e\u30ea\u30b9\u30c8\u3068\u7167\u5408\u3059\u308b\uff08\u6b21\u306e\u30b9\u30c6\u30c3\u30d7\u3067\u8aac\u660e\uff09<\/li>\n<li><span style=\"background-color:#d3d3d3\">to<\/span>\u30a2\u30c9\u30ec\u30b9\u304b\u3089\u96fb\u8a71\u756a\u53f7\u3092\u62bd\u51fa\u3059\u308b<\/li>\n<li><a href=\"https:\/\/www.twilio.com\/docs\/libraries\/reference\/twilio-node\/\" rel=\"noopener\" target=\"_blank\">Twilio helper library<\/a>\u3092\u7528\u3044\u3066SMS\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u4f5c\u6210\u3059\u308b<br \/>\n\uff08Twilio\u306eAPI\u3092\u7528\u3044\u305fSMS\u30e1\u30c3\u30bb\u30fc\u30b8\u4f5c\u6210\u306e\u8a73\u7d30\u306b\u3064\u3044\u3066\u306f\u3001\u300c<a href=\"https:\/\/www.twilio.com\/docs\/sms\/quickstart\/node\" rel=\"noopener\" target=\"_blank\">Programmable SMS Quickstart for Node.js<\/a>\u300d\u306b\u8a18\u8f09\uff09<\/li>\n<\/ul>\n<p>\u3053\u308c\u3067\u30e1\u30fc\u30eb\u304b\u3089SMS\u3078\u8ee2\u9001\u3059\u308b\u6a5f\u80fd\u306e\u6e96\u5099\u304c\u3067\u304d\u305f\u306e\u3067\u3001AWS\u3067\u306e\u74b0\u5883\u69cb\u7bc9\u306b\u79fb\u3063\u3066\u3044\u304d\u307e\u3059\uff01<\/p>\n<h4>Step 3: Lambda\u95a2\u6570\u3068API Gateway\u306e\u69cb\u7bc9<\/h4>\n<p>\u524d\u306e\u30b9\u30c6\u30c3\u30d7\u3067\u3001\u30e1\u30fc\u30eb\u304b\u3089SMS\u3078\u8ee2\u9001\u3059\u308b\u30b3\u30fc\u30c9\u306e\u6e96\u5099\u304c\u3067\u304d\u307e\u3057\u305f\u3002<br \/>\n\u3053\u3053\u3067\u306f\u3001AWS Lambda\u3078zip\u30d5\u30a1\u30a4\u30eb\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u3001<a href=\"https:\/\/aws.amazon.com\/api-gateway\/\" rel=\"noopener\" target=\"_blank\">Amazon API Gateway<\/a>\u3092\u4f7f\u3063\u3066\u30c7\u30fc\u30bf\u8ee2\u9001\u306e\u305f\u3081\u306e\u30eb\u30fc\u30c8\u3092\u78ba\u4fdd\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<h5>Lambda\u95a2\u6570\u306e\u65b0\u898f\u4f5c\u6210<\/h5>\n<p><img decoding=\"async\" src=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture4.png\" alt=\"AWS Management Console\" width=\"100%\" class=\"aligncenter size-full wp-image-13373\" srcset=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture4.png 1254w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture4-300x158.png 300w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture4-768x405.png 768w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture4-1024x541.png 1024w\" sizes=\"(max-width: 1254px) 100vw, 1254px\" \/><\/p>\n<ol>\n<li>\u307e\u305a\u306f\u3001AWS\u306e\u30b3\u30f3\u30bd\u30fc\u30eb\u753b\u9762\u306e<strong>Find Services<\/strong>\u304b\u3089&#8221;lambda&#8221;\u3068\u691c\u7d22\u3057\u3066Lambda\u306e\u30b3\u30f3\u30bd\u30fc\u30eb\u753b\u9762\u3078\u79fb\u52d5\u3059\u308b<\/li>\n<li><strong>Create Function<\/strong>\u3092\u30af\u30ea\u30c3\u30af<\/li>\n<li><strong>Author from scratch<\/strong>\u3092\u9078\u629e\u3057\u3001\u95a2\u6570\u540d\u3092\u8a2d\u5b9a (\u4eca\u56de\u306femailToSMS)\u3001Runtime\u306f<strong>Node.js 12.x<\/strong>\u3068\u3059\u308b<\/li>\n<li><strong>Create Function<\/strong>\u3092\u30af\u30ea\u30c3\u30af<\/li>\n<\/ol>\n<h5>zip\u30d5\u30a1\u30a4\u30eb\u306e\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9<\/h5>\n<p>\u95a2\u6570\u3092\u4f5c\u6210\u3067\u304d\u305f\u306e\u3067\u3001\u4eca\u5ea6\u306f\u5148\u307b\u3069\u6e96\u5099\u3057\u305f\u30b3\u30fc\u30c9\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<p><strong>Upload a .zip file<\/strong>\u3092\u9078\u629e\u3057\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture5.png\" alt=\"Upload a .zip file\u3092\u9078\u629e\" width=\"100%\" class=\"aligncenter size-full wp-image-13374\" srcset=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture5.png 1254w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture5-300x59.png 300w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture5-768x150.png 768w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture5-1024x200.png 1024w\" sizes=\"(max-width: 1254px) 100vw, 1254px\" \/><\/p>\n<p>\u5148\u307b\u3069\u4f5c\u6210\u3057\u305fzip\u30d5\u30a1\u30a4\u30eb\uff08Archive.zip\uff09\u3092\u9078\u629e\u3057\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002<\/p>\n<h5>\u74b0\u5883\u5909\u6570\u306e\u8a2d\u5b9a<\/h5>\n<p>\u4eca\u56de\u4f7f\u7528\u3059\u308b\u30b3\u30fc\u30c9\u5185\u3067\u306f\u3001Twilio\u30a2\u30ab\u30a6\u30f3\u30c8\u306e\u91cd\u8981\u306a\u60c5\u5831\u3092\u5909\u6570\u3068\u3057\u3066\u5b9a\u7fa9\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n\u4ee5\u4e0b\u306e\u753b\u9762\u3067\u3001\u30a2\u30ab\u30a6\u30f3\u30c8\u60c5\u5831\u3092\u74b0\u5883\u5909\u6570\u3068\u3057\u3066\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture6.png\" alt=\"\u74b0\u5883\u5909\u6570\u306e\u8a2d\u5b9a\" width=\"100%\" class=\"aligncenter size-full wp-image-13375\" srcset=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture6.png 1433w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture6-300x236.png 300w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture6-768x603.png 768w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture6-1024x804.png 1024w\" sizes=\"(max-width: 1433px) 100vw, 1433px\" \/><\/p>\n<p>\u3053\u3053\u3067\u306f\u3001\u6b21\u306e4\u3064\u306e\u74b0\u5883\u5909\u6570\u3092\u8a2d\u5b9a\u3057\u307e\u3059:<\/p>\n<ol>\n<li><strong>ACCOUNT_SID<\/strong>: Step 1\u3067\u78ba\u8a8d\u3057\u305f\u30a2\u30ab\u30a6\u30f3\u30c8\u60c5\u5831<\/li>\n<li><strong>AUTH_TOKEN<\/strong>: Step 1\u3067\u78ba\u8a8d\u3057\u305f\u30a2\u30ab\u30a6\u30f3\u30c8\u60c5\u5831<\/li>\n<li><strong>FROM<\/strong>: Step 1\u3067\u78ba\u8a8d\u3057\u305f\u96fb\u8a71\u756a\u53f7<\/li>\n<li><strong>DOMAINS<\/strong>: \u3053\u306e\u30b2\u30fc\u30c8\u30a6\u30a7\u30a4\u3078\u306e\u30e1\u30fc\u30eb\u306e\u9001\u4fe1\u5143\u30c9\u30e1\u30a4\u30f3\u3092\u6307\u5b9a\u3059\u308b (\u8907\u6570\u3042\u308b\u5834\u5408\u306f\u30b3\u30f3\u30de\u3067\u533a\u5207\u308b)<\/li>\n<\/ol>\n<p>\u306a\u304a\u3001<strong>DOMAINS<\/strong>\u3067\u6307\u5b9a\u3057\u3066\u3044\u306a\u3044\u30c9\u30e1\u30a4\u30f3\u304b\u3089\u9001\u4fe1\u3057\u305f\u5834\u5408\u3001\u30c9\u30e1\u30a4\u30f3\u8a8d\u8a3c\u304c\u901a\u3089\u305a\u3001SMS\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u751f\u6210\u3055\u308c\u306a\u3044\u3001\u3068\u3044\u3063\u305f\u4ed5\u7d44\u307f\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<h5>API Gateway\u306e\u8a2d\u5b9a<\/h5>\n<p>\u30b3\u30fc\u30c9\u306e\u8a2d\u5b9a\u304c\u5b8c\u4e86\u3057\u307e\u3057\u305f\u3002<br \/>\n\u6b21\u306b\u3001Lambda\u95a2\u6570\u3092\u547c\u3073\u51fa\u3059\u305f\u3081\u306b\u5fc5\u8981\u3068\u306a\u308b\u3001API Gateway\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<p>\u753b\u9762\u306eDesigner\u3067\u3001<strong>Add trigger<\/strong>\u3092\u9078\u629e\u3057\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture7.png\" alt=\"Add trigger\u3092\u9078\u629e\" width=\"100%\" class=\"aligncenter size-full wp-image-13376\" srcset=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture7.png 970w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture7-300x129.png 300w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture7-768x329.png 768w\" sizes=\"(max-width: 970px) 100vw, 970px\" \/><\/p>\n<p><strong>API Gateway<\/strong>\u3092\u9078\u629e\u3057\u3001API\u306b\u306f\u4eca\u56de\u4f5c\u6210\u3057\u305f<strong>emailToSMS-API<\/strong>\u3092\u3001<br \/>\nDeployment stage\u306b<strong>default<\/strong>\u3001Security\u306b<strong>Open<\/strong>\u3092\u9078\u629e\u3057\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture8.png\" alt=\"Add trigger\" width=\"100%\" class=\"aligncenter size-full wp-image-13377\" srcset=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture8.png 1162w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture8-300x290.png 300w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture8-768x744.png 768w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture8-1024x991.png 1024w\" sizes=\"(max-width: 1162px) 100vw, 1162px\" \/><\/p>\n<p><strong>Add<\/strong>\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068API Gateway\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3059\u3002<br \/>\n\u4ee5\u4e0b\u306e\u753b\u9762\u306b\u8868\u793a\u3055\u308c\u308bAPI\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u306eURL\u3092\u30b3\u30d4\u30fc\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture9.png\" alt=\"API Gateway\" width=\"100%\" class=\"aligncenter size-full wp-image-13378\" srcset=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture9.png 1612w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture9-300x165.png 300w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture9-768x422.png 768w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture9-1024x562.png 1024w\" sizes=\"(max-width: 1612px) 100vw, 1612px\" \/><\/p>\n<p>\u6700\u5f8c\u306b\u3001\u4e0a\u306e\u753b\u9762\u4e2d\u306e<strong>emailToSMS-API<\/strong>\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066API Gateway\u306e\u30b3\u30f3\u30bd\u30fc\u30eb\u753b\u9762\u306b\u79fb\u52d5\u3057\u3001Settings\u306e<strong>Binary Media Types<\/strong>\u306b<span style=\"background-color:#d3d3d3\">multipart\/form-data<\/span>\u304c\u8ffd\u52a0\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture10.png\" alt=\"Settings\" width=\"100%\" class=\"aligncenter size-full wp-image-13379\" srcset=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture10.png 1802w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture10-300x187.png 300w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture10-768x479.png 768w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture10-1024x639.png 1024w\" sizes=\"(max-width: 1802px) 100vw, 1802px\" \/><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture11.png\" alt=\"Binary Media Types\" width=\"100%\" class=\"aligncenter size-full wp-image-13380\" srcset=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture11.png 1858w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture11-300x60.png 300w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture11-768x153.png 768w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture11-1024x204.png 1024w\" sizes=\"(max-width: 1858px) 100vw, 1858px\" \/><\/p>\n<p>\u3053\u308c\u3067\u3001\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u305fLambda\u95a2\u6570\u3092\u547c\u3073\u51fa\u3059\u65b0\u3057\u3044\u30eb\u30fc\u30c8\u304c\u5b8c\u6210\u3057\u307e\u3057\u305f\uff01<br \/>\n\u6b21\u306b\u3001\u53d7\u4fe1\u3057\u305f\u30e1\u30fc\u30eb\u306e\u30c7\u30fc\u30bf\u3092\u3053\u306e\u30eb\u30fc\u30c8\u306bPOST\u9001\u4fe1\u3059\u308b\u3088\u3046\u306bSendGrid\u306e\u8a2d\u5b9a\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<h4>Step 4: SendGrid\u306e\u8a2d\u5b9a<\/h4>\n<p>\u8ee2\u9001\u6a5f\u80fd\u3068\u30eb\u30fc\u30c8\u306e\u6574\u5099\u304c\u3067\u304d\u305f\u306e\u3067\u3001\u3042\u3068\u306f\u30e1\u30fc\u30eb\u3092SendGrid\u3067\u53d7\u4fe1\u3057\u3066\u3001\u3053\u306e\u6a5f\u80fd\u3092\u547c\u3073\u51fa\u3059\u4ed5\u7d44\u307f\u3092\u8a2d\u5b9a\u3059\u308b\u3060\u3051\u3067\u3059\uff01<br \/>\n\u3053\u3053\u3067\u767b\u5834\u3059\u308b\u306e\u304c\u3001SendGrid\u306e<a href=\"https:\/\/sendgrid.kke.co.jp\/docs\/User_Manual_JP\/Settings\/parse.html\" rel=\"noopener\" target=\"_blank\">Inbound Parse Webhook<\/a>\u6a5f\u80fd\u3067\u3059\u3002<br \/>\n\uff08SendGrid\u30a2\u30ab\u30a6\u30f3\u30c8\u3092\u307e\u3060\u6301\u3063\u3066\u3044\u306a\u3044\u65b9\u306f<a href=\"https:\/\/sendgrid.kke.co.jp\/app?p=signup.index\" rel=\"noopener\" target=\"_blank\">\u3053\u3061\u3089<\/a>\u3067\u4f5c\u6210\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002\uff09<\/p>\n<p>Inbound Parse Webhook\u306f\u3001\u7279\u5b9a\u306e\u30db\u30b9\u30c8\u3078\u306e\u30e1\u30fc\u30eb\u3092SendGrid\u304c\u53d7\u3051\u53d6\u308a\u3001\u305d\u306e\u30e1\u30fc\u30eb\u306e\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u3055\u308c\u305fURL\u3078POST\u3059\u308b\u6a5f\u80fd\u3067\u3059\u3002<\/p>\n<p>\u307e\u305a\u306f\u3001SendGrid\u3067\u30e1\u30fc\u30eb\u3092\u53d7\u3051\u308b\u305f\u3081\u306b\u30c9\u30e1\u30a4\u30f3\u3092\u6e96\u5099\u3057\u307e\u3057\u3087\u3046\uff01<br \/>\n\u30c9\u30e1\u30a4\u30f3\u6e96\u5099\u306e\u624b\u9806\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059:<\/p>\n<ol>\n<li>\u30e1\u30fc\u30eb\u3092\u53d7\u4fe1\u3059\u308b\u30c9\u30e1\u30a4\u30f3\u306e\u53d6\u5f97\uff08<a href=\"https:\/\/www.freenom.com\/ja\/index.html\" rel=\"noopener\" target=\"_blank\">Freenom<\/a>\u3001<a href=\"https:\/\/www.onamae.com\/\" rel=\"noopener\" target=\"_blank\">\u304a\u540d\u524d.com<\/a>\u306a\u3069\uff09<\/li>\n<li>Domain Authentication\u306e\u8a2d\u5b9a<\/li>\n<li>MX\u30ec\u30b3\u30fc\u30c9\u306e\u8a2d\u5b9a<\/li>\n<\/ol>\n<p>\u4ee5\u4e0a\u304c\u5b8c\u4e86\u3057\u305f\u3089\u3001Inbound Parse Webhook\u306e\u8a2d\u5b9a\u3092\u884c\u3063\u3066\u3044\u304d\u307e\u3059\uff01<br \/>\n\u8a2d\u5b9a\u306e\u8a73\u7d30\u306b\u3064\u3044\u3066\u306f\u3001<a href=\"https:\/\/sendgrid.kke.co.jp\/blog\/?p=12114\" rel=\"noopener\" target=\"_blank\">\u3053\u3061\u3089\u306e\u30d6\u30ed\u30b0<\/a>\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><a href=\"https:\/\/app.sendgrid.com\/\" rel=\"noopener\" target=\"_blank\">SendGrid\u306e\u30b3\u30f3\u30bd\u30fc\u30eb\u753b\u9762<\/a>\u306e<strong>Settings \/ Inbound Parse<\/strong>\u3092\u9078\u629e\u3057\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture12.png\" alt=\"Settings \/ Inbound Parse\u3092\u9078\u629e\" width=\"40%\" class=\"aligncenter size-full wp-image-13381\" srcset=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture12.png 354w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture12-235x300.png 235w\" sizes=\"(max-width: 354px) 100vw, 354px\" \/><\/p>\n<p><strong>Add Host &#038; URL<\/strong>\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture13.png\" alt=\"Add Host &amp; URL\" width=\"70%\" class=\"aligncenter size-full wp-image-13382\" srcset=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture13.png 862w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture13-269x300.png 269w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture13-768x857.png 768w\" sizes=\"(max-width: 862px) 100vw, 862px\" \/><\/p>\n<p><strong>Destination URL<\/strong>\u306b\u306f\u3001\u524d\u306e\u30b9\u30c6\u30c3\u30d7\u3067\u30b3\u30d4\u30fc\u3057\u305f\u3001API\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u306eURL\u3092\u5165\u529b\u3057\u307e\u3059\u3002<\/p>\n<p>Inbound Parse Webhook\u3067\u8a2d\u5b9a\u3057\u305f\u30c9\u30e1\u30a4\u30f3\u306b\u5411\u3051\u305f\u30e1\u30fc\u30eb\u306f\u3059\u3079\u3066\u3001\u76ee\u7684\u306eURL\u3078POST\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u3067\u6e96\u5099\u306f\u5b8c\u4e86\u3067\u3059\uff01<br \/>\n\u305d\u308c\u3067\u306f\u3001\u30e1\u30fc\u30eb\u3092\u9001\u3063\u3066\u307f\u307e\u3057\u3087\u3046\uff01<\/p>\n<h3>\u7d50\u679c<\/h3>\n<p>\u30e1\u30fc\u30eb\u304b\u3089SMS\u3078\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u5c4a\u304d\u307e\u3057\u305f\uff01<\/p>\n<p>Email:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture14.png\" alt=\"\u7d50\u679c\uff08 Email\uff09\" width=\"60%\" class=\"aligncenter size-full wp-image-13383\" srcset=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture14.png 1116w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture14-300x199.png 300w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture14-768x510.png 768w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture14-1024x680.png 1024w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture14-225x150.png 225w\" sizes=\"(max-width: 1116px) 100vw, 1116px\" \/><\/p>\n<p>SMS:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture15.png\" alt=\"\u7d50\u679c\uff08SMS\uff09\" width=\"60%\" class=\"aligncenter size-full wp-image-13384\" srcset=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture15.png 1462w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture15-300x182.png 300w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture15-768x466.png 768w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/12\/Picture15-1024x621.png 1024w\" sizes=\"(max-width: 1462px) 100vw, 1462px\" \/><\/p>\n<h3>\u9001\u4fe1\u5148\u306e\u96fb\u8a71\u756a\u53f7\u306b\u3064\u3044\u3066<\/h3>\n<p>\u4ee5\u4e0a\u306e\u624b\u9806\u3067SMS\u3092\u53d7\u3051\u53d6\u308c\u306a\u3044\u3068\u3044\u3046\u65b9\u306f\u3001to\u30a2\u30c9\u30ec\u30b9\u306e\u30ed\u30fc\u30ab\u30eb\u30d1\u30fc\u30c8\u306e\u96fb\u8a71\u756a\u53f7\u3092\u78ba\u8a8d\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>Twilio\u304c\u6271\u3048\u308b\u306e\u306f\u3001<a href=\"https:\/\/www.twilio.com\/docs\/glossary\/what-e164\" rel=\"noopener\" target=\"_blank\">E164\u30d5\u30a9\u30fc\u30de\u30c3\u30c8<\/a>\u306b\u6cbf\u3063\u305f\u96fb\u8a71\u756a\u53f7\u306e\u307f\u3067\u3059:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n&#x5B;+] &#x5B;country code] &#x5B;subscriber number including area code]\r\n<\/pre>\n<p>\u306a\u306e\u3067\u3001<strong>080XXXXXXXX<\/strong>\u306e\u96fb\u8a71\u756a\u53f7\u306b\u9001\u308a\u305f\u3044\u5834\u5408\u306f\u3001\u30ed\u30fc\u30ab\u30eb\u30d1\u30fc\u30c8\u3092<strong>+8180XXXXXXXX<\/strong>\u306b\u76f4\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u6700\u5f8c\u306b\u3001Twilio\u306e\u30c8\u30e9\u30a4\u30a2\u30eb\u30a2\u30ab\u30a6\u30f3\u30c8\u3092\u304a\u4f7f\u3044\u306e\u65b9\u306f\u3001\u9001\u4fe1\u5148\u3068\u306a\u308b<a href=\"https:\/\/jp.twilio.com\/docs\/usage\/tutorials\/how-to-use-your-free-trial-account#verify-your-personal-phone-number\" rel=\"noopener\" target=\"_blank\">\u96fb\u8a71\u756a\u53f7\u306e\u691c\u8a3c\u8a2d\u5b9a<\/a>\u3092\u304a\u5fd8\u308c\u306a\u304f\uff01<\/p>\n<h3>\u306a\u305c\u3001Twilio Functions\u3092\u4f7f\u308f\u306a\u304b\u3063\u305f\u306e\u304b\uff1f<\/h3>\n<p>\u4eca\u56de\u306f\u3001AWS\u3092\u4f7f\u3063\u3066SMS\u8ee2\u9001\u6a5f\u80fd\u3092\u5b9f\u88c5\u3057\u307e\u3057\u305f\u304c\u3001\u672c\u6765\u3067\u3042\u308c\u3070\u3001Twilio\u306e<a href=\"https:\/\/jp.twilio.com\/docs\/runtime\/functions\" rel=\"noopener\" target=\"_blank\">Twilio Functions<\/a>\u3068\u3044\u3046Lambda\u3068\u540c\u69d8\u306e\u30b5\u30fc\u30d0\u30ec\u30b9\u5b9f\u884c\u74b0\u5883\u306e\u30b5\u30fc\u30d3\u30b9\u3092\u7528\u3044\u3066\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u69cb\u7bc9\u304c\u3067\u304d\u305f\u306f\u305a\u3067\u3059\u3002<\/p>\n<p><a href=\"https:\/\/www.twilio.com\/blog\/serverless-email-sms-gateway-lambda\" rel=\"noopener\" target=\"_blank\">\u5f15\u7528\u5143\u306e\u30d6\u30ed\u30b0\u8a18\u4e8b<\/a>\u306b\u3088\u308b\u3068\u3001<\/p>\n<aside>\nUnfortunately, binary content types such as multipart\/form-data is not supported with Twilio Functions along with many other cloud function solutions. AWS made some recent changes to API-Gateway that enable binary content types.<br \/>\n<\/aside>\n<p>\u3068\u306e\u3053\u3068\u3067\u3001Twilio Functions\u306f<span style=\"background-color:#d3d3d3\">multipart\/form-data<\/span>\u306e\u3088\u3046\u306abinary content type\u306b\u306f\u5bfe\u5fdc\u3057\u3066\u3044\u306a\u3044\u305f\u3081\u3001\u4eca\u56de\u306f\u5bfe\u5fdc\u6e08\u307f\u3067\u3042\u308bAWS\u3092\u4f7f\u3044\u307e\u3057\u305f\u3002<\/p>\n<h3>\u307e\u3068\u3081<\/h3>\n<p>\u4eca\u56de\u306f\u3001SendGrid\u3068Twilio\u3001Lambda\u3092\u9023\u643a\u3055\u305b\u3066\u30e1\u30fc\u30eb\u3092SMS\u3068\u3057\u3066\u30b9\u30de\u30db\u306b\u8ee2\u9001\u3057\u307e\u3057\u305f\u3002<br \/>\n<a href=\"https:\/\/www.twilio.com\/blog\/serverless-email-sms-gateway-lambda\" rel=\"noopener\" target=\"_blank\">\u5f15\u7528\u5143\u306e\u30d6\u30ed\u30b0\u8a18\u4e8b<\/a>\u306b\u3088\u308b\u3068\u3001\u30e1\u30fc\u30eb\u3092SMS\u306b\u8ee2\u9001\u3059\u308b\u30ec\u30ac\u30b7\u30fc\u306a\u30b7\u30b9\u30c6\u30e0\u3092\u30b9\u30b1\u30fc\u30eb\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u305f\u3044\u3068\u3044\u3046\u304a\u5ba2\u3055\u3093\u306e\u8981\u671b\u306b\u5fdc\u3048\u308b\u305f\u3081\u3001\u4eca\u56de\u306e\u4ed5\u7d44\u307f\u3092\u69cb\u7bc9\u3057\u305f\u305d\u3046\u3067\u3059\u3002<\/p>\n<p>\u79c1\u81ea\u8eab\u306f\u3001SendGrid\u3068Twilio\u306e\u4e21\u65b9\u3092\u6271\u3063\u305f\u984c\u6750\u3067AWS\u306e\u52c9\u5f37\u3082\u3057\u305f\u3044\u3001\u3068\u3044\u3046\u304b\u306a\u308a\u6b32\u5f35\u308a\u306a\u52d5\u6a5f\u3067\u3053\u306e\u30d6\u30ed\u30b0\u8a18\u4e8b\u306e\u5185\u5bb9\u3092\u8a66\u3057\u307e\u3057\u305f\u304c\u3001\u305d\u308c\u3089\u5168\u3066\u306b\u89e6\u308c\u308b\u3053\u3068\u304c\u3067\u304d\u305f\u306e\u3067\u3001\u3068\u3066\u3082\u826f\u3044\u5b66\u7fd2\u6750\u6599\u306b\u306a\u3063\u305f\u3068\u601d\u3044\u307e\u3059\u3002\u305c\u3072\u3001\u7686\u3055\u3093\u3082\u8a66\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u65b0\u4eba\u306e\u9752\u6728\u3067\u3059\uff01 \u4eca\u56de\u306f\u3001Twilio\u306e\u30d6\u30ed\u30b0\u300cBuild a Serverless Email to SMS Gateway with Twilio and AWS Lambda\u300d\u3067\u53d6\u308a\u4e0a\u3052\u3089\u308c\u3066\u3044\u308b\u3001SendGrid <a class=\"read-more\" href=\"https:\/\/sendgrid.kke.co.jp\/blog\/?p=13367\">&#8230;\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":22,"featured_media":15890,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[11],"tags":[],"class_list":["post-13367","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technical"],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/sendgrid.kke.co.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/13367","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sendgrid.kke.co.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sendgrid.kke.co.jp\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sendgrid.kke.co.jp\/blog\/index.php?rest_route=\/wp\/v2\/users\/22"}],"replies":[{"embeddable":true,"href":"https:\/\/sendgrid.kke.co.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=13367"}],"version-history":[{"count":10,"href":"https:\/\/sendgrid.kke.co.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/13367\/revisions"}],"predecessor-version":[{"id":15895,"href":"https:\/\/sendgrid.kke.co.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/13367\/revisions\/15895"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sendgrid.kke.co.jp\/blog\/index.php?rest_route=\/wp\/v2\/media\/15890"}],"wp:attachment":[{"href":"https:\/\/sendgrid.kke.co.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=13367"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sendgrid.kke.co.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=13367"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sendgrid.kke.co.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=13367"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}