Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
インフラエンジニアが触るJavaScriptのはなし
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Kohei Ota
August 21, 2018
Technology
730
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
インフラエンジニアが触るJavaScriptのはなし
Kohei Ota
August 21, 2018
More Decks by Kohei Ota
See All by Kohei Ota
CloudNative Meets WebAssembly: Exploring Wasm's Potential to Replace Containers
inductor
4
3.7k
The Cloud Native Chronicles: 10 Years of Community Growth Inside and Outside Japan
inductor
0
210
Cracking the KubeCon CfP
inductor
2
940
KubeCon Recap -Platform migration at Scale-
inductor
1
1.1k
コンテナビルド最新事情 2022年度版 / Container Build 2022
inductor
3
610
データベースとストレージのレプリケーション入門 / Intro-of-database-and-storage-replication
inductor
28
6.7k
KubeConのケーススタディから振り返る、Platform for Platforms のあり方と その実践 / Lessons from KubeCon case studies: Platform for Platforms and its practice
inductor
3
1k
オンラインの技術カンファレンスを安定稼働させるための取り組み / SRE activity for online conference platform
inductor
1
1.4k
Kubernetesネットワーキング初級者脱出ガイド / Kubernetes networking beginner's guide
inductor
23
8k
Other Decks in Technology
See All in Technology
あなたの知らないAmazon VPC Route Server/Amazon VPC Route Server you don't know about
masakiokuda
2
220
[2026 Oracle Technical Deep Dive] VMwareワークロードのOCI移行実践ガイド - OCVSでの継続利用からOCIコンピュートへの移行まで (2026年9月17日開催)
oracle4engineer
PRO
0
120
BedrockとLambdaで作る リアルタイム進行型推理ゲーム
kawametho
0
190
[2026 Oracle Technical Deep Dive] OCI AI Resilience -OCIのセキュリティ対策機能をきちんと使いこなす- (2026年9月17日開催)
oracle4engineer
PRO
0
130
ai_cording_with_k8s_knowledge.pdf
mochizuki875
1
300
使いこなすために知っておきたい Azure SRE Agent アンチパターン
torumakabe
2
360
2026-10-01_MagicPod_QAハーネスエンジニアリングとQA組織の未来像
ynisqa1988
1
540
雪かき部 #7 もう怖くない!SELECT文!
foursue
0
280
[2026 Oracle Technical Deep Dive] AI時代のデータベース基盤をどう選ぶ? Exadata Database Serviceの選択肢と使い分け (2026年9月17日開催)
oracle4engineer
PRO
0
220
おそらく日本で唯一のDevRelインターン生として
husengs7
0
170
AI 時代の Azure エンジニアリング ~ 私たちは何を磨き、何を任せるのか ~
chack411
1
470
サーバーフルコンピューティング?AWS Lambda
iwatatomoya
1
260
Featured
See All Featured
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
74
42k
Docker and Python
trallard
47
4.2k
Building Applications with DynamoDB
mza
96
7.2k
Embracing the Ebb and Flow
colly
88
5.2k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
2
6.3k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.9k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
440
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
580
Mobile First: as difficult as doing things right
swwweet
225
10k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
1
550
Transcript
ΠϯϑϥΤϯδχΞ͕৮Δ JavaScriptͷͳ͠ Presented by @_inductor_ We are JavaScripters!
Agenda • ࣗݾհ • Πϯϑϥ x JavaScript? • Ͳ͏ͬͯΔ͔
Who am I? • inductor(@_inductor_) • Cloud(AWS)/DevOps Engineer @ Start
Today Technologies, Inc. • Admin @ Πϯϑϥษڧձ • DevOps / Containeriation / CI/CD Pipelines
ϨΠϠ͕ͪ͘Ͷʁ
JavaScript x Infrastructure? ͦͦԿʹ͏ͷʁ
Lambda@Edge
What is Lambda@Edge? • LambdaΛCloudFrontͷॲཧذʹ͑ΔαʔϏε • CloudFront = AWSͷCDNαʔϏε •
Lambda = AWSͷFaaS
Why CloudFront? • CloudFrontΛ͏ͱόοΫΤϯυͷΞΫηεෛՙ͕େ෯ʹԼ͕Δ • Τοδϩέʔγϣϯ͕ੈք֤ʹ͋ΔͨΊɺҬʹΑΔϨΠςϯγ ͷҧ͍Λ͑Δ͜ͱ͕Ͱ͖Δʢதࠃ͈́ʣ • σϓϩΠ͔ͯ͠ΒશϦʔδϣϯө͢ΔͷΉͪΌ͍ •
HTTP/2(TLS) Readyɺઃఆ͕؆୯ • ূ໌ॻͷऔಘACM࿈ܞͰ؆୯ & ແྉ • EC2ɺEBɺS3ɺECSͳͲͷଞAWSαʔϏεͱ͙͢ʹ࿈ܞͰ͖Δ
͕͜͜Πέͯͳ͍Αʂ ࠓ·ͰͷCloudFront • ͱʹ͔͘ࡉ͔͍ઃఆ͕Γʹ͍͘ʂ • ҰൠతͳWebαʔόʔʹ͋Δઃఆ߲͕ͳ͍(Firebaseͱൺͯऑ͍) • ΩϟογϡɾHTTPϨεϙϯεϔομͷࡉ͔ͳઃఆͱ͔ • (WAFແ͠ͷ)IPΞυϨε੍ݶɺUser-AgentΛͬͨৼΓ͚ͳͲ͕Ͱ͖ͳ͍
• Botͱ͔ɺͩ͘Βͳ͍ϦΫΤετΛϦʔνͤͨ͘͞ͳ͍ • SPAΛαʔόʔϨεʹ࡞Γ͍ͨͱ͖ʹΫϩʔϥʔͱͷ૬ੑ͕ѱ͍ • SSRΛೖΕΔ͜ͱݕ౼த(ͰҠߦ͢Δίετͱεέδϡʔϧ͕ɾɾɾ)
ͦ͜ͰLambda@Edge
Lambda@EdgeͰ ࣮ݱͰ͖ͨ͜ͱ • ΫϩʔϥʔʹΠϯσοΫε͍ͤͨ͞ϖʔδͷΞΫηε͕ݕࡧΤϯδϯ ͷBot͔Β͋ͬͨ߹ɺLambda@Edge͔ΒStaticͳHTMLΛฦ٫ • SEOతʹదͳίϯςϯπΛURL͝ͱʹฦͤΔΑ͏ʹͳͬͨ • Ϣʔβʔ͔ΒͷϦΫΤετʹରͯ͠HSTSX-Content-Type-Optionsͳ ͲͷηΩϡϦςΟपΓͷHTTPϔομͳͲΛS3→CFͷؒͰՃͯ͠ฦ٫
• HSTS preloadͳͲʹରԠ͠ɺಡΈࠐΈʹগͳ͔Β͍͍ͣӨڹΛ ༩͑ΒΕΔʢͱ͍͍ͳʣ • Content-Security-Policyޙग़͠ͰೖΕͨͷͰͪΐͬͱͭΒ͍
ಋೖํ๏ͳͲͷࡉ͔͍ https://tech.starttoday-tech.com/ entry/lambda-edge ʹࡌͬͯ·͢
Lambda@Edgeͷ ͍͍ͱ͜ΖɺΫιͳͱ͜Ζ • ͍͍ͱ͜Ζ • ϧʔςΟϯάָ͕ʹ࣮ݱͰ͖Δ • ͍ΘΏΔҰൠతͳURIͷύλʔϯϚονͳॻ͖ํͰͰ͖ΔͷͰָ • ΫϥΠΞϯτͷΤοδϩέʔγϣϯͰ࣮ߦ͞ΕΔͷͰ݁ߏ͍
• Ϋιͳͱ͜Ζ • Lamdaͷϩά͕Τοδϩέʔγϣϯ͝ͱʹ֤ϦʔδϣϯʹࢄΒͬͯ͠·͏ • όʔδϣϯΞοϓͷै͕ී௨ͷLambdaΑΓগ͍͔͠ʁ • ͦͦJavaScriptཧղͯ͠ΔΠϯϑϥΤϯδχΞͲΕ͚͍ͩΔͷ
Ϋϥυ͕ͨΓલͳ͔࣌ͩΒͦ͜ɺ ΠϯϑϥͰJavaScriptΛ͍͖ͬͯ· ͠ΐ͏ʂ
ΞϓϦέʔγϣϯ࣮ߦڥ ͱͯ͠ͷFaaSʹࢥ͏ٙ • ςετͱ͔ΈΜͳͲ͏ͬͯΜͩΖ͏ʁ • αʔόʔϨεͳߏͰ͖ͬͪΓӡ༻Ͱ͖͍ͯΔਓͨͪͷ ݟ͕͠Γ͍ͨɾɾɾʂʂʂ • ڵຯ͋Δਓ͍Εɺͥͻ࠙ձͰ͠·͠ΐ͏ʼʻ
͓ΘΓ