homeexampleslambda-qr

Serverless QR Code Generator – AWS Lambda with Terraform

Published Oct 18, 2025
2 minutes read
Serverless QR Code Generator – architecture overview
Next.js frontend → API Gateway → Lambda → S3; infrastructure managed by Terraform

This project is a production‑ready serverless QR code generator that demonstrates modern full‑stack development with AWS services. Built with Next.js 15, AWS Lambda, and Terraform, it showcases serverless architecture patterns, Infrastructure as Code, and modern React development practices.

What This Project Does

Why I Built It

High‑Level Architecture

QR Generator Frontend Interface
Modern React interface with real-time validation and error handling

Key Components

AWS Lambda Function

API Gateway

S3 Storage

Frontend Application

How It Works (End‑to‑End)

  1. User enters text/URL and selects options in the Next.js frontend
  2. Frontend sends POST request to API Gateway /generate endpoint
  3. API Gateway invokes Lambda function with request payload
  4. Lambda validates input, generates QR code buffer using qrcode library
  5. QR code uploaded to S3 with unique filename and public access
  6. Lambda returns S3 URL to frontend via API Gateway
  7. Frontend displays QR code and provides download/share options

Notable Technical Features

Security Posture

Terraform Infrastructure Code
Infrastructure as Code with proper resource dependencies and outputs

How to Deploy

  1. Backend Setup: Run terraform init/plan/apply to provision AWS infrastructure
  2. Frontend Configuration: Set NEXT_PUBLIC_API_URL environment variable with API Gateway URL
  3. Development: npm run dev for local development with hot reload
  4. Production: Deploy frontend to Vercel with environment variables configured