Case study · AWS · Architecture · CI/CD

AWS architecture portfolio

Four AWS builds, each documented the way a team would hand it over: architecture, security, operations and teardown notes, with decision records for the key trade-offs.

The four builds

BuildWhat it showsServices
01 Serverless APIA REST API for managing tasks (GET, POST, PUT, DELETE) with a least-privilege Lambda execution roleAPI Gateway, Lambda, DynamoDB, CloudWatch
02 Event-driven architectureSNS fanout, SQS buffering and a Lambda consumer, with retries and a dead-letter queueSNS, SQS, Lambda
03 Static site and CDNGlobal delivery of a static site from a private S3 bucketS3, CloudFront (OAC)
04 CI/CD with OIDCPush-to-deploy pipeline with sanity checks, S3 sync and CloudFront invalidation, with no long-lived credentialsGitHub Actions, IAM (OIDC), S3, CloudFront

All four were built and tested in a live AWS account, with screenshots as evidence, and each has teardown steps so nothing keeps running.

No stored AWS credentials

The deployment workflow assumes an IAM role through OpenID Connect. There are no access keys in GitHub, and the role is scoped to the S3 and CloudFront actions the pipeline needs. The pipeline checks out the code, assumes the role, runs sanity checks on the site contents, syncs the files to S3 and invalidates the CloudFront cache. Rolling back means redeploying a previous commit.

A private origin

The S3 bucket stays private with Block Public Access turned on. CloudFront reaches it through Origin Access Control, so the only public path to the content is the CDN.

Designing for failure

In the event-driven build, a message that fails processing is retried automatically. The source SQS queue has a dead-letter queue with maxReceiveCount = 3, so after three failed receives the message moves to the DLQ instead of blocking the queue. That keeps bad messages for inspection and reprocessing. I raised an exception in the Lambda function on purpose to confirm the retry behaviour, the DLQ routing and that no message was lost.

Decisions written down

The repository includes decision records for the trade-offs: Lambda vs EC2 and DynamoDB vs RDS.

What is and is not infrastructure as code

The live resources were created manually, to keep the focus on architecture and security configuration. Build 04 includes an iac/ template that shows how the deployment could be provisioned as code. For the infrastructure-as-code side, see the Azure Terraform pipeline.