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
Dev ContainersとGitHub Codespacesの素敵な関係
ymd65536
1
120
弊社の「意識チョット低いアーキテクチャ」10選
texmeijin
4
13k
Nuxt UI Pro、NuxtHub、Nuxt Scripts、Nuxtエコシステムをふんだんに利用して開発するコーポレートサイト@Vue Fes Japan 2024
shingangan
3
840
Jakarta Concurrencyによる並行処理プログラミングの始め方 (JJUG CCC 2024 Fall)
tnagao7
0
200
Vue SFCのtemplateでTypeScriptの型を活用しよう
tsukkee
3
1.4k
Googleのテストサイズを活用したテスト環境の構築
toms74209200
0
240
From Subtype Polymorphism To Typeclass-based Ad hoc Polymorphism- An Example
philipschwarz
PRO
0
110
役立つログに取り組もう
irof
24
7.7k
色々なIaCツールを実際に触って比較してみる
iriikeita
0
130
JaSST 24 九州:ワークショップ(は除く)実践!マインドマップを活用したソフトウェアテスト+活用事例
satohiroyuki
0
170
PagerDuty を軸にした On-Call 構築と運用課題の解決 / PagerDuty Japan Community Meetup 4
horimislime
1
100
約9000個の自動テストの 時間を50分->10分に短縮 Flakyテストを1%以下に抑えた話
hatsu38
21
9k
Featured
See All Featured
VelocityConf: Rendering Performance Case Studies
addyosmani
325
24k
Adopting Sorbet at Scale
ufuk
73
9k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
7.9k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Imperfection Machines: The Place of Print at Facebook
scottboms
264
13k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
It's Worth the Effort
3n
183
27k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
41
9.2k
How to train your dragon (web standard)
notwaldorf
88
5.6k
How STYLIGHT went responsive
nonsquared
95
5.1k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
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! ✨