Digital Endeavours architected and built a greenfield AWS platform for a music industry business, end to end. Working through a consultancy, Digital Endeavours tested the major technology choices against the real workload and the cost to a small business, and left the consultancy’s team with skills and patterns they could reuse beyond the project.
The first priority was the client portal. Within days, Digital Endeavours had the hosting in place, so the frontend contractor could build something real for the end client to see. That early, visible progress made things more positive between the consultancy and its client.
Digital Endeavours wrote the infrastructure in Terraform and deployed it through GitHub Actions, using OIDC throughout so GitHub held no long-lived AWS credentials. The accounts sat under AWS Organizations, Terraform state was encrypted and locked, and billing alarms were in place from the start. Every compute resource ran in private subnets. Where resilience and cost pulled in different directions, Digital Endeavours chose cost deliberately, with a single NAT Gateway and only a few VPC endpoints to keep extra items off the bill.
The backend contractor preferred Django, having built with it before, so Digital Endeavours hosted it on ECS Fargate with an Aurora Serverless v2 PostgreSQL database instead of steering them towards something new. The platform had an admin portal and a client portal, each deployed automatically through GitHub Actions. Admin users signed in through Cognito, and the admin portal sent its emails through SES.
The consultancy expected Lambda to suit the data scientists’ code, and it would have been the cheapest option. Digital Endeavours tested that against what the code actually had to do and found one stage ran for around 16 hours, far beyond Lambda’s 15 minute limit. Digital Endeavours moved the work to ECS Fargate and guided the data scientists through building Docker images. Each image built automatically from its own repository and was scanned for vulnerabilities, and Digital Endeavours fixed the issues the scans raised.
Running the stages one after another raised a problem. Terraform had no concept of when a stage’s work was finished, only that one task should be running, so once the first stage completed, it started again and fetched the same data a second time. Digital Endeavours fixed this with an event driven architecture, so each stage started only when the previous one reported it was done. Each stage signalled completion through a queue and an alarm, which triggered a short Python Lambda, written by Digital Endeavours, to stop the finished task and start the next. The Lambdas were built as container images like the rest of the pipeline, and when the data scientists found Lambda still running older images, Digital Endeavours added rules that updated each function whenever a new image was published.
The data was highly connected, so Digital Endeavours chose Amazon Neptune as a graph database. A managed service meant the platform would not depend on in-house database expertise once the consultancy’s work ended. Several stages queried Neptune independently, so Digital Endeavours adapted AWS’s Python script for SigV4 signing, giving every connection temporary credentials instead of stored ones. Data reached Neptune as large CSV files staged in tightly permissioned S3 buckets, and when some of it went missing even though it appeared to reach Neptune’s endpoint, Digital Endeavours changed the loads to smaller chunks.
Later stages of the pipeline used machine learning. Digital Endeavours assessed SageMaker and ruled it out, because its cost outweighed what it would provide. The model versioning tool the team chose suggested engineers push models to S3 straight from their laptops, which would have meant long-lived access keys and unreviewed models reaching production. Digital Endeavours assessed the options and recommended an alternative that would cost under $40 a month. Models would pass through a management environment that scanned them for malware before they reached development, and promotion to production would need a release approved by another team member. The consultancy could apply the approach beyond this project.
Digital Endeavours was asked to investigate the Django container build, which took around 60 minutes. Moving the base image from Alpine Linux to Amazon Linux 2023 cut it to 3 minutes. Alpine uses musl rather than glibc, so pip had been compiling Python packages from source instead of downloading prebuilt wheels. When data transfer charges caused spikes in the AWS bill, Digital Endeavours traced the cause, partly how often new versions of the app were being built, and showed the team how to avoid the same charges recurring.
Results
Over a year, Digital Endeavours took the platform from a greenfield start to working portals, a backend and an event driven data pipeline, all deployed through Terraform and GitHub Actions. Along the way, the backend build dropped from an hour to 3 minutes, and the consultancy’s data scientists were building their own container images through automated, scanned pipelines.
Key Technologies
CI/CD & IaC: GitHub Actions, Terraform
Infrastructure: AWS (Organizations, VPC, ECS Fargate, Lambda, Aurora Serverless v2, Neptune, S3, CloudFront, ALB, SES, ECR, SQS, EventBridge, Cognito, Route53, ACM)
Application Stack: Python, Django, Docker
Monitoring: CloudWatch