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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
shiro seike
PRO
March 28, 2018
350
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
AWS_Lambda_Go_で_SPA試してみた
shiro seike
PRO
March 28, 2018
More Decks by shiro seike
See All by shiro seike
Architecture as SteeringOn-Ramp to AI-DLC
seike460
PRO
0
17
Why Continue AWS Community Builders
seike460
PRO
0
71
AWSコミュニティ活動は顧客のクラウド推進に効くのか / Do AWS community activities help customers adopt the cloud?
seike460
PRO
0
180
テレメトリーシグナルが導くパフォーマンス最適化 / Performance Optimization Driven by Telemetry Signals
seike460
PRO
2
270
AI-DLC 入門 〜AIコーディングの本質は「コード」ではなく「構造」〜 / Introduction to AI-DLC: The Essence of AI Coding Is Not “Code” but “Structure”
seike460
PRO
0
1.4k
今さら聞けないサーバーレスのいいところ 〜運用から解放される世界を目指して〜 / The Benefits of Serverless You Might Be Too Embarrassed to Ask About Now — Aiming for a World Free from Operational Burdens
seike460
PRO
0
100
AWS Lambda Durable Functions のユースケースを探る / Exploring Use Cases for AWS Lambda Durable Functions
seike460
PRO
0
93
歴史から学ぶ「Why PHP?」 PHPを書く理由を改めて理解する / Learning from History: “Why PHP?” Rediscovering the Reasons for Writing PHP
seike460
PRO
0
520
Team-First Serverless Platform Engineering Approach to PHP Applications with Laravel and Bref
seike460
PRO
1
160
Featured
See All Featured
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Typedesign – Prime Four
hannesfritz
42
3.1k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
170
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
190
Practical Orchestrator
shlominoach
191
11k
The untapped power of vector embeddings
frankvandijk
2
1.8k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
390
From π to Pie charts
rasagy
0
210
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
470
Unsuck your backbone
ammeep
672
58k
Designing for humans not robots
tammielis
254
26k
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