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
Lambdaで勤怠連絡
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
k-kurikuri
April 17, 2018
Technology
1.7k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Lambdaで勤怠連絡
Go(Un)Conference
k-kurikuri
April 17, 2018
More Decks by k-kurikuri
See All by k-kurikuri
Awesome goにあるOSSをGithubStar数高い順に出力するツールを作った
k_kurikuri
0
750
Laravel Sparkでサービス開発に注力する
k_kurikuri
0
1.3k
GKEとGaurunで作るPush通知サーバ
k_kurikuri
3
520
Starting Laravel Spark
k_kurikuri
0
480
[Laravel5.6]CHANGELOGを斜め読み
k_kurikuri
0
5.3k
GoビギナーがGCPでGoアプリをリリースした話
k_kurikuri
1
960
英語で質問した話を 聞いて欲しい
k_kurikuri
0
270
Laravel5.5 - Package Auto Discoveryを理解する
k_kurikuri
0
1.2k
Laravelで乙女ゲームを開発した話
k_kurikuri
2
650
Other Decks in Technology
See All in Technology
Go 1.27 の標準パッケージに uuid が入った!のでいろいろ喋る / go_127_std_go_uuid
convto
3
560
Flutter × BLE Centralを自前Pluginで実装する設計パターン - MethodChannel / EventChannelで作る双方向ブリッジの実践 / Building Custom Flutter BLE Central Plugins: Bidirectional Bridging with Method & Event Channels
bitkey
PRO
0
190
その“隠したつもり”が命取り ── 自前と平文をやめて「正解」に委ねる
kuroneko13
0
140
AI時代のアウトプット――変わったこと、変わらないこと / Devsumi 2026 Kansai #devsumi
jnchito
0
360
2027年のMetricKit
kantacky
0
140
Genie Codeハンズオン応用編
taka_aki
0
130
Invisible to AI? Making TYPO3 Sites Quotable by AI Search Systems
wolfgangwagner
0
240
[potatotips #96] Give Your AI Agent the Flutter Playbook
korodroid
0
120
FORENSIA: ローカルLLMフォレンジックハーネス
sumeshi
2
430
Bill One 開発エンジニア 紹介資料
sansan33
PRO
7
20k
SmartHR Engineering Team Deck
smarthr
1
3.2k
三人寄ればチューリング完全
puhitaku
4
1.9k
Featured
See All Featured
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.4k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Become a Pro
speakerdeck
PRO
31
6.2k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
300
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
370
The SEO Collaboration Effect
kristinabergwall1
1
530
The #1 spot is gone: here's how to win anyway
tamaranovitovic
3
1.1k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
220
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
370
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
660
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
2.4k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
730
Transcript
AlexaͱLambdaͰ ۈଵ࿈བྷΛ͔ͨͬͨ͠… Go(Un)ConferenceLTେձ@k-kurikuri
ΞδΣϯμ • AlexaͱAWS Lambda(Go)Ͱۈଵ࿈བྷ͍ͨ͠ • Ͱ͍᪴ͨͷͰஅ೦ͨ͠ • ͰସҊͰ։ൃͨ͠ͷͰৼΓฦΓ • σϞ
• TODOͳͲɺ·ͱΊ
։ൃʹࢸΔ͖͔͚ͬ • Amaozon EchoΛߪೖͨ͠ • Alexa Skill։ൃΩοτ͕͋ΓɺΧελϜεΩϧ ΛAWS LambdaͰ࣮Ͱ͖Δ •
2018/01ʹެࣜαϙʔτ͞ΕͨGoΛ͍͍ͨ
AWS Lambdaͱ? • ͍ΘΏΔαʔόʔϨεΞʔΩςΫνϟ • EC2ͷΑ͏ʹৗ࣌αʔόΛՔಇ͢ΔͷͰͳ ͘ɺΠϕϯτۦಈͰඞཁͳ࣌ʹॲཧΛߦ͏ • ඞཁͳ࣌ʹػೳΛ༻͢ΔͨΊඅ༻͕҆͘͢Ή •
Python, Java, Node.js, C#, GoͰ࣮Ͱ͖Δ
͔ͤͬ͘࡞ΔͳΒ ࣗͷʹཱͭͷΛ
ۈଵϝʔϧΛૹΔͷ͕ ࠷ߴʹμϧ͍
ஂͷத͔Βۈଵ࿈བྷ͍ͨ͠ • ʮΞϨΫαɻମௐෆྑͰࠁ(or ܽۈ)͢Δɻग़ࣾ 12:00ͷ༧ఆʯ • ͬͦ͘͞Amazon Developer͔ΒLambdaͱAlexaΛɹ ࿈ܞͤͯ͞ΈΔ •
Alexa͕εΩϧͷԻೝࣝͯ͘͠Εͳͯ͘υϋϚϦ • ͦͦงғؾ։ൃ͕ྑ͘ͳ͍
ͬ͞͞ͱAlexaஅ೦ʂ
ํస • ͱʹ͔͘LambdaͰGo͍͍ͨΜ • APIGateway + LambdaͰGmailૹ৴͠Α͏ • ػೳͷ࣮͓͚ͯ͠ΠϕϯττϦΨʔɹ ޙͰ࿈ܞͰ͖Δ
ཧ
ݱ࣮
։ൃπʔϧ • serverless (npm) • goenv • aws-lambda-go • oauth2/google,
api/gmail/v1 • IntelliJ + FileWatcher + go fmt
serverless (sls) module • CLIͰLambdaͷ։ൃ͕ग़དྷΔnpmϞδϡʔϧ • sls create, sls deployͰςϯϓϨʔτϓϩδΣΫτ
࡞͔ΒσϓϩΠ·Ͱ • σϓϩΠͷϑϩʔCloudFormation, S3, Lambda • Node.js, Python, JavaϩʔΧϧ։ൃՄೳ
Goͷ࣮Ͱ٧·ͬͨՕॴ • Golang͔ΒGmailΛૹ৴͢Δ࣌ʹɺSubjectͷຊޠ͕จࣈ Խ͚͢Δ • DotenvͰ༻͢ΔϑΝΠϧϏϧυʹؚ·Εͳ͍? • depͰ “golang.org/x/oauth2/google”Λensureͯ͠ࢀর Ͱ͖ͳ͍
• Go1.9vͰϏϧυͨ͠ޙʹɺbrew upgrade goͰ1.10ʹ্͛ ͨΒϏϧυ͕௨Βͳ͘ͳͬͨ
σϞ
TODO • ग़ࣾ࣌ؒͱࠁཧ༝͕ܾΊଧͪͳͷͰɺΦϓγϣϯ ͰࢦఆͰ͖ΔΑ͏ʹ͢Δ • GoͰ٧·ͬͨՕॴ1ͭͣͭղফ • ஂ͔Βۈଵ࿈བྷ͢ΔͨΊɺAlexaͷεΩϧ։ൃΛ ଓ͚͍ͨ •
։ൃίετ8hҐ (֓ࢉ)
github.com/k-kurikuri/lambda-send-mail
͝੩ௌ ͋Γ͕ͱ͏͍͟͝·ͨ͠