Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Amazon Pinpointを用いてEmailやLINE通知を自動化した基盤 / Story...
Search
hayato miyoshi
October 03, 2019
Technology
2
1.7k
Amazon Pinpointを用いてEmailやLINE通知を自動化した基盤 / Story of CRM platform using LINE by Amazon Pinpoint
【スナックミー】
Real Food(リアルフード)のみからできたおやつのパーソナライズ型サブスクリプションBOX
https://snaq.me
hayato miyoshi
October 03, 2019
Tweet
Share
More Decks by hayato miyoshi
See All by hayato miyoshi
一歩踏み出す技術活用 日常業務を見直す試み / snaqme-chuo-tech-2024.08.20
miyoshihayato
0
64
ビジネスを加速する技術選定 / snaqme-chuo-tech-2024.04.12
miyoshihayato
1
100
ROSCAFE TECH NIGHT 2023.12.20
miyoshihayato
1
150
AWS Summit Tokyo 2023.04.21
miyoshihayato
1
1.1k
Amazon Pinpointを用いて、LINEとメール配信のCRM設計 / AWS Dev Day 2022 B-2
miyoshihayato
3
2.2k
おやつ体験とパーソナライズ ~苦悩と効果と今後~ / snaq.me 20210218D9
miyoshihayato
0
110
スナックミー会社紹介資料(エンジニア募集) / snaq.me engineer
miyoshihayato
0
24k
snaq.me / Startup Architecture of the year 2019
miyoshihayato
2
6.1k
素早くおやつ(間食)の 新ブランドを立ち上げるためのLambda活用法 / lambda utilizing method
miyoshihayato
0
190
Other Decks in Technology
See All in Technology
大規模データ基盤チームのオンプレTiDB運用への挑戦 / dpu-tidb
cyberagentdevelopers
PRO
1
110
WINTICKETアプリで実現した高可用性と高速リリースを支えるエコシステム / winticket-eco-system
cyberagentdevelopers
PRO
1
190
【若手エンジニア応援LT会】AWS Security Hubの活用に苦労した話
kazushi_ohata
0
160
신뢰할 수 있는 AI 검색 엔진을 만들기 위한 Liner의 여정
huffon
0
310
クライアントサイドでよく使われる Debounce処理 をサーバサイドで3回実装した話
yoshiori
1
150
pandasはPolarsに性能面で追いつき追い越せるのか
vaaaaanquish
4
4.5k
AWSコンテナ本出版から3年経った今、もし改めて執筆し直すなら / If I revise our container book
iselegant
15
3.9k
2024-10-30-reInventStandby_StudyGroup_Intro
shinichirokawano
1
620
Automated Promptingを目指すその前に / Before we can aim for Automated Prompting
rkaga
0
110
10分でわかるfreeeのQA
freee
1
3.4k
いまならこう作りたい AWSコンテナ[本格]入門ハンズオン 〜2024年版 ハンズオンの構想〜
horsewin
9
2.1k
20241031_AWS_生成AIハッカソン_GenMuck
tsumita
0
110
Featured
See All Featured
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.2k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
The World Runs on Bad Software
bkeepers
PRO
65
11k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
43
6.6k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
The Cult of Friendly URLs
andyhume
78
6k
Making Projects Easy
brettharned
115
5.9k
GraphQLの誤解/rethinking-graphql
sonatard
66
9.9k
The Power of CSS Pseudo Elements
geoffreycrofte
72
5.3k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2.1k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Side Projects
sachag
452
42k
Transcript
Amazon PinpointΛ༻͍ͯEmailLINE௨Λ ࣗಈԽͨ͠ج൫ 2019.10.03 AWS DevDay Tokyo 2019 C-4 גࣜձࣾεφοΫϛʔ
CTO & co-founder ࡾ ൏ਓ
• גࣜձࣾεφοΫϛʔ • ࡾ ൏ਓ co-founder & CTO • ౦ژੜ·Ε౦ژҭͪ
• ݐஙग़ΤϯδχΞ • τϥΠΞεϩϯϚϥιϯΛᅂΉ @miyoshihayato
1. snaq.me(εφοΫϛʔ) ʹ͍ͭͯ 1,980ԁ (੫ࠐ) 100छҎ্͔Β8छͷ͓ͭΛҰਓͻͱΓʹηϨΫτ͓ͯ͠ಧ͚ Real Food͔Β࡞ͬͨɺඒຯͯ͘͠Χϥμʹ༏͍͓ͭ͠Λ͓ҰਓͻͱΓʹ ΧελϚΠζ͓ͯ͠ಧ͚͢ΔαϒεΫϦϓγϣϯαʔϏε
Mission Vison ৽͍͓ͭ͠ମݧΛ͠ɺ ͓ͭͷ࣌ؒΛՁͷ͋Δͷʹ͢Δɻ ඦԯԁنͷ Real FoodεφοΫࢢΛΓɺ ͦͷࢢͷφϯόʔ1ϒϥϯυͱͳΔɻ ӫཆՁ͕ߴ͘ɺͦΕͰ͍ͯඒຯ͠͞ʹଥڠ͠ͳ͍εφοΫʹΑͬͯɺ͓ͭͦͷͷ࣭Λ্͛Δɻ ·ͨɺϞϊ͚ͩͰͳ͘ɺ৽͍͓ͭ͠ମݧΛσβΠϯ͠ɺ͓ͭͷ࣌ؒͷՁΛ্ͤ͞Δɻ
ͦΕʹΑͬͯɺ͓ͭͷ͕࣌ؒ࠼ΓͱͳΓɺ๛͔ͳੜ׆Λ࣮ݱ͢Δɻ Real FoodεφοΫͱɺܗ͋ΔReal FoodͷΈ͔Β࡞ΒΕͨεφοΫɻ ૉࡐຊདྷ͕࣋ͭӫཆͱඒຯ͠͞Λ࠷େݶʹ׆͔͠ɺਓతͳݪྉԽֶ࣭Θͳ͍ɻ ӫཆՁ͕ߴ݈͘߁తͰɺͦΕͰ͍ͯඒຯ͠͞ʹଥڠ͠ͳ͍ɻ
εφοΫϛʔͷ։ൃج४ Made From Real Food Խֶ࣭ʹཔΒͣɺࣗવͳૉࡐ͔Βඒຯ͠͞ͱӫཆΛҾ͖ग़͢ Create a New Culture
৽͍͠৯จԽ৯श׳Λ࡞Γग़͠͏Δ Without Compromise ඒຯ͠͞ʹଥڠ͠ͳ͍
υϥΠϑϧʔπɾφοπ τϨΠϧϛοΫε ম͖՛ࢠ νϣί νοϓε ถ՛ ͦͷଞ ϑϧʔπ՛ࢠ قઅʹ߹Θͤͨ100SKUҎ্Λৗ࣌ࡏݿɻຖ݄10ʙ20%ΛೖΕସ͑ɻ 1.
snaq.me(εφοΫϛʔ) ʹ͍ͭͯ
1. snaq.me(εφοΫϛʔ) ʹ͍ͭͯ ࢦࣔॻ ࡞ ࡏݿొ ΞαΠϯ ϐοΩϯά ൃૹ
͔Βൃૹ४උ·ͰҰ؏
1. snaq.me(εφοΫϛʔ) ʹ͍ͭͯ ੳ TOBDLCPY ͓ͭͷධՁ/ ϦΫΤετ ৽։ൃ ͓ͭͷA/Bςετ ͓ಧ͚͢Δ͓ͭΛܾఆ
։ൃͷओͳπʔϧ - αʔόʔαΠυ : Ruby on Rails (PHP) - ϑϩϯτΤϯυݴޠ
: BabelɺҰ෦TypeScript - ϑϩϯτΤϯυ : React, Redux, webpack - UIίϯϙʔωϯτΧλϩά : Storybook - σʔλੳ : python - σʔλϕʔε : Aurora, DynamoDB - Πϯϑϥ : AWS - ։ൃڥ : Vagrant, Docker - ϦϙδτϦཧ : GitHub / codecommit - CI / CDͳͲ : CodePipeLine / jest / RSpec - ίϛϡχέʔγϣϯ : Qiita:Team, Slack
Amazon PinpointΛ༻͍ͯEmailLINE௨ΛࣗಈԽͨ͠ج൫ͷ ͔͜͜Βຊ
ͦͦɺͳͥLINE(νϟοτUI)Λ༻͍ͨͷ͔ʁ
2015ͷۀલ͔ΒҎԼͷΑ͏ʹߟ͍͑ͯ·ͨ͠ • UX͕໌֬ • νϟοτUIएஉঁ͑Δ • ͜Ε͔ΒνϟοτUI͕ϕʔεʹͳΔՄೳੑ͕͋Δ • LINE͔ΒpushͰ͖Δ •
LINE্ͩͱϑϨΩγϒϧʹUIΛૢΕͳ͍ͷͰwebʹҊ͢ΔΑ͏ʹͨ͠
εφοΫϛʔॳʁ
ॳ
ΓͱΓશͯνϟοτܗࣜ ධՁϦΫΤετ
νϟοτUI͍͍ͱ͜Ζ͚ͩ͡Όͳ͍ త͕͔ͬ͠Γ͍ͯ͠Δ߹ճΓ͘Ͳ͍ ॳճɺॳݟϢʔβʔʹνϟοτͰҊ͢Δͱ͍উख্ ⭕ ❌ 2प(ֶशࡁΈͷUIUX) ❌
CSͱͯ͠ͷίϛϡχέʔγϣϯ1ຊʹ ͦͷͨΊ
LINE Messaging API ༻͍͍ͯΔͷ͕
• اۀͱϢʔβʔͷํίϛϡχέʔγϣϯ͕Մೳ • ϓογϡϝοηʔδͱԠϝοηʔδ • 1ର1ɺάϧʔϓͰτʔΫՄೳ • ͞·͟·ͳঢ়گʹ߹ΘͤͨϝοηʔδλΠϓ • ςΩετ
• ελϯϓ • Ի • ը૾ͳͲ LINE Messaging APIͰͰ͖Δ͜ͱ
ߏਤ Ϣʔβʔૹ৴ ελοϑૹ৴ ελοϑ௨ Amazon Route 53 Elastic Load Balancing
Elastic Load Balancing EC2 EC2 Amazon Aurora
ߏਤ Ϣʔβʔૹ৴ ελοϑૹ৴ ελοϑ௨ Amazon Route 53 Elastic Load Balancing
Elastic Load Balancing EC2 EC2 Amazon Aurora
ߏਤ Ϣʔβʔૹ৴ ελοϑૹ৴ ελοϑ௨ Amazon Route 53 Elastic Load Balancing
Elastic Load Balancing EC2 EC2 Amazon Aurora
ૹड৴Λ͚͍ͯΔཧ༝ Ϣʔβʔ͔Βͷϝοηʔδड৴ઈରʂམͱͤͳ͍
• αʔϏε͕άϩʔε͢ΕɺCS૿͢ඞཁ͕͋Δ • Ͳ͜·ͰΞτόϯυ(ελοϑൃ৴)Λߦ͏͔ • ͕ͩɺϢʔβʔͱͷଟ͍࣋ͪͨ͘ • ৽͍͠ࢪࡦΛࢼ͍ͨ͠ ͳͲ ՝
• αʔϏε͕άϩʔε͢ΕɺCS૿͢ඞཁ͕͋Δ • Ͳ͜·ͰΞτόϯυ(ελοϑൃ৴)Λߦ͏͔ • ͕ͩɺϢʔβʔͱͷଟ͍࣋ͪͨ͘ • ৽͍͠ࢪࡦΛࢼ͍ͨ͠ ͳͲ ՝
1ର1ͷରԠ͠ɺ1ରଟΛͰ͖ΔΈͷߏங Ϣʔβʔͱ͢Δʹ1า(௨)͕େࣄͳͷͰ
ηάϝϯτରͷ1௨ awsΛ༻͍ͨγεςϜ ͦͷޙ1ର1Ͱ ϝοηʔδͷΓऔΓ ͜͏͍͏͜ͱ
ηάϝϯτͨ͠Ϣʔβʔ৴ΛࣗಈԽͰ͖Δج൫͕ཉ͍͠
Amazon Pinpoint
Amazon Pinpoint ͱ Τϯήʔδϝϯτνϟωϧ ϝοηʔδΛͻͱͭͷνϟωϧ͔ɺଟ͘ͷνϟωϧܦ༝ͰૹΔ͔ʹ͔͔ΘΒͣɺੈքதͷԿඦສͷސ٬ʹ؆୯ Ͱ৴པੑߴ͘ϝοηʔδΛಧ͚Δ͜ͱ͕Ͱ͖·͢ɻ Τϯήʔδϝϯτཧ దͳސ٬ʹɺదͳϝοηʔδΛɺదͳλΠϛϯάͰɺదͳνϟωϧΛ௨ͯ͠ૹ͍ͬͯͩ͘͞ɻ ੳ ސ٬ͱوࣾͷΤϯήʔδϝϯτʹؔ࿈ͨ͠σʔλΛूɺՄࢹԽɺΧελϚΠζɻ
ࢀর : https://aws.amazon.com/jp/pinpoint/
Amazon Pinpoint ͱ Τϯήʔδϝϯτνϟωϧ EϝʔϧɺԻɺSMSɺϓογϡ௨ɺ֦ுػೳ(LINEͳͲ) Τϯήʔδϝϯτཧ ΩϟϯϖʔϯͷΑ͏ʹಛఆͷରऀηάϝϯτʹૹ৴͢ΔͷͰͳ͘ɺಛఆͷड৴ऀʹૹ৴͢ΔΦϯσϚϯυϝο ηʔδΛૹΔ͜ͱՄೳ ੳ ސ٬σʔλͷऩूͱཧղɺ͓Αͼσʔλʹج͍ͮͨߦಈɺΤϯήʔδϝϯτͷऔΓΈͷύϑΥʔϚϯεʹର͠
ͯɺ͞·͟·ͳੳ͕Մೳ ࢀর : https://aws.amazon.com/jp/pinpoint/
Amazon Pinpoint ͱ ࢀর : https://docs.aws.amazon.com/ja_jp/aws-mobile/latest/developerguide/mobile-hub-add-aws-mobile-analytics.html
Amazon Pinpoint Ͱemail/push௨ ͷϢʔεέʔε AWS Batch Amazon Simple Storage Service
(S3) Amazon Pinpoint લॲཧ ηάϝϯτͷϢʔβʔΛ S3ʹΞοϓϩʔυ ࣌ؒࢦఆ or ଈ࣌৴
• jsoncsvϑΝΠϧ͕͋ΕGUI͔Βૢ࡞͢Δ͜ͱՄೳ • ࣌ؒࢦఆ or ଈ࣌৴͕Մೳ • 1ඵؒʹ0 ~ 25,000௨·Ͱ৴Λม͑Β͑Δ
• ։෧ClickҎ֎ͷੳΛҎͰੳͯ͘͠ΕΔ • ϑΝωϧੳͰ͖Δ & Amazon Personalize Amazon Pinpointͷخ͍͠ϙΠϯτ ײͰ৮ΕΔ ༧৴(batchॲཧ)ۓٸੑͷߴ͍৴(ใχϡʔεͳͲ) ΞΫηεΛίϯτϩʔϩͰ͖Δ ͨͩૹΔ͚ͩ͡Όͳ͘ɺͦͷޙͷΞΫγϣϯʹͭͳ͛ΒΕΔ ͞·͟·ͳCVRௐ͕ࠪՄೳ ϑΝωϧੳ
Ͳ͏͍͏ߏਤʹ͠Α͏͔ʁʁ
Email or LINE Ͱ௨͍ͨ͠
LINE௨Λ͢ΔʹAWS LambdaΛ༻ͨ͠ΧελϜνϟωϧͰͰ͖ΔΒ͍͠ ※ ࠓ(201910݄ݱࡏ)ύϒϦοΫϕʔλ൛ͳͷͰ༷มߋͷՄೳੑ͋Γ
Amazon Pinpoint౦ژϦʔδϣϯͰར༻Ͱ͖ͳ͍ ※ ࠓ(201910݄ݱࡏ)
Amazon PinpointΛىಈͤ͞ΔʹͲ͏͠Α͏ σʔλ౦ژϦʔδϣϯʹ͋Δ
AWS Step FunctionsͰཧͰ͖Δʁ AWS Lambdaʁ
AWS Step FunctionsAWS LambdaϦʔδϣϯؒΛͭͳ͛ΒΕͳ͍
ҟͳΔϦʔδϣϯͷAWS LambdaΛར༻͢Δํ๏͕͋Δ ࢀর : https://dev.classmethod.jp/cloud/trigger-lambda-on-other-regions/
• ϢʔβʔΞϓϦέʔγϣϯͷݺͼग़͠ɺPC/αʔόʔ্ͷAWS SDK·ͨεϚʔτ ্ͷAWS Mobile SDKͰՄೳ • AWSͷ௨αʔϏεͰ͋ΔSNSͷ௨ઌͱͯ͠AWS LambdaΛࢦఆ͢Δ •
S3 Cross-Region ReplicationͰAWS Lambdaؔͱಉ͡ϦʔδϣϯʹόέοτΛෳ ͠ɺෳόέοτʹAWS LambdaͷΠϕϯτ௨Λઃఆ͢Δ ҟͳΔϦʔδϣϯͷAWS LambdaΛར༻͢Δํ๏ ࢀর : https://dev.classmethod.jp/cloud/trigger-lambda-on-other-regions/
• ϢʔβʔΞϓϦέʔγϣϯͷݺͼग़͠ɺPC/αʔόʔ্ͷAWS SDK·ͨεϚʔτ ্ͷAWS Mobile SDKͰՄೳ • AWSͷ௨αʔϏεͰ͋ΔSNSͷ௨ઌͱͯ͠AWS LambdaΛࢦఆ͢Δ •
S3 Cross-Region ReplicationͰAWS Lambdaؔͱಉ͡ϦʔδϣϯʹόέοτΛෳ ͠ɺෳόέοτʹAWS LambdaͷΠϕϯτ௨Λઃఆ͢Δ ҟͳΔϦʔδϣϯͷAWS LambdaΛར༻͢Δํ๏͕͋Δ ࢀর : https://dev.classmethod.jp/cloud/trigger-lambda-on-other-regions/
ηάϝϯτใ͔Β৴·ͰͷϑϩʔAWS Step FunctionsͰ͍ͨ͠
Amazon Pinpoint ηάϝϯτΛΠϯϙʔτ͢Δʹ࣌ؒΛཁ͢Δ(࣌ؒͰͳ͍)
ΧελϜνϟωϧͰىಈ͞ΕͨAWS Lambda50໊Ͱ1Lambdaىಈ͢Δ
• σʔλϕʔε͕౦ژϦʔδϣϯͷͨΊLambdaܦ༝ͰPinpointΛىಈͰ͖ͳ͍ • ৴ͷϫʔΫϑϩʔΛStep FunctionsΛ༻͍Δ༧ఆ͕ϦʔδϣϯؒsetͰ͖ͳ͍ • ηάϝϯτͨ͠δϣϒΛΠϯϙʔτྃʹ͕͔͔࣌ؒΔ • ࠷ޙͷLINE৴࣌Ͱ৴ਓ /
50໊ͷLambda্ཱ͕͕ͪΔ • ଐੑͷίϯτϩʔϧ AWS LambdaͱࣗಈԽʹ͏՝ ΦϨΰϯͳͲಉϦʔδϣϯͰ͋ΕىಈՄೳ Pinpointͷϑϩʔ͚ͩStep FunctionsΛ༻͍ΔͳͲ ΠϯϙʔτྃΛϙʔϦϯά͢Δඞཁ͕͋Δ ্ݶ؇·ͨಉ࣌ʹ50,000ਓʹૹΒͳ͚Εجຊͳ͍ ଐੑ40ݸ·ͰͳͷͰɺܭըతͳઃܭ͕ඞཁ
AWS Step Functions Amazon S3 AWS Lambda AWS Lambda Amazon
DynamoDB AWS Lambda AWS Lambda AWS Lambda DONE import? ৴ ϑϩʔ Amazon Simple Notification Service Tokyo Region (ap-northeast-1) Oregon Region (us-west-2) AWS Batch
AWS Step Functions Amazon S3 AWS Lambda AWS Lambda Amazon
DynamoDB AWS Lambda AWS Lambda AWS Lambda DONE import? ৴ ϑϩʔ Amazon Simple Notification Service Tokyo Region (ap-northeast-1) Oregon Region (us-west-2) AWS Batch ౦ژϦʔδϣϯ
AWS Step Functions Amazon S3 AWS Lambda AWS Lambda Amazon
DynamoDB AWS Lambda AWS Lambda AWS Lambda DONE import? ৴ ϑϩʔ Amazon Simple Notification Service Tokyo Region (ap-northeast-1) Oregon Region (us-west-2) AWS Batch ΦϨΰϯϦʔδϣϯ
AWS Step Functions Amazon S3 AWS Lambda AWS Lambda Amazon
DynamoDB AWS Lambda AWS Lambda AWS Lambda DONE import? ৴ ϑϩʔ Amazon Simple Notification Service Tokyo Region (ap-northeast-1) Oregon Region (us-west-2) AWS Batch Ϣʔβʔηάϝϯτͨ͠σʔλΛ S3ʹputͰSNSΛணՐ SNSϦʔδϣϯؒؔͳ͍ͷͰɺ Step Functions Λىಈͤ͞Δ Amazon PinpointΛ༻͍ͯ৴
AWS Step Functions Amazon DynamoDB AWS Lambda AWS Lambda AWS
Lambda DONE import? ৴ AWS Step Functions Step Functionsͷελʔτ DynamoDB͔Β৴͢Δ pinpointͷΞϓϦέʔγϣϯΛ औಘ͢Δ import͞ΕͨJSONσʔλΛ ݩʹηάϝϯτΛ࡞ ৴͢ΔνϟωϧλΠϓ͔Β ΧελϜνϟωϧ ඪ४Λऔಘ͢Δ importޙ͕݅ଟ͘ͳΔͱ importʹ͕͔͔࣌ؒΔ(࣌ؒ Ͱͳ͍ͳ͍) ͦͷͨΊɺimport͕͔ྃͨ͠ ఆظνΣοΫ͢Δඞཁ͋Γ ྃޙΩϟϯϖʔϯͷੜ ΧελϜͷ߹ ΧελϜνϟωϧͰ৴͢Δ LambdaΛىಈͤ͞Δ
AWS Step Functions Amazon DynamoDB AWS Lambda AWS Lambda AWS
Lambda DONE import? ৴ AWS Step Functions Step Functionsͷελʔτ DynamoDB͔Β৴͢Δ pinpointͷΞϓϦέʔγϣϯΛ औಘ͢Δ import͞ΕͨJSONσʔλΛ ݩʹηάϝϯτΛ࡞ ৴͢ΔνϟωϧλΠϓ͔Β ΧελϜνϟωϧ ඪ४Λऔಘ͢Δ importޙ͕݅ଟ͘ͳΔͱ importʹ͕͔͔࣌ؒΔ(࣌ؒ Ͱͳ͍ͳ͍) ͦͷͨΊɺimport͕͔ྃͨ͠ ఆظνΣοΫ͢Δඞཁ͋Γ ྃޙΩϟϯϖʔϯͷੜ ΧελϜͷ߹ ΧελϜνϟωϧͰ৴͢Δ LambdaΛىಈͤ͞Δ
AWS Lambda ৴ AWS Step Functions ྃޙΩϟϯϖʔϯͷੜ ΧελϜͷ߹ ΧελϜνϟωϧͰ৴͢Δ LambdaΛىಈͤ͞Δ
import os import json import boto3 def lambda_handler(event, context): s3 = boto3.client(‘s3') # ϝοηʔδ༰ msg = event["Message"]["smsmessage"]["body"] arr = json.loads(msg) # ΤϯυϙΠϯτҰཡ endpoints = event["Endpoints"] for item in endpoints: # ΤϯυϙΠϯτ line_id = endpoints[item][‘Address'] # ৴
S3ͷߏߏ json : ৴σʔλҰཡ email_format : ৴༰ ৴͢Δ্Ͱཧ͍͢͠ Α͏ʹઃఆ ͳͷͰɺձࣾํͰ͓ͤ
email: ϝʔϧ৴ line: LINE৴ email_line: ϝʔϧ & LINE৴ xxxxʹ line: LINE৴ͷϑΥʔϚοτ html: ϝʔϧͷHTMLܕ txt: ϝʔϧςΩετܕ title: ϝʔϧλΠτϧ Amazon S3 s3:// BUCKET_NAME / format / ΧςΰϦ / ϒϥϯυ໊ / ৴λΠϓ / ࢠΧςΰϦ_xxxx.txt s3:// BUCKET_NAME / json / ΧςΰϦ / ϒϥϯυ໊ /৴λΠϓ / ࢠΧςΰϦ / yyyy-mm-dd.json json / format ɾࢠΧςΰϦ ϒϥϯυ໊ ৴λΠϓ ࢠΧςΰϦʔ_xxxx.txt ηάϝϯτϑΝΠϧ໊ ৴ϑΝΠϧ໊
AWS Lambda LINE ৴ AWS Lambda { "text": { "text":
"xxxxxx" } } ςΩετ ver. ը૾ ver. ΠϝʔδϚοϓ ver. { "image": { "original_content_url": "xxx", "preview_image_url": "yyy" } } { "imagemap":{ "alt_text": "ccccccccccccccccccccc", “base_url": "https://snaq.me", "h": xxx, "w": yyyy, "actions": [ { "uri_text": "https://snaq.me", "type": "uri", "x": 0, "y": 0, "w": aaaaa, "h": bbbbb }…….. ] } }
AWS Step Functions AWS Lambda AWS Lambda ΞϓϦέʔγϣϯ࡞ AWS Step
Functions pinpointͷΞϓϦʔγϣϯ࡞ ࡞ΒΕͨΞϓϦέʔγϣϯΛ DynamoDBʹೖΕࠐΉ & ঢ়گnotificationͤ͞Δ ༗ޮޙͷঢ়گΛ Dynamoʹput & ঢ়گΛnotificationͤ͞Δ Amazon DynamoDB AWS Lambda AWS Lambda Amazon DynamoDB ΞϓϦέγϣʔϯͰ EMAILΛ༗ޮʹͤ͞Δ
௨ AWS Step Functions AWS Lambda AWS Lambda ΞϓϦέʔγϣϯ࡞ AWS
Step Functions Amazon DynamoDB AWS Lambda AWS Lambda Amazon DynamoDB { “app_email": "
[email protected]
", "app_name": "xxxxxxxxxxx" }
͜ΕͰ࠷ॳͷϢʔβʔηάϝϯτͷ෦ΛೖΕସ͑Δ͚ͩͰࣗಈ৴͕Մೳʹ
Amazon PinpointͰቕͬͯ͠·ͬͨ͜ͱ
• ଐੑͷ্ݶΛ͑ͯΤϥʔ͕ฦΒͳ͍ • ߏจϛεΤϥʔ͕ͩɺର߲ͷ্ݶจࣈΛ͑ͯΤϥʔฦΒͳ͍ • ଐੑ͕ରϢʔβʔʹΑۭͬͯͷ߹ɺCSVͩͱ[]ͱͯ͠Δ͕jsonฏؾ Amazon PinpointΛቕͬͯ͠·ͬͨ͜ͱ ্ه2ͭΤϯυϙΠϯτʹରऀ͕͍Δ͔֬ೝ͕ඞཁɻ1ͭͰoutͩͱશͯૹΕͳ͍ CSVཧޙʑϚʔέ͕ѻ͍͍͕͢ɺjsonΈࠐΈ͍͢
Amazon Pinpointͷ੍ݶ (ओʹҙ͕ඞཁͳpoint) Ϧιʔε σϑΥϧτͷ੍ݶ ૿Ճͷର AttributesɺMetricsɺUserAttributes ύϥϝʔ λʹ·ͱΊׂͯΓͯΒΕͨଐੑ ΞϓϦ͝ͱʹ
40 ͍͍͑ ଐੑͷ͞ 100 จࣈ ͍͍͑ ಉ͡Ϣʔβʔ ID Λ࣋ͭΤϯυϙΠϯτ Ϣʔβʔ ID ͝ͱʹ 10 ݸͷҰҙ ͷΤϯυϙΠϯτ ͍͍͑ ηάϝϯτͷ࡞ʹ༻Ͱ͖ΔσΟϝϯγϣ ϯͷ࠷େ ηάϝϯτ͝ͱʹ 100 ͍͍͑ ηάϝϯτʹಉҰͷΤϯυϙΠϯτ ॏෳআ͞ΕΔ ͍͍͑
·ͱΊ • Amazon PinpointͰ͞·͟·ͳνϟωϧ௨͕Մೳ • ΧελϜνϟωϧΛ༻͍ΕLINE৴Մೳ(β൛ͳͷͰมΘΔ͜ͱ) • ଐੑͷ্ݶ͔ΒΞϓϦέʔγϣϯͷཧํ๏Λߟ͑Δඞཁ͕͋Δ • Τϥʔ͡Όͳ͍͕ૹΕͯͳ͍͜ͱ͕͋ΔͷͰɺ֬ೝͷϑϩʔඞਢ
• AWS Step Functionsʹ·ͱΊΔ͜ͱͰҰݩཧ • ϦʔδϣϯؒSNSαϒεΫϥΠϒΛ༻͍Δ͜ͱͰεϜʔζʹ
ࠓޙ͍ͨ͜͠ͱ • Amazon PersonalizeΛ༻͍ͯΑΓ֬ͷߴ͍௨Λ • ͓՛ࢠͷબఆͷڧԽ • OEMઌͷγεςϜ • ύςΟγΤ͚ͷ৽։ൃγεςϜ
• ࣗಈൃૹ • ධՁΛ͠ͳͯࣗ͘ಈͰ͖ݏ͍ΛஅͰ͖ΔΈ ͳͲ
৽͍͓ͭ͠ମݧΛ͠ɺ ͓ͭͷ࣌ؒΛՁͷ͋Δͷʹ ͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ ͝ڵຯ͋Δํ snaq.me (εφοΫϛʔ)