Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
SvelteJapanOnlineMeetup#2_SvelteKitアプリケーションのモニタ...
Search
naoketa
March 22, 2024
Programming
1
99
SvelteJapanOnlineMeetup#2_SvelteKitアプリケーションのモニタリングを考える
naoketa
March 22, 2024
Tweet
Share
Other Decks in Programming
See All in Programming
AIエージェントでのJava開発がはかどるMCPをAIを使って開発してみた / java mcp for jjug
kishida
4
830
堅牢なフロントエンドテスト基盤を構築するために行った取り組み
shogo4131
3
660
『実践MLOps』から学ぶ DevOps for ML
nsakki55
2
490
[SF Ruby Conf 2025] Rails X
palkan
0
390
sbt 2
xuwei_k
0
110
DSPy Meetup Tokyo #1 - はじめてのDSPy
masahiro_nishimi
1
110
Google Antigravity and Vibe Coding: Agentic Development Guide
mickey_kubo
2
110
TypeScript 5.9 で使えるようになった import defer でパフォーマンス最適化を実現する
bicstone
1
550
All(?) About Point Sets
hole
0
230
Building AI Agents with TypeScript #TSKaigiHokuriku
izumin5210
5
1.1k
AWS CDKの推しポイントN選
akihisaikeda
1
220
[堅牢.py #1] テストを書かない研究者に送る、最初にテストを書く実験コード入門 / Let's start your ML project by writing tests
shunk031
11
6.3k
Featured
See All Featured
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.1k
Balancing Empowerment & Direction
lara
5
770
4 Signs Your Business is Dying
shpigford
186
22k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1k
Agile that works and the tools we love
rasmusluckow
331
21k
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
Code Review Best Practice
trishagee
73
19k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.2k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Rebuilding a faster, lazier Slack
samanthasiow
84
9.3k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3k
Transcript
SvelteKitΞϓϦέʔγϣϯͷ ϞχλϦϯάΛߟ͑Δ -AWS Amplify্ͷSSRͳSvelteKitͷߏྫ- Svelte Japan Online Meetup#2 @naoketa
ࣗݾհ X/Twitter: @naoketa Github: @naoketa Blog: https://naoketa.net
ϑϩϯτΤϯυͷϞχλϦϯάࢹͬͯͲ͏͞Εͯ·͔͢ʁ
• Γํϝϯόʔମ੍ɺѻ͏ϏδωεɺΞϓϦέʔγϣϯʹΑ༷ͬͯʑɻ • ϝϯόʔମ੍ • (ྫ)όοΫΤϯυ/ϑϩϯτΤϯυͷϝϯόʔ͕ͦΕͧΕݟ͍ͯΔɻΫϩεϑΝϯΫγϣφϧͳνʔϜͰݟ ͍ͯΔɻSREνʔϜ͕ݟ͍ͯΔɻetc • ѻ͏Ϗδωε/ΞϓϦέʔγϣϯ •
(ྫ)αʔϏε͕ࢭ·Δ͜ͱͰϏδωεӨڹ͕େ͖͍ɻฏதଳ͔͠Θͳ͍ɻetc • ͲΜͳతͰԿΛϞχλϦϯά͢Δ͖͔ɻ ϑϩϯτΤϯυͷϞχλϦϯάࢹͬͯͲ͏͞Εͯ·͔͢ʁ
ϑϩϯτΤϯυͷϞχλϦϯάͷత • త • Ϣʔβ͔Βݟͯʮಈ͖ଓ͚Δ͜ͱ で ͳ͘ɺૉૣ͘ϩʔ ド ͞ΕΔ͜ͱʯ͕࠷ऴΰʔϧ •
ղܾ͍ͨ͠՝ • ϑϩϯτΤϯυͰಈ࡞ڥ͕όϥόϥ(ɺϒϥβɺωοτϫʔΫetc)ɻ • શύλʔϯֻ͚߹Θͤͯςετ͢ΔͷෆՄೳɻ࣮ࡍͷϢʔβͷڥͰΰʔϧΛຬͨͤΔͷ ͔νΣοΫ͕͍͠ɻ • όάใࠂ͕͋ͬͯͳ͔ͥ࠶ݱ͠ͳ͍ɻ͓·ɻ • ϑϩϯτΤϯυ͔ΒόοΫΤϯυ·ͰΤϯυπʔΤϯυͰࢹ͍͕ͨ͠ɺϑϩϯτΤϯυ ޙखʹपΓ͕ͪɻ (ࢀߟ)O’Reilly Japan, Incʮೖ ࢹ ―ϞμϯͳϞχλϦϯάͷͨΊͷσβΠϯύλʔϯʯ
ϑϩϯτΤϯυͷϞχλϦϯάͷೋͭͷΞϓϩʔν • ϦΞϧϢʔβࢹ (࣮ࡍͷϢʔβར༻ͷࢹ) • ύϑΥʔϚϯεࢹɿ࣮ࡍͷϢʔβ͔Βͷݟ͑ํͷύϑΥʔϚϯεΛࢹ • Τϥʔࢹɿ࣮ࡍͷϢʔβͷϒϥβ্Ͱൃੜͨ͠ΤϥʔΛࢹ • γϯηςΟοΫࢹ
(ਓҝతͳϦΫΤετΛͬͨࢹ) • URLࢮ׆ࢹɿಛఆͷΤϯυϙΠϯτ͕׆͖͍ͯΔ͜ͱͷࢹ • γφϦΦࢹɿWebαΠτͷॏཁͳಋઢ͕ػೳ͍ͯ͠Δ͜ͱͷࢹ (ࢀߟ)O’Reilly Japan, Incʮೖ ࢹ ―ϞμϯͳϞχλϦϯάͷͨΊͷσβΠϯύλʔϯʯ
Ͳ͏ͬͯϞχλϦϯά͢Δ͔ʁ • πʔϧυϦϒϯͰߟ͑ͳ͍ • πʔϧͰऔΕΔ͔ΒͱແବͳϝτϦΫεΛऔͬͯϊΠζɻ • ʮࠓͬͯΔπʔϧͩͱऔΕͳ͍͔Βɻɻʯຊసɻ • ඞཁͳͷΛΈ߹ΘͤՄೳʹ͢Δ •
ΞϓϦέʔγϣϯཉ͍͠ใࢹπʔϧਐԽ͍ͯ͘͠ɻ • πʔϧΛӡ༻͢ΔதͰΈ͑ͯظతʹվળ͍ͯ͘͠ɻ (ࢀߟ)O’Reilly Japan, Incʮೖ ࢹ ―ϞμϯͳϞχλϦϯάͷͨΊͷσβΠϯύλʔϯʯ
͓ɿAmplifyͰϗετ͢ΔSvelteKitΞϓϦέʔγϣϯͷϞχλϦϯά • SSRΛؚΉSvelteKitͳΞϓϦέʔγϣϯΛྫʹɺAmplifyͰϗεςΟϯάͯ͠ϞχλϦϯά Lambda@Edge S3 CloudFront Amplify Github Developer User
git push amplify cli AWSཧ(Πϝʔδ) "84෦ͰσϓϩΠཧ͞ΕΔϦιʔε ˞࣮ࡍͷϦιʔεར༻ऀ͔Βݟ͑ͳ͍ͨΊɺ ࣮ࡍʹ-BNCEB!&EHFͰͳ͍Մೳੑ͋Γ AmplifyͷߏΠϝʔδ SSR ੩తϑΝΠϧऔಘ
(ࢀߟ) AWS Amplify HostingͰNext.jsҎ֎SSRͰ͖ΔΑ͏ʹͳͬͨ • ैདྷͷNext.jsʹՃ͑ͯɺࡢ͔ΒSvelteKitͳͲҙͷSSRϑϨʔϜϫʔΫ͕ϗεςΟϯάՄೳʹɻ (ࢀߟ) https://aws.amazon.com/jp/blogs/news/introducing-support-for-hosting-any-ssr-app-on-aws-amplify-hosting/
AmplifyͰϗετ͢ΔSvelteKitΞϓϦέʔγϣϯͷϞχλϦϯά • SSRΛؚΉSvelteKitͳΞϓϦέʔγϣϯΛྫʹɺAmplifyͰϗεςΟϯάͯ͠ϞχλϦϯά Amplify User CloudWatch Alarm CloudWatch Logs CloudWatch
Metrics CloudWatch RUM Synthetic Canary Slack AWS ChatBot SSRAPIͷϩΪϯά/ϝτϦΫε ϦΞϧϢʔβࢹ γϯηςΟοΫࢹ ϞχλϦϯάͷߏΠϝʔδ
AmplifyͰϗετ͢ΔSvelteKitΞϓϦέʔγϣϯͷϞχλϦϯά • SSRΛؚΉSvelteKitͳΞϓϦέʔγϣϯΛྫʹɺAmplifyͰϗεςΟϯάͯ͠ϞχλϦϯά Amplify User CloudWatch Alarm CloudWatch Logs CloudWatch
Metrics CloudWatch RUM Synthetic Canary Slack AWS ChatBot SSRAPIͷϩΪϯά/ϝτϦΫε ϦΞϧϢʔβࢹ γϯηςΟοΫࢹ ϞχλϦϯάͷߏΠϝʔδ
CloudWatch RUMΛͬͨϦΞϧϢʔβࢹ • ύϑΥʔϚϯεࢹɿ࣮ࡍͷϢʔβใΛͱʹϩʔυ࣌ؒCore Web VitalsΛ͡ΊΤϯυϢʔβͷϒϥβ্ͷύϑΥʔ ϚϯεใΛऔಘɻ • ΤϥʔࢹɿJSΤϥʔऔಘͰ͖Δ͕minify͞ΕͨελοΫτϨʔεΛιʔεϚοϓͰม͍͠ɻྫ֎࣌ʹࣗલͰΧ ελϜΠϕϯτ࣮ݕ౼ɻ
CloudWatch RUMΛͬͨϦΞϧϢʔβࢹ • CloudWatch RUMͰग़ྗ͞ΕΔεχϖοτϕʔεͰίϯϙʔωϯτͱͯ͠औΓࠐΈɻ
(࠶ܝ)AmplifyͰϗετ͢ΔSvelteKitΞϓϦέʔγϣϯͷϞχλϦϯά • SSRΛؚΉSvelteKitͳΞϓϦέʔγϣϯΛྫʹɺAmplifyͰϗεςΟϯάͯ͠ϞχλϦϯά Amplify User CloudWatch Alarm CloudWatch Logs CloudWatch
Metrics CloudWatch RUM Synthetic Canary Slack AWS ChatBot SSRAPIͷϩΪϯά/ϝτϦΫε ϦΞϧϢʔβࢹ γϯηςΟοΫࢹ ϞχλϦϯάͷߏΠϝʔδ
Synthetics CanaryΛͬͨγϯηςΟοΫࢹ • URLࢮ׆ࢹɿPuppeteerϕʔεͷNode.jsͳLambdaΛఆظతʹ࣮ߦͯ͠ରΤϯυϙΠϯτΛࢹ • γφϦΦࢹɿPuppeteerͷίʔυ͔Βը໘ભҠΛͤͯ͞ࢹ
(࠶ܝ)AmplifyͰϗετ͢ΔSvelteKitΞϓϦέʔγϣϯͷϞχλϦϯά • SSRΛؚΉSvelteKitͳΞϓϦέʔγϣϯΛྫʹɺAmplifyͰϗεςΟϯάͯ͠ϞχλϦϯά Amplify User CloudWatch Alarm CloudWatch Logs CloudWatch
Metrics CloudWatch RUM Synthetic Canary Slack AWS ChatBot SSRAPIͷϩΪϯά/ϝτϦΫε ϦΞϧϢʔβࢹ γϯηςΟοΫࢹ ϞχλϦϯάͷߏΠϝʔδ
SSRAPI෦ͷϩΪϯά/ϝτϦΫε • ෦తʹLambda@Edge͕ग़ྗ͢ΔSSRAPIͷඪ४ग़ྗͷϩάΛऩू • ͦͷଞ4xx/5xxεςʔλείʔυͳͲͷϝτϦΫεಉ༷ʹऩू
͍͞͝ʹ • ಛʹRUMͳͲ৭ʑͳϝτϦΫε͕औΓ͘͢ͳͬͨҰํͰɺϞχλϦϯάͯ͠ରॲͰ͖Δϝϯ όʔͷϦιʔεมΘΒͳ͍ɻΞϥʔτඞཁ࠷ݶʹߜͬͯతΛݟ͢͜ͱ͕ඞཁɻ • ଈ࣌ɾظతʹඞཁͳใ͔ɺظతʹඞཁͳใ͔ɻ • Amplify HostingͷSvelteKitͷSSR͏গ͠ӡ༻ͯ͠Έͯੑೳ໘Λࢼ͍ͨ͠ɻ —-
• օ༷ͷSvelteKitӡ༻࣌ͷϞχλϦϯάʹ͍ͭͯɺͲΜͳతͰԿΛݟ͍ͯΔ͔ɺۤ࿑ͳͲͳͲ ͝ҙݟ͍͖͍ͨͩͨͰ͢ʂ