Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
FREEDOM251

Freedom251 › Blog › Amazon S3

Which Secure S3 + CloudFront Architecture Fits Your Portfolio?

By Freedom251 Team · · 9 min read

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The secure, production-ready pattern is to store your built portfolio files in a private Amazon S3 bucket and deliver them through an Amazon CloudFront distribution. CloudFront provides HTTPS, caching at edge locations and a stable hostname; S3 supplies the HTML, CSS, JavaScript, images and videos. Keep S3 Block Public Access enabled, use CloudFront Origin Access Control (OAC) to grant the distribution read access, and add an AWS Certificate Manager (ACM) certificate plus DNS records if you want a custom domain.

What this architecture does—and what it does not

A static portfolio is a collection of files that a browser can download and run: HTML documents, stylesheets, client-side JavaScript, images, fonts, audio or video. S3 stores those objects durably. CloudFront copies frequently requested objects to edge locations and serves visitors from a nearby location when possible.

As an Amazon Associate I earn from qualifying purchases.

Neither S3 static hosting nor this CloudFront arrangement executes server-side code. There is no PHP, Python, Ruby, Node.js process or database session behind a page. A contact form that needs server-side validation, authentication, private data or email delivery requires another service, such as an API and a function, alongside this static architecture.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The secure design uses the S3 bucket’s normal REST origin, not a publicly readable S3 website endpoint. The bucket remains private, and a CloudFront OAC signs requests made on its behalf. Visitors never need direct S3 permissions.

#1 Best Overall
Sale
UGREEN NAS DH2300 2-Bay for Beginners & Personal Users, Phone Backup | AI Album, Private Cloud/Remote Access, File Sharing, Multi-Device Backup, Home Entertainment, 4GB RAM on Board (Diskless)
  • Entry-level NAS Personal Storage:UGREEN NAS DH2300 is your first and best NAS made easy. It is designed for beginners who want a simple, private way to store videos, photos and personal files, which is intuitive for users moving from cloud storage or external drives and move away from scattered date across devices. This entry-level NAS 2-bay perfect for personal entertainment, photo storage, and easy data backup (doesn't support Docker or virtual machines).
  • Set Your Devices Free, Expand Your Digital World: This unified storage hub supports massive capacity up to 64TB.*Storage drives not included. Stop Deleting, Start Storing. You can store 22 million 3MB images, or 2 million 30MB songs, or 43K 1.5GB movies or 67 million 1MB documents! UGREEN NAS is a better way to free up storage across all your devices such as phones, computers, tablets and also does automatic backups across devices regardless of the operating system—Window, iOS, Android or macOS.
  • The Smarter Long-term Way to Store: Unlike cloud storage with recurring monthly fees, a UGREEN NAS enclosure requires only a one-time purchase for long-term use. For example, you only need to pay $459.98 for a NAS, while for cloud storage, you need to pay $719.88 per year, $2,159.64 for 3 years, $3,599.40 for 5 years. You will save $6,738.82 over 10 years with UGREEN NAS! *NAS cost based on DH2300 + 12TB HDD; cloud cost based on 12TB plan (e.g. $59.99/month).
  • Blazing Speed, Minimal Power: Equipped with a high-performance processor, 1GbE port, and 4GB RAM on Board, this NAS handles multiple tasks with ease. File transfers reach up to 125MB/s—a 1GB file takes only 8 seconds. Don't let slow clouds hold you back; they often need over 100 seconds for the same task. The difference is clear.
  • Let AI Better Organize Your Memories: UGREEN NAS uses AI to tag faces, locations, texts, and objects—so you can effortlessly find any photo by searching for who or what's in it in seconds. It also automatically finds and deletes similar or duplicate photo, backs up live photos and allows you to share them with your friends or family with just one tap. Everything stays effortlessly organized, powered by intelligent tagging and recognition.

Choose the deployment path

Approach Setup and control HTTPS and delivery Best fit
Private S3 bucket plus CloudFront More steps: bucket policy, OAC, distribution settings, certificate and DNS. You control cache behavior, origins and deployment tooling. CloudFront supplies TLS and edge caching after you attach an ACM certificate for a custom hostname. People who want infrastructure control, a predictable static origin and a workflow driven by their own build or CI tools.
Amplify Hosting Managed workflow with less manual CloudFront configuration; deployment can be connected to a source repository or uploaded content. AWS describes it as backed by CloudFront and providing a public HTTPS URL. People who prefer a guided hosting workflow over configuring each CDN and bucket setting.

Official AWS material presents Amplify Hosting as an alternative for S3 website content, not as a universal cost or performance winner. Select it when reducing configuration work matters more than controlling every distribution setting.

Prerequisites and decisions

  • An AWS account with permission to create S3 buckets, CloudFront distributions, OACs, ACM certificates and DNS records.
  • A completed static-site build. Identify its publish directory—the folder containing the final index.html, assets and client-side bundles.
  • A globally unique S3 bucket name. A bucket name does not have to match your domain, although using a clear name makes administration easier.
  • A decision about the public address: the CloudFront-generated hostname is enough for testing, while a custom domain requires a registered domain and DNS management.
  • A plan for client-side routing. If your single-page application expects paths such as /about to resolve in the browser, configure an appropriate error response or generate real files for those paths.

Step 1: Create a private S3 bucket

  1. Open the Amazon S3 console and choose the option to create a bucket in the region you want to use for storage.
  2. Enter a globally unique bucket name. Keep all four S3 Block Public Access settings enabled. Do not add a public-read bucket policy and do not disable the block settings merely to follow older S3 website-hosting tutorials.
  3. Leave Object Ownership configured so that ACLs are not needed. Uploading through the console, a deployment script or a CI role should grant the uploader normal object ownership.
  4. After creation, upload the contents of your publish directory, not the directory itself. The bucket root should contain index.html if that is your site entry point. Preserve relative paths and case exactly; a link to /Images/portrait.jpg will not match an object named images/portrait.jpg.

You can upload before or after creating CloudFront. A private bucket may show an access-denied response when opened directly; that is expected and confirms that visitors are not bypassing the CDN.

Step 2: Create the CloudFront distribution and OAC

  1. In CloudFront, start a new distribution and choose the S3 bucket as the origin. Select the bucket itself as the origin rather than selecting an S3 website endpoint. Website endpoints are HTTP-only and do not support the OAC pattern.
  2. Create or select an Origin Access Control for the S3 origin. Use the signing option recommended for S3 origins so CloudFront signs each origin request.
  3. Set the distribution’s default root object to index.html. This makes a request for the hostname’s root load the portfolio entry page.
  4. Set viewer protocol behavior to redirect HTTP to HTTPS, or require HTTPS if you want to reject plain HTTP requests outright. Redirecting is usually friendlier when visitors follow an old HTTP link.
  5. Choose a cache policy appropriate for static assets. A longer lifetime reduces origin requests, while a shorter lifetime makes unversioned updates appear sooner. There is no single universally correct TTL; choose based on how often you publish and whether filenames are fingerprinted.
  6. Keep the distribution’s domain name for initial verification. CloudFront can take time to deploy configuration changes to all edge locations, so do not diagnose a still-deploying distribution as an origin failure.

Step 3: Grant CloudFront permission to read S3 objects

Creating an OAC does not, by itself, authorize access to your bucket. CloudFront displays a bucket-policy statement or a policy template for the distribution. Apply that statement to the bucket policy, limiting the principal to CloudFront’s service principal and the specific distribution resource shown in the console.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The resulting policy should allow the distribution to retrieve objects (normally s3:GetObject) while retaining Block Public Access. Do not grant Principal: "*" read access. If the console offers to update the policy when you create the distribution, review the proposed resource and accept it only when it names your bucket and distribution.

Rank #2
Sale
UGREEN NAS DXP2800 2-Bay for Advanced Home Users, Remote Workers & Creators | Home Media & Data Center, Docker & VM, Plex, Fast File Transfer, Intel N100, 8GB DDR5, 2.5GbE, 2x M.2 NVMe, 4K HDMI(Diskless)
  • 【Advanced Home Data & Media Hub】For advanced home users who need phone backup, file storage, and centralized data management. Centralize family photos, 4K videos, movies, computer backups, and personal files in one place while running multiple apps for home entertainment and everyday data management. Suitable for households with growing digital libraries and multiple NAS use cases.
  • 【Built for Creators, Media Servers & Advanced Apps】Powered by the Intel N100 Quad-Core CPU, 8GB DDR5 RAM, 2.5GbE networking, and dual M.2 NVMe slots, DXP2800 handles large files and heavier workloads with ease. Run Docker, virtual machines, and media server applications compatible with Plex—ideal for content creators, tech enthusiasts, and advanced home users managing 4K videos, RAW photos, personal media libraries, and multiple NAS apps.
  • 【Up to 80TB for Growing Digital Libraries】 Supports up to 80TB of storage using two HDD bays and two M.2 NVMe SSD slots for family photos, movies, RAW photos, 4K videos, work files, and device backups. AI photo management supports recognition of people, objects, scenes, and locations, album organization, and duplicate photo detection. HDDs and SSDs are not included.
  • 【AI-powered Home Surveillance】Turn DXP2800 into a centralized home surveillance hub by connecting compatible network cameras and storing recordings locally on your NAS. AI-powered features include Face Recognition, People Detection, and Pet Detection, helping advanced home users review important events more efficiently while managing home surveillance and personal data in one place.
  • 【One data Center Across Your Devices】Keep files from desktops, laptops, phones, tablets, and other devices together instead of scattered across cloud accounts and external drives. Access, back up, organize, and share data across Windows, macOS, Android, iOS, web browsers, and compatible smart TVs—ideal for creators and advanced home users working across multiple devices.

Test permissions with the CloudFront hostname, not the S3 URL. A 403 response usually means the policy resource, object path or OAC association is wrong; a missing object generally produces a 404 response.

Step 4: Add HTTPS for a custom domain with ACM

CloudFront’s default hostname already uses HTTPS. For a branded address such as www.example.com, request a public certificate in AWS Certificate Manager and include every hostname you intend to use, such as the apex domain and its www subdomain.

CloudFront certificates must be requested or imported in the us-east-1 AWS region, even when your S3 bucket is elsewhere. This region requirement is specific to CloudFront’s global service. Choose DNS validation when possible; ACM supplies a validation record that remains in DNS so the certificate can renew automatically.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Open ACM in us-east-1 and request a public certificate.
  2. Enter the exact custom hostnames. A certificate for example.com does not automatically cover www.example.com, and vice versa.
  3. Complete DNS validation with the records ACM provides.
  4. In the CloudFront distribution’s alternate domain name (CNAME) setting, add the validated hostname and select the ACM certificate.
  5. Wait for the distribution update to deploy before testing the custom address.

Step 5: Point DNS at CloudFront

In the DNS service that hosts your domain, create alias records for each hostname. With Route 53, an alias record can target the CloudFront distribution without entering a changing IP address. For an apex domain, use the DNS provider’s supported apex-alias or equivalent record type; a conventional CNAME cannot normally be placed at the zone apex.

Rank #3
Sale
UGREEN NAS DH4300 Plus 4-Bay for Beginners, Home Users & Remote Workers | Photo & Video Backup, AI Photo Album, File Hub, Private Cloud & Secure Home Surveillance, 8GB LPDDR4X, 4K HDMI (Diskless)
  • Entry-level NAS Home Storage: The UGREEN NAS DH4300 Plus is an entry-level 4-bay NAS that's ideal for home media and vast private storage you can access from anywhere and also supports Docker but not virtual machines. You can record, store, share happy moment with your families and friends, which is intuitive for users moving from cloud storage, or external drives to create your own private cloud, access files from any device.
  • Smart Photo Backup & AI Album: Automatically back up photos and videos from your phone in real time and keep growing family memories organized with AI-powered photo albums. Semantic search, custom learning, and recognition of people, objects, pets, and similar photos help you quickly find the moments you want. Duplicate photo removal also helps keep your library organized—ideal for families and users with large photo collections.
  • User-Friendly App & Easy Setup: Connect quickly via NFC, set up simply and share files fast on Windows, macOS, Android, iOS, web browsers, and smart TVs. You can access data remotely from any of your mixed devices. What's more, UGREEN NAS enclosure comes with beginner-friendly user manual and video instructions to ensure you can easily take full advantage of its features.
  • More Cost-effective Storage Solution: Unlike cloud storage with recurring monthly fees, A UGREEN NAS enclosure requires only a one-time purchase for long-term use. For example, you only need to pay $629.99 for a NAS, while for cloud storage, you need to pay $719.88 per year, $1,439.76 for 2 years, $2,159.64 for 3 years, $7,198.80 for 10 years. You will save $6,568.81 over 10 years with UGREEN NAS! *NAS cost based on DH4300 Plus + 12TB HDD; cloud cost based on 12TB plan (e.g. $59.99/month).
  • Your Data, You Control:No third-party clouds, no hidden access, UGREEN NAS provides a more secure and private data storage solution. It stores data locally on your private hard drives and does automatic backups. Thus, you can keep full control over it. The advanced encryption is TRUSTe certified in the United States and is awarded the first (and only) ETSI EN 303 645 certification mark for NAS products by TÜV SÜD Group.

Create a separate record for www if you want both addresses to work, and add both names to the certificate and CloudFront alternate-domain list. DNS propagation is controlled by the records’ TTL and resolver caches, so a newly created record may not be visible everywhere immediately.

AWS’s secure-site CloudFormation workflow assumes that the domain is registered and associated with a Route 53 hosted zone. That particular template deploys in us-east-1; using another DNS provider is possible, but you must create the equivalent validation and alias records yourself.

Step 6: Verify before announcing the URL

  1. Open the CloudFront hostname over HTTPS and confirm that the home page, styles, scripts, fonts and images load.
  2. Open the browser’s developer tools and check for 403, 404, mixed-content or incorrect MIME-type errors. Mixed content usually means a page still references an http:// asset.
  3. Test a hard refresh and an incognito window. A successful first request can be masked by an old browser cache.
  4. After the custom DNS record resolves, test both the apex and subdomain names you configured. Confirm that HTTP redirects or refuses connections according to your chosen viewer protocol policy.
  5. Check a deep link and a nonexistent path. Decide whether your application should return a custom not-found page or the single-page application’s entry document.

Publishing updates and understanding the cache

CloudFront does not fetch every object from S3 on every visit. It serves an object from an edge cache until that object’s configured expiration. Once expired, CloudFront checks S3 and stores a newer copy when one exists.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For reliable releases, give static assets content-hashed filenames, such as app.4f31c.js, and use a shorter cache lifetime for index.html. A new build then references new asset names while old assets can remain cached safely. If filenames cannot change, create a CloudFront invalidation for paths that must update immediately, commonly /index.html and selected changed files. Invalidations add operational work and may incur charges under your CloudFront pricing terms, so they are not a substitute for a considered cache policy.

Rank #4
BUFFALO LinkStation 210 2TB 1-Bay NAS Network Attached Storage with HDD Hard Drives Included NAS Storage that Works as Home Cloud or Network Storage Device for Home
  • Value NAS with RAID for centralized storage and backup for all your devices. Check out the LS 700 for enhanced features, cloud capabilities, macOS 26, and up to 7x faster performance than the LS 200.
  • Connect the LinkStation to your router and enjoy shared network storage for your devices. The NAS is compatible with Windows and macOS*, and Buffalo's US-based support is on-hand 24/7 for installation walkthroughs. *Only for macOS 15 (Sequoia) and earlier. For macOS 26, check out our LS 700 series.
  • Subscription-Free Personal Cloud – Store, back up, and manage all your videos, music, and photos and access them anytime without paying any monthly fees.
  • Storage Purpose-Built for Data Security – A NAS designed to keep your data safe, the LS200 features a closed system to reduce vulnerabilities from 3rd party apps and SSL encryption for secure file transfers.
  • Back Up Multiple Computers & Devices – NAS Navigator management utility and PC backup software included. NAS Navigator 2 for macOS 15 and earlier. You can set up automated backups of data on your computers.

When a deployment appears inconsistent, compare the object in S3 with the response headers from CloudFront and note which edge location served the request. An upload can be correct while some visitors still receive the previous cached version until expiry or invalidation.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Costs to budget

AWS does not provide one fixed price for this architecture. Your bill depends on region, traffic and request volume.

Service or item What drives the charge Planning note
S3 Stored data, requests and data transferred. Image-heavy portfolios and frequent deployments increase storage or request usage; deleting obsolete build artifacts can reduce storage.
CloudFront Viewer requests, data transferred and the edge locations used to serve traffic. Traffic geography and cache hit rate affect the total. Review current regional pricing before launch.
Domain registration An annual registration fee that varies by top-level domain and registrar. AWS’s getting-started documentation gives an illustrative range from about $9 to several hundred dollars, not a current quote. Check the live fee for your chosen domain.
ACM public certificate The certificate used by CloudFront is generally managed through ACM rather than purchased as a separate per-site certificate. Validation and renewal still depend on keeping the DNS validation record in place.

Set billing alerts and review S3 and CloudFront usage after the first release. A small portfolio with low traffic may use little storage and transfer, but the actual amount cannot be inferred without your visitor count, asset sizes and region.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Common failures and fixes

403 Access Denied from CloudFront

Confirm that the origin is the bucket endpoint, OAC is attached, and the bucket policy names the correct distribution. Check that the requested key exists and that its capitalization matches the URL. Do not solve a 403 by making the bucket public; that removes the security boundary the OAC provides.

Best Value
Synology DS225+ Private Cloud Media Server - Stream, Back Up Photos & Share Files, Intel CPU for Hardware Transcoding (2-Bay Diskless NAS)
  • Your Personal Streaming Server - Build your own Netflix-style media library and stream 4K movies, shows and photos to any device without monthly fees
  • Create Your Own Cloud - Store your entire photo, video and music collection; access from anywhere with fast 282 MB/s transfer speeds
  • Creator-Grade Backup Solution - Protect your irreplaceable content with automated backups to cloud services, external drives and remote NAS
  • Multi-Layered Data Protection - Combine RAID redundancy, automated backups and snapshot technology to prevent data loss from any cause
  • Smart Home Surveillance - Support up to 30 IP cameras with AI detection, instant alerts and secure remote monitoring

CloudFront works, but the custom domain does not

Verify that the hostname is present in three places: the ACM certificate, CloudFront alternate domain names and DNS. For CloudFront, the certificate must be in us-east-1. Check that DNS targets the distribution hostname rather than an S3 endpoint.

HTTPS certificate is pending validation

Copy ACM’s validation record exactly, including the record name and value. Remove DNS-proxying or rewriting that changes the validation response, and wait for resolvers to see the record. Keep it published after issuance so ACM can renew the certificate.

Updated files are not visible

Check whether the object is cached at CloudFront or in the browser. Wait for the configured expiry, invalidate the affected path, or publish with a new filename. Do not repeatedly upload the same object while assuming every edge will refresh instantly.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Single-page application routes return 404

S3 and CloudFront look for an object matching the path. Either generate an index.html file in each route’s directory or configure a CloudFront custom error response that returns the application shell for the relevant 404 response. Ensure that genuinely missing assets still produce an error instead of the shell.

When this pattern is the right choice

Use private S3 plus CloudFront when your portfolio is a static build, you want HTTPS and edge delivery, and you are comfortable managing infrastructure settings or a deployment script. It keeps the origin simple and avoids exposing the bucket directly.

Choose a managed workflow such as Amplify Hosting when reducing manual distribution, certificate and deployment configuration is more important than controlling each CloudFront behavior. Both approaches still require you to understand DNS, custom domains, caching and the boundary between static files and server-side features.

If the project grows into authenticated pages, personalized responses, an order system, a database-backed blog or server-rendered content, treat this setup as the static front end and add a separately secured backend rather than trying to make S3 execute application code.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Amazon S3AWSCDNCloudFrontHTTPSportfolio websitestatic websiteWeb hosting

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.