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_で_SPA試してみた
Search
shiro seike
PRO
March 28, 2018
0
340
AWS_Lambda_Go_で_SPA試してみた
shiro seike
PRO
March 28, 2018
Tweet
Share
More Decks by shiro seike
See All by shiro seike
テレメトリーシグナルが導くパフォーマンス最適化 / Performance Optimization Driven by Telemetry Signals
seike460
PRO
2
67
歴史から学ぶ「Why PHP?」 PHPを書く理由を改めて理解する / Learning from History: “Why PHP?” Rediscovering the Reasons for Writing PHP
seike460
PRO
0
400
Team-First Serverless Platform Engineering Approach to PHP Applications with Laravel and Bref
seike460
PRO
0
64
なぜ適用するか、移行して理解するClean Architecture 〜構造を超えて設計を継承する〜 / Why Apply, Migrate and Understand Clean Architecture - Inherit Design Beyond Structure
seike460
PRO
3
1k
生成AIコーディングとの向き合い方、AIと共創するという考え方 / How to deal with generative AI coding and the concept of co-creating with AI
seike460
PRO
1
490
地方のPHPerもクラウドを使う理由 ~コストの最適化とチームに向き合う~ / Why even local PHPers use the cloud ~optimize costs and face the team
seike460
PRO
0
100
OpenTelemetryで始めるベンダーフリーなobservability / Vendor-free observability starting with OpenTelemetry
seike460
PRO
0
250
AIコーディングの本質は“コード“ではなく“構造“だった / The essence of AI coding is not “code” but "structure
seike460
PRO
2
1.4k
OpenTelemetryを活用したObservability入門 / Introduction to Observability with OpenTelemetry
seike460
PRO
2
1.1k
Featured
See All Featured
Marketing to machines
jonoalderson
1
5k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.2k
How to Think Like a Performance Engineer
csswizardry
28
2.5k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
980
Being A Developer After 40
akosma
91
590k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.4k
Technical Leadership for Architectural Decision Making
baasie
3
300
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.5k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
450
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
240
Music & Morning Musume
bryan
47
7.1k
Context Engineering - Making Every Token Count
addyosmani
9
770
Transcript
AWS Lambda Go で SPA試してみた Fukuoka.go#10 1 株式会社Fusic @seike460
seike460 seike460 seike460 seike460 株式会社Fusic 清家史郎 (@seike460) 2 # 得意な技術
- PHP - Server - AWS # 得意になりたい技術 - golang - Serverless # 作っているプロダクト - s3ry
s3ry 3
• Go製のAWS S3 操作CLI • https://github.com/seike460/s3ry • fileのアップロード、ダウンロード、ファイルリスト作成 4 s3ry(エスリー)
本題 5
何をつくってるのか? 6
AWS S3で運用するSPA Todo utakata 7
• AWS S3で運用するSPA Todo(本運用はAmazon CloudFront) • 泡沫にした理由は和名のかっこよさげな名前付けたいだけ • 巷の無料TodoアプリはSlackに通知してくれない (webhookありそうだけど少し開発)
• Slack通知してくれないとミーティングすっぽかしちゃう • Slackが通知してくれる事で、業務中にコードに集中出来る • もうServerlessで作っちゃおう 8 utakata
なに使ってるの? 9
react-redux 10
• React • Facebook社製のViewライブラリ • Redux • 状態管理を行なうライブラリ • React+Reduxすると何が良いのか?
• Reduxが状態管理してReactは描画だけに集中出来る 11 react-redux
12 人気 + α(後述)
AWS Amplify 13
• AWS製のJavaScriptライブラリ • Amazon Cognitoと連携した認証部分を行なってくれる • React用のComponentを利用するだけでログイン画面が完成 14 AWS Amplify
Serverless Framework 15
• 主にAWS LambdaとAWS API Gatewayを使った いわゆるServerlessを作成出来るFramework • AWS LambdaがGo対応したら即Go対応取り込んでくれた(最高) •
npmを利用してインストールすることができます • 簡単にServerless Architectureを作成して、 Serverlessすることが可能 16 Serverless Framework
serverless.ymlを設定 • runtimeをgo1.xにする • handlerをコンパイルした Goバイナリを指定する 17
go buildする時の注意点 • Serverless Frameworkが指定するバイナリをbuildする時は GOOS=linuxをつける事を忘れずに! • build用のシェルを npm run
deploy時に実行するようにしました (もっと良い方法あれば是非教えてください!) 18
19 npm run deploy
デモ 20
• Serverless Frameworkとgolangを使って簡単にServerless →API Gatewayが面倒な方オススメです。 • SPAの認証が辛い場合はAWS Amplifyを使って認証作成 →利用するだけなので非常に簡単でオススメです。 •
react-redux →誰か教えてください • 簡単そうじゃん?と思った方、 フロントエンド弱者の僕でも出来ました。 一緒にServerlesssしましょう! 21 まとめ
ご清聴ありがとうございました! 22