← All work
Infrastructure · 2023–25

Serverless Email/SMS Service with Static Egress IP

Overview

A serverless messaging API that sends email and SMS through SendGrid and MessageBird, deployed on AWS Lambda inside a VPC so all outbound traffic exits via a single static IP. It pairs reliable multi-channel delivery with the network setup needed for IP-whitelisted integrations.

The Challenge

The studio needed one internal endpoint to dispatch transactional email and SMS, with predictable egress so providers and downstream partners could whitelist its IP. Doing that on Lambda means solving both the messaging-provider abstraction and the VPC/NAT networking at once.

What We Built

A TypeScript Lambda (src/index.ts) with a process/ module that fans out to channel handlers, processEmail.ts (SendGrid), processSMS.ts (MessageBird), plus processEvent.ts and processIp.ts, and models/EventsModels.ts for typed payloads validated with Zod. The service is bundled with Webpack and defined in both serverless.yml (Serverless Framework) and template.yaml (SAM), evolving from the static-IP Lambda pattern: the function runs in a private subnet behind a NAT Gateway + Elastic IP for a fixed outbound IP, fronted by API Gateway with an open-api.yaml contract. Active across 2023–2025.

Technologies & Approach

TypeScript on AWS Lambda, packaged via Webpack and deployed through the Serverless Framework (with SAM templates retained). SendGrid and MessageBird abstract email/SMS delivery; Zod enforces request schemas; the VPC/NAT/EIP topology guarantees a static egress IP for whitelisting.

Outcome / Impact

A reusable, IP-stable messaging endpoint that any internal project can call to send email or SMS. Demonstrates production serverless engineering: provider abstraction, typed validation, and non-trivial VPC networking, maintained and iterated over roughly two years.

Capabilities Demonstrated

  • Serverless multi-channel messaging (SendGrid email + MessageBird SMS)
  • Static-egress-IP Lambda networking for partner whitelisting
  • Typed request validation with Zod
  • Dual Serverless Framework / SAM IaC packaging
More work See all →