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
型も通る、synthも通る、それでも危ない 〜AIのCDKの権限とコストを機械で検証する〜 / It Passes Type Checks, It Passes Synth Checks, but It’s Still Risky — Automatically Verifying Permissions and Costs in AI’s CDK —
seike460
PRO
1
320
コミュニティの有益性 ~JAWS Days 2026 での体験を通して~ / The Benefits of a Community ~Through My Experience at JAWS Days 2026~
seike460
PRO
0
330
Architecture as SteeringOn-Ramp to AI-DLC
seike460
PRO
0
32
Why Continue AWS Community Builders
seike460
PRO
0
77
AWSコミュニティ活動は顧客のクラウド推進に効くのか / Do AWS community activities help customers adopt the cloud?
seike460
PRO
0
190
テレメトリーシグナルが導くパフォーマンス最適化 / Performance Optimization Driven by Telemetry Signals
seike460
PRO
2
290
AI-DLC 入門 〜AIコーディングの本質は「コード」ではなく「構造」〜 / Introduction to AI-DLC: The Essence of AI Coding Is Not “Code” but “Structure”
seike460
PRO
0
1.8k
今さら聞けないサーバーレスのいいところ 〜運用から解放される世界を目指して〜 / The Benefits of Serverless You Might Be Too Embarrassed to Ask About Now — Aiming for a World Free from Operational Burdens
seike460
PRO
0
110
AWS Lambda Durable Functions のユースケースを探る / Exploring Use Cases for AWS Lambda Durable Functions
seike460
PRO
0
100
Featured
See All Featured
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
190
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Heart Work Chapter 1 - Part 1
lfama
PRO
8
36k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
360
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
Ethics towards AI in product and experience design
skipperchong
2
330
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
490
Designing for humans not robots
tammielis
254
26k
4 Signs Your Business is Dying
shpigford
187
22k
Faster Mobile Websites
deanohume
310
32k
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.7k
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