Portfolio Website on AWS with Terraform
My CV and portfolio site is also my cloud project: a static website in three languages, served from AWS, with all its infrastructure defined as code and deployed automatically on every change.
- Infrastructure as code with Terraform: the bucket, CloudFront distribution, certificate, DNS records, API, database, permissions and cost alerts are created and versioned from the repository.
- Static site in a private S3 bucket, reachable only through CloudFront. HTTPS with an ACM certificate, security headers and redirects (language, www) handled at the edge with a CloudFront Function.
- Serverless visit counter: API Gateway, Lambda (Node.js) and DynamoDB, served under the same domain at /api with request throttling.
- CI/CD with GitHub Actions and OIDC: every push to main builds, deploys to S3 and invalidates the CloudFront cache, without storing any AWS keys.
- Good practices: least-privilege permissions, remote Terraform state in S3 with locking, and a budget with alerts to keep costs in check.
Visitor
Opens paumassales.dev in the browser
Cloudflare DNS
Resolves the domain to CloudFront
CloudFront
Global CDN, ACM certificate and security rules
Private S3
Stores the static site; only CloudFront can read it
API Gateway
Receives /api calls with request throttling
Lambda
Node.js function that counts the visit
DynamoDB
Stores the visit counter
GitHub Actions
Builds and deploys on every push, no stored keys
The whole AWS box, the DNS records and the permissions are defined with Terraform.



