$30 off During Our Annual Pro Sale. View Details »
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
歴史から学ぶ「Why PHP?」 PHPを書く理由を改めて理解する / Learning from History: “Why PHP?” Rediscovering the Reasons for Writing PHP
seike460
PRO
0
290
Team-First Serverless Platform Engineering Approach to PHP Applications with Laravel and Bref
seike460
PRO
0
39
なぜ適用するか、移行して理解するClean Architecture 〜構造を超えて設計を継承する〜 / Why Apply, Migrate and Understand Clean Architecture - Inherit Design Beyond Structure
seike460
PRO
3
940
生成AIコーディングとの向き合い方、AIと共創するという考え方 / How to deal with generative AI coding and the concept of co-creating with AI
seike460
PRO
1
460
地方のPHPerもクラウドを使う理由 ~コストの最適化とチームに向き合う~ / Why even local PHPers use the cloud ~optimize costs and face the team
seike460
PRO
0
85
OpenTelemetryで始めるベンダーフリーなobservability / Vendor-free observability starting with OpenTelemetry
seike460
PRO
0
220
AIコーディングの本質は“コード“ではなく“構造“だった / The essence of AI coding is not “code” but "structure
seike460
PRO
2
1.3k
OpenTelemetryを活用したObservability入門 / Introduction to Observability with OpenTelemetry
seike460
PRO
1
930
Amazon Q Developer Proで効率化するAPI開発入門
seike460
PRO
0
470
Featured
See All Featured
Done Done
chrislema
186
16k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
0
1k
Bash Introduction
62gerente
615
210k
Chasing Engaging Ingredients in Design
codingconduct
0
78
Crafting Experiences
bethany
0
21
Designing for Performance
lara
610
69k
Building an army of robots
kneath
306
46k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
48
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.3k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
1.8k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
9.1k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
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