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.8k
Design Pattern for Image and Text Composition in Go
timakin
5
6.6k
Golang API Testing the HARD way
timakin
13
6.5k
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
140
How Go cache
timakin
1
74
How Go cache tests
timakin
1
3k
Other Decks in Programming
See All in Programming
もう僕は OpenAPI を書きたくない
sgash708
5
1.6k
GoとPHPのインターフェイスの違い
shimabox
2
190
社内フレームワークとその依存性解決 / in-house framework and its dependency management
vvakame
1
560
Lottieアニメーションをカスタマイズしてみた
tahia910
0
130
Amazon Bedrock Multi Agentsを試してきた
tm2
1
290
第3回 Snowflake 中部ユーザ会- dbt × Snowflake ハンズオン
hoto17296
4
370
Pythonでもちょっとリッチな見た目のアプリを設計してみる
ueponx
1
560
Immutable ActiveRecord
megane42
0
140
Honoとフロントエンドの 型安全性について
yodaka
7
1.2k
『GO』アプリ データ基盤のログ収集システムコスト削減
mot_techtalk
0
120
2024年のWebフロントエンドのふりかえりと2025年
sakito
2
250
Open source software: how to live long and go far
gaelvaroquaux
0
630
Featured
See All Featured
Practical Orchestrator
shlominoach
186
10k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
30
2.2k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.3k
Fashionably flexible responsive web design (full day workshop)
malarkey
406
66k
Embracing the Ebb and Flow
colly
84
4.6k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
366
25k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Mobile First: as difficult as doing things right
swwweet
223
9.3k
Making the Leap to Tech Lead
cromwellryan
133
9.1k
Typedesign – Prime Four
hannesfritz
40
2.5k
Optimising Largest Contentful Paint
csswizardry
34
3.1k
Building an army of robots
kneath
303
45k
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! ✨