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.1k
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
9.9k
React Native Beyond Prototype
timakin
2
1.6k
Performance Optimization on Google AppEngine
timakin
5
6.1k
testcache.pdf
timakin
1
120
How Go cache
timakin
1
62
How Go cache tests
timakin
1
2.9k
Other Decks in Programming
See All in Programming
Vitest Browser Mode への期待 / Vitest Browser Mode
odanado
PRO
2
1.7k
Piniaの現状と今後
waka292
5
1.5k
Synchronizationを支える技術
s_shimotori
1
150
GCCのプラグインを作る / I Made a GCC Plugin
shouth
1
150
Modern Angular: Renovation for Your Applications
manfredsteyer
PRO
0
210
GitHub Actionsのキャッシュと手を挙げることの大切さとそれに必要なこと
satoshi256kbyte
5
390
cXML という電子商取引の トランザクションを支える プロトコルと向きあっている話
phigasui
3
2.3k
gopls を改造したら開発生産性が高まった
satorunooshie
8
240
Realtime API 入門
riofujimon
0
110
色々なIaCツールを実際に触って比較してみる
iriikeita
0
270
Vaporモードを大規模サービスに最速導入して学びを共有する
kazukishimamoto
4
4.3k
NSOutlineView何もわからん:( 前編 / I Don't Understand About NSOutlineView :( Pt. 1
usagimaru
0
150
Featured
See All Featured
A designer walks into a library…
pauljervisheath
202
24k
Git: the NoSQL Database
bkeepers
PRO
425
64k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
7.9k
Writing Fast Ruby
sferik
626
61k
Embracing the Ebb and Flow
colly
84
4.4k
StorybookのUI Testing Handbookを読んだ
zakiyama
26
5.2k
Scaling GitHub
holman
458
140k
Building Your Own Lightsaber
phodgson
102
6.1k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
What's new in Ruby 2.0
geeforr
342
31k
Intergalactic Javascript Robots from Outer Space
tanoku
268
27k
VelocityConf: Rendering Performance Case Studies
addyosmani
325
24k
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! ✨