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
Flutter × Firebase Genkit で加速する生成 AI アプリ開発
coborinai
0
160
iOSエンジニアから始める visionOS アプリ開発
nao_randd
3
130
Linux && Docker 研修/Linux && Docker training
forrep
24
4.5k
AWS Organizations で実現する、 マルチ AWS アカウントのルートユーザー管理からの脱却
atpons
0
150
2024年のkintone API振り返りと2025年 / kintone API look back in 2024
tasshi
0
220
Software Architecture
hschwentner
6
2.1k
2,500万ユーザーを支えるSREチームの6年間のスクラムのカイゼン
honmarkhunt
6
5.3k
第3回 Snowflake 中部ユーザ会- dbt × Snowflake ハンズオン
hoto17296
4
370
Grafana Cloudとソラカメ
devoc
0
170
Domain-Driven Transformation
hschwentner
2
1.9k
データベースのオペレーターであるCloudNativePGがStatefulSetを使わない理由に迫る
nnaka2992
0
150
ARA Ansible for the teams
kksat
0
150
Featured
See All Featured
Designing on Purpose - Digital PM Summit 2013
jponch
117
7.1k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
133
33k
Building a Scalable Design System with Sketch
lauravandoore
461
33k
Writing Fast Ruby
sferik
628
61k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.3k
Bootstrapping a Software Product
garrettdimon
PRO
306
110k
Measuring & Analyzing Core Web Vitals
bluesmoon
6
240
Building Adaptive Systems
keathley
40
2.4k
The Cost Of JavaScript in 2023
addyosmani
47
7.3k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Site-Speed That Sticks
csswizardry
4
380
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! ✨