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
AWS Lambda Go First Impression
Search
Seiji Takahashi
January 29, 2018
Programming
5
3.2k
AWS Lambda Go First Impression
presentation @ golang.tokyo #12
Seiji Takahashi
January 29, 2018
Tweet
Share
More Decks by Seiji Takahashi
See All by Seiji Takahashi
Go Backends for frontends with GraphQL and gRPC
timakin
6
3.7k
Design Pattern for Image and Text Composition in Go
timakin
5
6.5k
Golang API Testing the HARD way
timakin
13
6.4k
Head First Golang Image Package
timakin
2
10k
React Native Beyond Prototype
timakin
2
1.6k
Performance Optimization on Google AppEngine
timakin
5
6.2k
testcache.pdf
timakin
1
130
How Go cache
timakin
1
66
How Go cache tests
timakin
1
2.9k
Other Decks in Programming
See All in Programming
コンテナをたくさん詰め込んだシステムとランタイムの変化
makihiro
1
120
快速入門可觀測性
blueswen
0
340
htmxって知っていますか?次世代のHTML
hiro_ghap1
0
330
Beyond ORM
77web
2
330
これでLambdaが不要に?!Step FunctionsのJSONata対応について
iwatatomoya
2
3.6k
선언형 UI에서의 상태관리
l2hyunwoo
0
150
rails stats で紐解く ANDPAD のイマを支える技術たち
andpad
1
290
Haze - Real time background blurring
chrisbanes
1
510
LLM Supervised Fine-tuningの理論と実践
datanalyticslabo
3
1.1k
create_tableをしただけなのに〜囚われのuuid編〜
daisukeshinoku
0
240
return文におけるstd::moveについて
onihusube
1
950
急成長期の品質とスピードを両立するフロントエンド技術基盤
soarteclab
0
930
Featured
See All Featured
How STYLIGHT went responsive
nonsquared
95
5.2k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
Building an army of robots
kneath
302
44k
The Pragmatic Product Professional
lauravandoore
32
6.3k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
45
2.2k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
95
17k
Git: the NoSQL Database
bkeepers
PRO
427
64k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
170
The Cost Of JavaScript in 2023
addyosmani
45
7k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.9k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Transcript
First Impression of
aws-lambda-go • Seiji Takahashi • Github: timakin / Twitter: @__timakin__
• גࣜձࣾGunosy ৽نࣄۀ։ൃࣨ • Go / Swift ࣗݾհ
ੵ ۃ ࠾ ༻ தʂ
ࠓ͢͜ͱ
None
None
None
ࠓ·ͰͲ͏͔ͯͨ͠ • apex • ਖ਼ࣜαϙʔτ͞Εͯͳ͍ݴޠͰlambdaͷ ؔΛॻ͚Δ • awscliΑΓ؆୯ʹσϓϩΠ
ࠓ·ͰͲ͏͔ͯͨ͠ • Node (index.js) -> GoͷόΠφϦ • apex.HandlerFuncͱ͍͏ϋϯυϥͷ ίʔϧόοΫ෦ͰΠϕϯτड͚औΓ
ࠓͲ͏͢Δ͔ • aws-lambda-go • awsਖ਼ࣜαϙʔτͷlambda package • apexΛͬͯͨਓͳΒҠߦ༰қ
࣮ࡍʹҠߦͯ͠ΈΔ
before
after
ҧ͍ʁ • ຊ࣭తʹͳ͍ • ݟ্ͨίʔϧόοΫͰड͚औΔ͔ɺ ී௨ʹϋϯυϥʔͷҾͰड͚औΔ͔ͷ ҧ͍͋Δɻ • deploy͕awscliܦ༝ɻ •
AWSެࣜDocͰinitͰͷάϩʔόϧมͷ ॳظԽ͕ਪ͞Ε͍ͯΔɻ
packageͷίʔυ • AWSज़Έ͍ͨͳίʔυॻ͖͕ͪ • aws-sdk-goͱ͔͍͢͝ɻ ίʔϧόοΫͷຐज़ࢣͰ͍ΔͷͰɻ • aws-lambda-goޚଟʹ࿙Εͳ͍
None
͜ΕԿ RPC༻ͷΧελϜϦεφʔͷ࡞ ͔Βͷݺͼग़͠Λͯ͘͠ΕΔ܅
<- package͕࣮͍ͯ͠ΔInvoke funcΛݺͼग़ͤΔΑ͏ʹwrap
<- ͍͕ͭ͜Ғ͍ͭ
ɾϦΫΤετͷτϨʔγϯά ɾλΠϜΞτཧ ɾRequestIDͷอ࣋ ͳͲͷͨΊʹಠࣗcontextΛ࡞্ͨ͠ͰɺhandlerΛݺͼग़͠
None
None
None
৻·͍͠ context in context (request-scopedͳͷͰਖ਼͍͠)
<- RPCͷݺͼग़͠ީิʹొ
<- RPC Accept
None
None
ҰఆͷϧʔϧΛ९क͢ΕϋϯυϥͱΈͳ͞ΕΔ
తͳreflection
ษڧʹͳΔ
·ͱΊ • aws-lambda-goҠߦɺ৽ن࡞ָ͕ʂ • தͷίʔυ͕໘ന͍ʂ • RPC callͷ࣮ྫ • contextͷ͍ํʹ͍ͭͯߟ͑ͤ͞ΒΕΔ
• reflectionͷԠ༻ྫ
Thank you! ✨