Statik Web Sitelerini Barındırma ve CDN ile Sunma
Statik bir web sitesini doğrudan S3 kovasından sunun ve önünde CloudFront CDN kullanarak küresel sunumu hızlandırın.
Statik Web Sitelerini Barındırma ve CDN ile Sunma, CoddyKit'te ücretsiz bir AWS for Backend Developers (EC2, S3, RDS, Lambda) dersidir. Bu, 4 dersinin 4. dersidir. Aşağıdan dersin tamamını ücretsiz okuyabilir, sonra tarayıcıda yerleşik kod editörü ve 7/24 yapay zeka koçu ile uygulamalı olarak pratik yapabilirsin. Bu, AWS for Backend Developers (EC2, S3, RDS, Lambda) öğrenme yolunun bir parçasıdır ve ilerlemeniz web ve CoddyKit uygulaması arasında senkronize olur. AWS for Backend Developers (EC2, S3, RDS, Lambda) kursu toplamda 4 dersten oluşur.
Bu dersin bazı bölümleri henüz çevrilmemiş olup İngilizce olarak gösterilmektedir.
S3 as a Web Server
Beyond storing files, S3 can host a static website, HTML, CSS, JS, and images, with no servers to manage. It is cheap, scalable, and a perfect fit for single-page apps and documentation sites.
Enabling Static Hosting
You enable the static website hosting feature on the bucket and specify an index document (the home page) and an error document.
Index and Error Documents
The index document (often index.html) is served for the root and folder URLs. The error document handles 4xx responses, useful for SPA routing where you point errors back to index.html.
Uploading Your Site
Sync your build output into the bucket. The AWS CLI sync command uploads only changed files.
aws s3 sync ./dist s3://my-site-bucket --deleteContent Types Matter
S3 serves files with the Content-Type stored as metadata. If a CSS file is served as plain text, browsers ignore it. The CLI usually infers types, but verify for unusual extensions.
The Website Endpoint
Static hosting exposes a regional website endpoint URL. It is HTTP only and not ideal for production, which is exactly why we add a CDN next.
http://my-site-bucket.s3-website-us-east-1.amazonaws.comIntroducing CloudFront
CloudFront is AWS's content delivery network. It caches your site at edge locations worldwide, so users get fast responses from a nearby server and your bucket sees less load.
Origins and Distributions
A CloudFront distribution points at an origin (your S3 bucket). CloudFront fetches from the origin on a cache miss and serves the cached copy on subsequent requests.
HTTPS and Custom Domains
CloudFront gives you free HTTPS via AWS Certificate Manager and lets you attach a custom domain like www.example.com, things the raw S3 endpoint cannot do.
Locking Down the Bucket
For security, keep the bucket private and let only CloudFront read it using an Origin Access Control (OAC). Visitors reach content through the CDN, never the bucket directly.
Cache Invalidation
CloudFront caches aggressively. After deploying new content, invalidate the cache so users get the latest version instead of a stale copy.
aws cloudfront create-invalidation \
--distribution-id E123ABC \
--paths "/*"Quick Check
Test your static hosting knowledge.
Recap: Global Static Sites
You can now ship a static site on AWS:
- Enable S3 static website hosting with index/error documents.
aws s3 syncdeploys your build.- CloudFront adds edge caching, HTTPS, and custom domains.
- Use OAC to keep the bucket private and invalidate the cache on deploy.
Yapay zeka eğitmeniyle AWS for Backend Developers (EC2, S3, RDS, Lambda) öğren — ücretsiz
Tarayıcında gerçek kod yaz ve çalıştır, 7/24 yapay zeka eğitmeninden anında yardım al; web'de ya da uygulamada kaldığın yerden devam et.
- Kurslar
- 12
- Dersler
- 48
Sıkça Sorulan Sorular
“Statik Web Sitelerini Barındırma ve CDN ile Sunma” dersi ücretsiz mi?
Evet — “Statik Web Sitelerini Barındırma ve CDN ile Sunma” dersin tüm metni burada web'de ücretsiz olarak okunabilir. Etkileşimli olarak pratik yapmak (yerleşik kod editörü ve 7/24 yapay zeka koçu) ve AWS for Backend Developers (EC2, S3, RDS, Lambda) kursunun geri kalanını açmak için CoddyKit PRO'ya yükselt. AWS for Backend Developers (EC2, S3, RDS, Lambda) kursu toplamda 4 dersten oluşur.
“Statik Web Sitelerini Barındırma ve CDN ile Sunma” dersinde ne öğreneceğim?
Statik bir web sitesini doğrudan S3 kovasından sunun ve önünde CloudFront CDN kullanarak küresel sunumu hızlandırın. AWS for Backend Developers (EC2, S3, RDS, Lambda) ile uygulamalı kodu tarayıcıda doğrudan çalıştırarak pratik yaparsın ve 7/24 yapay zeka koçu dersi çalışırken sorularını yanıtlar.
AWS for Backend Developers (EC2, S3, RDS, Lambda) öğrenmeye başlamak için deneyim gerekli mi?
Önceden deneyim gerekmez. CoddyKit'te AWS for Backend Developers (EC2, S3, RDS, Lambda), başlangıçtan ileri seviyeye kadar yapılandırıldığı için buradan başlayabilir veya başından başlayıp kendi hızında ilerleme yapabilirsin. Bu, 4 dersinin 4. dersidir.
“Statik Web Sitelerini Barındırma ve CDN ile Sunma” dersi ne kadar sürer?
Çoğu CoddyKit dersi yaklaşık 5–10 dakika sürer. Her biri kısa ve etkileşimli olduğu için sabit ilerleme yaparsın ve web ile uygulama arasında tam olarak bıraktığın yerden devam edebilirsin.
Bu AWS for Backend Developers (EC2, S3, RDS, Lambda) dersinde kod yazıp çalıştırabilir miyim?
Evet. Her AWS for Backend Developers (EC2, S3, RDS, Lambda) dersi yerleşik bir kod editörü içerir, bu sayede tarayıcıda gerçek kod yazıp çalıştırabilir ve anlık yapay zeka geri bildirimi alırsın — yerel kurulum gerekli değildir.
Bu kursun tüm dersleri
- S3 Paketleri ve Nesneleri Açıklaması
- S3 Sürüm Oluşturma ve Yaşam Döngüsü Politikaları
- S3 Veri Erişimini Güvenli Hale Getirme
- Statik Web Sitelerini Barındırma ve CDN ile Sunma