A production-ready API platform demonstrating DevOps and SRE best practices. Built with Go, Kong, AWS ECS Fargate, and comprehensive observability.
This project implements a simple HTTP API service with enterprise-grade infrastructure, security, and monitoring capabilities. The platform showcases:
- Go API Service: RESTful API with health checks and sum calculation endpoint
- Kong API Gateway: 100% SaaS: API Authentication, rate limiting, and API management
- AWS Infrastructure: ECS Fargate with auto-scaling, load balancing, and security
- Observability: CloudWatch monitoring, dashboards, and alerting
- CI/CD: GitHub Actions for automated testing and deployment
- Security: API key authentication, secrets management, network isolation, vuln scanning
- Kong API Keys and Rate Limiting: Demonstrates API key authentication and rate limiting configuration
- With and Without Kong: Shows the difference between direct API access and Kong-proxied requests
- Kong Offerings and Security Reflections: Discussion of Kong's security features and architectural decisions
- GitHub Actions CI/CD: CICDs Walkthrough
πVery basic flow of the requests:

πTerraform Graph of current arch (see file):
πComprehensive current AWS arch: click here
- Client: External users making API requests to Kong's endpoint
- Kong Konnect: Serverless API gateway (SaaS) handling authentication and rate limiting, authorizes or not the trafic to AWS
- AWS ALB: Application Load Balancer distributing traffic to ECS tasks
- ECS Fargate: Container orchestration running the Go API service
- CloudWatch: Comprehensive monitoring, logging, and alerting
- GitHub Actions: CI/CD pipeline for automated deployments
After some trials and erros i designed a new architecture that is better than the one i deployed for the challenge:
πDesired architecture (no public IP):

It seems better because on this one Zama has zero public exposure end-to-end. The problem with the current one (using serverless kong) is that we are forced to expose the backend to the internet (even if locked down by headers/mTLS).
.
βββ .github/ # GitHub Actions CI/CD workflows
β βββ workflows/
β βββ ci.yml # Continuous integration
β βββ deploy.yml # AWS deployment pipeline
β βββ docker.yml # Docker build and push
β βββ kong-konnect-test.yml # Kong integration tests
β βββ security-validation.yml # Security scanning
β βββ status.yml # Status checks
β βββ terraform.yml # Infrastructure validation
βββ api-go-service/ # Go API application
β βββ cmd/server/ # Application entry point
β βββ internal/ # Private application code
β β βββ config/ # Configuration management
β β βββ handlers/ # HTTP request handlers
β β βββ middleware/ # HTTP middleware
β β βββ models/ # Request/response models
β β βββ server/ # Server setup and routing
β βββ pkg/logger/ # Shared logging utilities
β βββ Dockerfile # Container definition
β βββ Makefile # Build automation
β βββ README.md # API service documentation
βββ config/ # Configuration files
β βββ dev/ # Development environment configs
β βββ kong/ # Kong configuration
β βββ local/certs/ # Local SSL certificates
βββ docs/ # Project documentation
β βββ images/ # Architecture diagrams
β βββ kong-docs/ # Kong reference documentation
β βββ zama-challenge-docs/ # Challenge requirements
β βββ SIMPLIFIED_MONITORING.md # Monitoring overview
βββ monitoring/ # CloudWatch configuration
β βββ alerts.json # Alert definitions (doc for ref)
β βββ dashboard.json # Dashboard configuration (doc for ref)
βββ scripts/ # Deployment and utility scripts
β βββ deploy-terraform.sh # Infrastructure deployment
β βββ setup-terraform-backend.sh # Terraform s3 state setup
β βββ test-endpoints.sh # API testing script
βββ terraform/ # Infrastructure as Code
β βββ environments/dev/ # Environment-specific configs
β β βββ networking/ # VPC, subnets, security groups
β β βββ secrets/ # AWS Secrets Manager
β β βββ observability/ # CloudWatch, alarms, SNS
β β βββ compute/ # ECS, ALB, auto-scaling
β βββ modules/ # Reusable Terraform modules
β β βββ networking/ # Networking module
β β βββ compute/ # Compute module
β β βββ observability/ # Monitoring module
β βββ INFRASTRUCTURE.md # Comprehensive infrastructure docs
β βββ plan.txt # Terraform plan output
β βββ terraform_graph.png # Infrastructure dependency graph
βββ LICENSE # Project license
βββ README.md # This file
π See this README
πComprehensive AWS architecture: click here
πSee the plan.txt that contains the terraform commands outputs: click here
The platform uses Terraform with separated state files for better isolation:
-
Setup Terraform Backend:
cd scripts chmod +x setup-terraform-backend.sh ./setup-terraform-backend.sh -
Deploy All Infrastructure:
chmod +x deploy-terraform.sh ./deploy-terraform.sh
This deploys modules in dependency order:
networkingβ VPC, subnets, security groupssecretsβ AWS Secrets Manager with API keysobservabilityβ CloudWatch dashboards, alarms, SNScomputeβ ECS Fargate, ALB, auto-scaling
-
Manual Terraform Deployment:
cd terraform/environments/dev cd networking && terraform init && terraform apply cd ../secrets && terraform init && terraform apply cd ../observability && terraform init && terraform apply cd ../compute && terraform init && terraform apply
Test the rate limiting functionality (should hit the limit after several requests):
for i in {1..11}; do
curl http://kong-4994957fd2euqcpzn.kongcloud.dev/healthz
doneTest with valid API key:
curl http://kong-4994957fd2euqcpzn.kongcloud.dev/api/v1/sum \
-H 'Content-Type: application/json' \
-d '{"numbers": [1, 2, 3, 4, 5]}' \
-H "test-user-bob:BOB-API-KEY-123"Test without API key (should fail with 401):
curl http://kong-4994957fd2euqcpzn.kongcloud.dev/api/v1/sum \
-H 'Content-Type: application/json' \
-d '{"numbers": [1, 2, 3, 4, 5]}'Test the API service directly through AWS ALB:
curl -X POST http://zama-api-platform-dev-alb-418928923.eu-west-1.elb.amazonaws.com:8080/api/v1/sum \
-H 'Content-Type: application/json' \
-d '{"numbers": [1, 2]}'curl http://zama-api-platform-dev-alb-418928923.eu-west-1.elb.amazonaws.com:8080/healthzThis script tests:
- β Direct API service health checks
- β Kong proxy functionality
- β API key authentication
- β Rate limiting behavior
- β Input validation
- β Error handling
If given more time, the following enhancements would be valuable:
- Put in place the Developer portal (Kong offers that): Set up a proper IdP like Auth0 or Keycloak on this developer portal for OIDC (enforce MFA in Auth0); implement JWT validation, API key self-service for developers ; Usage analytics and quota management
- SLO definitions with Proper Metrics: request duration histograms (not just averages), business metrics (API calls per developer, quota usage), distributed tracing with AWS X-Ray
- better alerting and monitoring stack: Distributed tracing, Synthetic monitoring, better logs aggreg', in depth Performance testing
- turn the docker registry private or go for ECR
- replace AWS Secret manager with Hashicorps Vault or similar stronger alternatives
- OIDC to avoid long lived aws account credentials used in GithubActions
- Comprehensive AWS IAMs
- Better protect AWS Root account (yubikeys etc)
- Better protect public IP AWS Endpoint using mTLS or Dedicated Kong instances
- I actually know a company that had to put in place a API layer and secure it, it is: https://www.dfns.co/ and i might be able to get feedback on the API tools they decided to go for.
- Put in place corporate security postures (zero trust networking, devices posture checks, JAMF, yubikeys, etc)
- Review zama's DNS settings to prevent DNS hijacks and similar
- improve security around the CICDs
- Strong Multi-region deployment strategy
- Circuit breaker pattern (on Kong side, and ALB side?)
- the use of an external IdP different than the AWS identity (for our internal AWS IAM part i mean)
- mTLS end to end
- Automated rollback and Blue/green deployments
- put in place disaster recovery procedures and incident response runbooks
- dead man switch for the monitoring and alerting part (and add another monitoring Stack along the AWS's native one? (Prom/Grafana/AlertM, etc))
- Set Kong config as Code and not from the web UI (i think that is not possible for serverless opiton i picked, but at least save CLI commands))
During this project, i used AI coding assistance (Cursor + Claude 4 Sonnet Max and ChatGPT5:
- I works wuite well to kick start and create files.
- Must beware of outdated versions of modules/pkgs, CICDs GH actions modules etc.
- It works great at injesting large docs (used it a lot on Kong and AWS/terra docs) to find out are be the best tech/config choices to go for.
- great at generating REAMDE docs too
