I just launched my personal blog! ๐Ÿš€ In this first post, I want to share how I built it from scratch using Hugo and AWS services like IAM, S3, ACM, and CloudFront โ€” all behind my own custom domain: nublog.cloud.

๐Ÿ› ๏ธ Tools & Services I Used

  • Hugo โ€“ static site generator for blazing-fast content
  • Amazon S3 โ€“ for hosting the static site
  • AWS Certificate Manager (ACM) โ€“ for issuing a free SSL certificate
  • Amazon CloudFront โ€“ CDN for HTTPS support and global delivery
  • IAM โ€“ to manage secure access to AWS services
  • Namecheap โ€“ for my custom domain nublog.cloud

โš™๏ธ Key Steps I Followed

1. Set up Hugo locally

hugo new site my-blog
cd my-blog
git init
git submodule add https://github.com/adityatelange/hugo-PaperMod.git themes/PaperMod
echo 'theme = "PaperMod"' >> hugo.toml

2. Added a post (like this one!)

hugo new posts/my-first-post.md

3. Built the site

hugo

4. Synced it to S3

aws s3 sync ./public s3://my-blog-bucket --delete --profile myprofile

5. Created an ACM certificate in us-east-1

Used DNS validation via Namecheap and added the CNAME records.

6. Created a CloudFront distribution

Set the origin to the S3 website endpoint, added the SSL cert, and used nublog.cloud as the alternate domain name.

7. Pointed my domain to CloudFront

In Namecheap, I added a CNAME pointing to the CloudFront URL.

8. Invalidation after updates

aws cloudfront create-invalidation \
  --distribution-id ABC123XYZ \
  --paths "/index.html" "/" "/posts/*" \
  --profile myprofile

๐Ÿ’ก Lessons Learned

  • ACM for CloudFront must be in us-east-1, no matter where the S3 bucket is
  • CloudFront caches aggressively, so manual invalidation helps when you publish
  • IAM needs cloudfront:CreateInvalidation permission for deployment tools
  • PaperMod is a clean and powerful Hugo theme with lots of options

๐Ÿ”ฎ What’s Next

  • Weekly posts on cloud, dev tools, and tech experiments
  • Possibly GitHub Actions-based deploy flow
  • Add search, analytics, and maybe comments

Thanks for reading! You can always visit nublog.cloud to check out more posts and learn with me.

If you have questions, feel free to reach out or connect on LinkedIn โ€” Iโ€™d love to hear how others are building their blogs too!