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
SPA on AWS
Search
urmot
January 18, 2019
Technology
0
180
SPA on AWS
urmot
January 18, 2019
Tweet
Share
More Decks by urmot
See All by urmot
DDDにおける認可の扱いとKotlinにおける実装パターン / authorization-for-ddd-and-kotlin-implement-pattern
urmot
4
790
ログラスを支える設計標準について / loglass-design-standards
urmot
12
2.7k
ログラスを支える技術的投資の仕組み / loglass-technical-investment
urmot
10
5.7k
実践!CloudFormation Best Practice ~CloudFormationで始める組織改革~
urmot
2
3.2k
CircleCIを導入した話
urmot
0
66
実践!CloudFormation Best Practice
urmot
0
180
RDBのログを取る時にDMSを使うという選択肢
urmot
0
97
ベンチャー企業のインフラを運用して学んだ99のこと
urmot
0
1.1k
Other Decks in Technology
See All in Technology
Cloudflareで実現する AIエージェント ワークフロー基盤
kmd09
0
290
Building Scalable Backend Services with Firebase
wisdommatt
0
110
AWS Community Builderのススメ - みんなもCommunity Builderに応募しよう! -
smt7174
0
170
完全自律型AIエージェントとAgentic Workflow〜ワークフロー構築という現実解
pharma_x_tech
0
330
深層学習と3Dキャプチャ・3Dモデル生成(土木学会応用力学委員会 応用数理・AIセミナー)
pfn
PRO
0
460
Formal Development of Operating Systems in Rust
riru
1
420
ゼロからわかる!!AWSの構成図を書いてみようワークショップ 問題&解答解説 #デッカイギ #羽田デッカイギおつ
_mossann_t
0
1.5k
0→1事業こそPMは営業すべし / pmconf #落選お披露目 / PM should do sales in zero to one
roki_n_
PRO
1
1.2k
I could be Wrong!! - Learning from Agile Experts
kawaguti
PRO
8
3.3k
dbtを中心にして組織のアジリティとガバナンスのトレードオンを考えてみた
gappy50
0
180
#TRG24 / David Cuartielles / Post Open Source
tarugoconf
0
570
embedパッケージを深掘りする / Deep Dive into embed Package in Go
task4233
1
210
Featured
See All Featured
The Art of Programming - Codeland 2020
erikaheidi
53
13k
The Pragmatic Product Professional
lauravandoore
32
6.4k
Site-Speed That Sticks
csswizardry
2
270
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
It's Worth the Effort
3n
183
28k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5.1k
Building Applications with DynamoDB
mza
93
6.2k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Raft: Consensus for Rubyists
vanstee
137
6.7k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
192
16k
Bash Introduction
62gerente
610
210k
Embracing the Ebb and Flow
colly
84
4.5k
Transcript
SPA on AWS - Free Web Site Hosting - 2019.01.18
Netadashi Meetup #8 @urmot
ಥવͰ͕͢ɺ
ݸਓ։ൃͯ͠·͔͢ʁ
ࠓ͓͢Δ༰ • SPAͰαʔϏεӡ༻͢Δ͓ • ߏͷ͝આ໌ • ྉۚͷ͓
SPAͰαʔϏεӡ༻͢Δ
Ұલ͘Β͍͔Βɺ WebαʔϏεͷӡ༻Λ։࢝
None
WebອըΛ·ͱΊΔαΠτ • WebອըͷͷϦϯΫΛ·ͱΊͨαΠτ • CrawlerΛͬͯϦϯΫΛऩू • React + ReduxͰSPA •
APIServerlessͰExpress
ߏͷ͝આ໌
None
None
SPA৴෦ • CloudFront + S3 • ಠࣗυϝΠϯͰSSLʹରԠ • CDNͰߴʹ҆ఆͯ͠৴ •
SSRະ࣮
SPA৴෦ • σϓϩΠ؆୯ 1. JSΛbuild 2. S3ʹΞοϓϩʔυ 3. CloudFrontͷΩϟογϡΛΫϦΞ
SPA+CloudFrontͷҙ • ϧʔτύε(/)Ҏ֎ͰϦϩʔυ͞Εͨࡍʹ404 • 404ͷ࣌ʹindex.htmlΛฦ͢Α͏ʹ͢Δ • CloudFrontͷError PagesͰઃఆՄೳ
None
APIαʔό෦ • API Gateway + Lambda + DynamoDBͰߏ • Lambda্ͰExpressΛ࣮ߦ
• aws-serverless-expressͰ࣮ • ৄͪ͘͜͠ΒͷهࣄΛࢀর
SPA+Lambdaͷҙ • Lambdaίʔϧυελʔτ • ϦΫΤετ͕ͳ͍ͱίϯςφ͕མͪΔ • ίϯςφͳ͍߹ɺॳظԽॲཧ͕Δ • ॳظԽॲཧͷϨΠςϯγ͕ͳ͍
Lambdaίʔϧυελʔτରࡦ • LambdaΛϗοτελϯόΠ͓ͯ͘͠ • CloudWatch EventsͰLambdaΛఆظ࣮ߦ • (ϦΫΤετ్͕ઈ͑ͳ͍ఔΞΫηεΛՔ͙)
ྉۚͷ͓
None
໊͓લ.comͷ1ԁυϝΠϯʂ
None
CloudFrontͷྉۚମܥ • Πϯλʔωοτͷσʔλసૹ (GB୯Ґ) • ΦϦδϯͷσʔλసૹ (GB୯Ґ) • HTTP/HTTPSϝιουϦΫΤετ (1ສ݅୯Ґ)
CloudFrontͷྉۚମܥ • Πϯλʔωοτͷσʔλసૹ (GB୯Ґ) • ΦϦδϯͷσʔλసૹ (GB୯Ґ) • HTTP/HTTPSϝιουϦΫΤετ (1ສ݅୯Ґ)
CloudFrontͷྉۚମܥ • HTTP/HTTPSϝιουϦΫΤετ (1ສ݅୯Ґ) ຊ ؖࠃ γϯΨϙʔϧ ถࠃ )551
)5514
CloudFrontͷྉۚମܥ • HTTP/HTTPSϝιουϦΫΤετ (1ສ݅୯Ґ) • ྫ: 100ສHTTPSϦΫΤετ (ຊ) • $0.012
* 100ສ / 1ສ = $1.2
None
DynamoDBͷྉۚମܥ • σʔλετϨʔδ (GB୯Ґ) • ಡΈࠐΈ/ॻ͖ࠐΈϦΫΤετ (1KB/sec)
DynamoDBͷྉۚମܥ • σʔλετϨʔδ (GB୯Ґ) • ຖ݄ɺ࠷ॳͷ25GBͷอແྉ • 25GBҎ߱$0.285/month
DynamoDBͷྉۚମܥ • ಡΈࠐΈ/ॻ͖ࠐΈϦΫΤετ (1KB/sec) ,#ͷ࣌ؒ͋ͨΓͷྉۚ ಡΈࠐΈ ॻ͖ࠐΈ
DynamoDBͷྉۚମܥ • ಡΈࠐΈ/ॻ͖ࠐΈϦΫΤετ (1KB/sec) • ຖ݄ɺ25[req/sec]͕ແྉ • 2ԯ݅ͷϦΫΤετॲཧʹेͳ༰ྔ
·ͱΊ
؆୯ʹαʔϏεΛ࡞ΕΔ࣌ • εέʔϥϒϧ͔ͭίετ • NetlifyͳͲ੩త৴ಛԽαʔϏεग़͍ͯΔ • AWSҰ݁ߏແྉͰ͑Δ
ཪٕ
AWS Promotional Credit for Alexa • Alexa SkillΛҰͭ࡞ͬͯެ։͢Δ • AWSͷ$100ͷΫϨδοτ͕͑Δ
• ΫϨδοτҰؒ༗ޮ
͋Γ͕ͱ͏͍͟͝·ͨ͠ʂ