SDG19

AWS Solutions Architect · Capstone

Serverless commerce,drawn to scale.

An e-commerce API that sleeps at 3 a.m. and survives Black Friday. Orders flow through DynamoDB streams into an SNS/SQS fan-out that sends audited confirmation emails and feeds a near-real-time data lake, all deployed by CDK across two regions with no static credentials.

01 — Brief

What the business asked for

02 — Architecture

One request path, one event backbone

Synchronous calls stay short: the edge authenticates, a Lambda writes one item to DynamoDB, and the response returns. Everything else, including email, audit and analytics, happens asynchronously off the table’s change stream.

SDG19 AWS architecture diagramUsers reach Route 53, WAF and two CloudFront distributions. The web distribution serves the Angular app from S3. The API distribution fronts an API Gateway HTTP API with a Cognito JWT authorizer, which invokes Lambda functions backed by a DynamoDB single table. The table stream triggers an order-stream Lambda that publishes to SNS. SNS fans out to two SQS queues: one feeds the order-email Lambda, which stores audit copies in an encrypted S3 bucket replicated to us-east-2 and sends mail with SES; the other feeds the order-lake Lambda, which writes to Kinesis Data Streams and Firehose into a Parquet data lake in S3.REGION us-east-1REGION us-east-2EDGE · ROUTE 53 · WAFDynamoDB StreamusersCFCloudFrontwebS3WebBucketAngular SPAIdPCognitoUser Pool · JWTCFCloudFrontapiAPIGWHTTP APIJWT authorizerλAPI Lambdas7 handlers · 1 bundleDDBDynamoDBsingle-table + GSI1λorder-streamstream → publishSNSorders topicfan-outSQSemail queue+ DLQλorder-emailno PII copiesSESSES templateDKIM · MAIL FROMS3EmailsBucketKMS · 10 yrS3Replicaown KMS keySQSlake queue+ DLQλorder-lakeput recordsKDSKinesisdata stream · KMSKDFFirehose→ ParquetS3DataBucketpartitioned by hourLEGENDSynchronous requestOrder eventCross-region replicationλ = AWS Lambda · Node.js 24X-Ray on every functionSSE-KMS at restTLS in transit
Read the diagram as a list

Users reach Route 53, WAF and two CloudFront distributions. The web distribution serves the Angular app from S3. The API distribution fronts an API Gateway HTTP API with a Cognito JWT authorizer, which invokes Lambda functions backed by a DynamoDB single table. The table stream triggers an order-stream Lambda that publishes to SNS. SNS fans out to two SQS queues: one feeds the order-email Lambda, which stores audit copies in an encrypted S3 bucket replicated to us-east-2 and sends mail with SES; the other feeds the order-lake Lambda, which writes to Kinesis Data Streams and Firehose into a Parquet data lake in S3.

03 — Flows

Follow an order

F-01

Place the order

  1. Angular app → CloudFront (API) + WAF
  2. API Gateway HTTP API validates the Cognito JWT
  3. createOrder Lambda writes PK=USER#sub · SK=ORDER#id
  4. GSI1 serves “my orders” with cursor pagination

Products are cached at the edge; orders are never cached.

F-03

Land it in the lake

  1. Same SNS topic → dedicated SQS lake queue
  2. order-lake Lambda → Kinesis Data Stream (KMS)
  3. Firehose converts to Parquet
  4. S3 DataBucket, partitioned by hour

Analytics consumers never touch the transactional table.

04 — Trade-offs

Decisions worth defending

05 — Quality & security

Hardened, measured, documented

The pipeline treats the supply chain as part of the architecture.

  • Tests

    ≥80% coverage gate

    Vitest across backend, infra (CDK assertions) and web, with LCOV reported to SonarCloud quality gates.

  • SAST

    CodeQL + SonarCloud

    Static analysis of the TypeScript code and of the GitHub Actions workflows themselves, plus SonarCloud quality gates.

  • Supply chain

    Zero high or critical advisories

    npm audit blocks CI, dependency review gates PRs, Dependabot runs grouped updates with a cooldown, and every action is pinned to a commit SHA.

  • Runtime

    Encrypted and traced

    KMS on DynamoDB, S3, SNS, SQS and Kinesis; WAF on both distributions; X-Ray traces on every Lambda.

06 — Go deeper

Everything is documented

07 — Contact

Need this builtfor your product?

I design and ship cloud-native systems end to end: architecture, infrastructure as code, APIs, frontend and the pipeline that keeps them safe. Let’s talk about yours.