Overview

This project demonstrates a full-stack, serverless web application deployed entirely on AWS. It includes a static frontend hosted on S3, a custom domain with HTTPS via CloudFront and Route 53, and a backend visitor counter powered by Lambda, DynamoDB, and API Gateway. The system is secured with IAM roles and Origin Access Control, monitored via CloudWatch, and deployed automatically using a CI/CD pipeline with GitHub Actions.

Frontend Hosting and Delivery

Amazon S3

  • Hosted static assets including HTML, CSS, and JavaScript.
  • Configured for static website hosting with index.html as the root object.
  • Public access blocked; content served securely via CloudFront.

Amazon CloudFront

  • Global CDN for low-latency delivery.
  • Origin Access Control (OAC) restricts direct S3 access.
  • HTTPS enforced with ACM certificate; caching & compression enabled.

Amazon Route 53

  • Managed DNS for dorian-a-diaz.click.
  • Alias A record points to CloudFront.
  • Used for DNS validation during ACM provisioning.

AWS Certificate Manager (ACM)

  • Public SSL certificate for dorian-a-diaz.click.
  • Validated via DNS using Route 53.
  • Attached to CloudFront for secure HTTPS delivery.

Backend Visitor Counter

Amazon DynamoDB

  • Table with primary key id to track visitor counts.
  • Atomic increments via UpdateCommand.
  • On-demand capacity for automatic scaling.

AWS Lambda

  • VisitorCountHandler: increments and returns count with CORS headers.
  • VisitorCountPreflightHandler: handles CORS preflight OPTIONS.
  • Node.js runtime; packaged & deployed with AWS CLI.

API Gateway (HTTP API v2)

Security and Permissions

Monitoring and Logging

Frontend Integration

The site’s JavaScript calls the API Gateway endpoint and updates the DOM with the visitor count. It includes a fallback to display N/A on error and logs responses in the browser console for debugging.

CI/CD Pipeline (GitHub Actions)

Secrets Management

Benefits

Architecture Summary

Serverless portfolio site architecture: Route 53 → CloudFront (OAC) → S3, API Gateway with CORS and Preflight → Lambda Visitor Counter → DynamoDB; CloudWatch for logs/alarms; IAM & encryption at rest.
End-to-end serverless architecture used for the portfolio project.
  1. Frontend Hosting: Route 53 → CloudFront → S3 (OAC), ACM for HTTPS.
  2. API Layer: API Gateway with CORS and dedicated preflight route.
  3. Backend Logic: Lambda updates DynamoDB via atomic operation; returns JSON.
  4. Monitoring: CloudWatch logs/alarms.
  5. Security: IAM least-privilege, encryption at rest, HTTPS in transit.

Summary of Architecture Flow

  1. User → Route 53 → CloudFront → S3 (static content).
  2. Frontend JS sends OPTIONS then GET to API Gateway.
  3. API Gateway → Preflight Lambda (CORS) → Visitor Counter Lambda.
  4. Lambda updates DynamoDB → returns count.
  5. CloudWatch logs everything; alarms optional.
  6. Security via IAM, encryption, and HTTPS.

Skills Demonstrated