Skip to main content

Infra

How B2B Sales Did Not Teach Me About CloudFront Functions

You’ve probably seen the posts:

  • “How B2B sales helped me run a marathon”
  • “How cold calling made me a better engineer”

This isn’t that - unfortunately.


Redirects, DNS, and Terraform

This one started simple: I wanted to redirect the apex domain (vakintosh.com) to the www subdomain.

+-----------------+      1. User requests        +-------------------+
|      User       | ---------------------------> |   vakintosh.com  |
|     Browser     |          old URL             +-------------------+
+-----------------+                                     |
                                                        | 2. Server sends 301 Redirect
                                                        |    and new URL location (www.vakintosh.com)
                                                        v
+-----------------+      3. Browser requests     +--------------------+
|      User       | ---------------------------> | www.vakintosh.com  |
|     Browser     |           new URL            +-------------------+
+-----------------+                                     |
                                                        | 4. Server responds with new content
                                                        |
                                                        v
+-----------------+      5. User views new content +-----------------+
|      User       | <----------------------------- |   New Content   |
|     Browser     |          content               +-----------------+
+-----------------+
  • The user sends a request to vakintosh.com.
  • The request is intercepted and responded to with a 301 redirect.
  • The user’s browser follows the redirect and lands on www.vakintosh.com.

I figured I’d just do it manually in the Porkbun DNS console - Bad idea.

GitHub OIDC + AWS IAM + Terraform: A Practical Guide (and Pain Log)

I wanted to deploy my Hugo website using Terraform and GitHub Actions — securely — with least privilege — without Route 53, using my domain on Porkbun, and leveraging AWS Free Tier services.

Day 1 — AWS Account Setup + Role Plumbing

Started from scratch.

  • Created the AWS account
  • Set up MFA, secure root, all that
  • Made a single Admin IAM user (for CLI/debug, not daily use)

Then I created a role: GitHubAction-AssumeRoleWithAction.