Files
acdl/modules/l2/microservice
Jon Chery 3b1181f39b
acdl-ci / Lint (push) Successful in 10s
acdl-ci / Platform check-only (offline) (push) Successful in 25s
acdl-ci / Test (push) Successful in 6m34s
Merge milestone/v1.14-refinement — v1.14 complete (NFR Refinement: bug fixes, security, stubs, tests, docs; 20 phases + final; tag v1.13.24)
v1.14 NFR Refinement milestone complete. 20 execution phases (P1-P20) +
1 final (P21). All P1/P2 backlog from v1.11 review resolved. Security
posture hardened (swallowed errors, account ID externalized, IAM scoped,
schema validation, credential hygiene). Stubs resolved (kyverno --kube-
version removed). 7 untested scripts gained coverage. Documentation
synced (ARCHITECTURE v1.11-v1.14 addenda, stale @v1.6-1.9 -> @v1.13,
GRILL G-005/G-008 resolved, COST.md window extended, D-083 deferral
recorded). Platform VPC parameterized.

561 tests pass (was 528 at v1.13.2; +33). 22/22 capabilities Verified.
6 grill binding decisions (G-101..G-106) applied. 1 escalation (E-001)
auto-resolved at full autonomy (D-101).

---ci---
project: acdl
phase: 21
milestone: v1.14
status: complete
---/ci---
2026-07-29 21:36:37 +00:00
..

microservice — ECS Fargate microservice

Module kind: module pattern | Version: 1.0.0

A pattern that references multiple primitives to deploy an ECS Fargate microservice end-to-end (VPC, cluster, ECR, IAM role, ALB, ECS service).

Resources

The pattern references these primitives:

Primitive Purpose README
vpc VPC, subnets, routing README
ecs-cluster ECS Fargate cluster README
ecr ECR image repository README
iam-role IAM task execution role README
alb Application Load Balancer README
ecs-service ECS task definition + service README

Inputs

Name Type Required Description
image string yes ECR image URL for the task container
port number yes Container port the service listens on
region string yes AWS region
cidr string no VPC CIDR block (default 10.0.0.0/16)
azs string no Comma-separated availability zones

Outputs

Name Type Description
lb_arn arn The load balancer ARN
service_arn arn The ECS service ARN

Usage

Define a contract referencing this module:

environment: dev
id: msvc
infrastructure:
  microservice:
    inputs:
      image: 581513795199.dkr.ecr.us-east-1.amazonaws.com/acdl-microservice:latest
      port: 8080
      region: us-east-1
    version: 1.0.0
name: microservice

Compliance extension points

The pattern can wire compliance resources across primitives when the compliance milestone (GDPR, SOX, SOC2, DORA) lands:

  • KMS key — shared encryption key referenced by S3, ECR, CloudWatch Logs, and Secrets Manager.
  • CloudTrail — management-plane audit trail for the entire stack.
  • VPC Flow Logs — network audit trail.
  • Security groups — proper network segmentation between ALB, service, and data tiers.
  • Private subnets — ECS tasks in private subnets with NAT egress.

See each primitive's README for per-module compliance extension points.

Examples

Validated example contracts are in examples/. The platform-test pipeline validates them against schemas/contract.schema.json.

Simple

A minimal deployment (minimal Fargate, no ALB):

examples/simple.yml

environment: dev
id: msvc
infrastructure:
  microservice:
    inputs:
      bucket_name: my-microservice-demo
      image: public.ecr.aws/docker/library/nginx:latest
      port: 80
      region: us-east-1
    version: 1.0.0
name: microservice

Complex

A production deployment with optional inputs (ALB + env vars + health check):

examples/complex.yml

environment: dev
id: msvc
infrastructure:
  microservice:
    inputs:
      bucket_name: my-production-microservice
      env:
        ENVIRONMENT: production
        LOG_LEVEL: info
      image: public.ecr.aws/docker/library/nginx:latest
      port: 8080
      region: us-east-1
    version: 1.0.0
name: microservice

Versioning

1.0.0 — interface MAJOR, behavior MINOR, lifecycle PATCH. MAJOR bumps require a new registry entry (immutable publication); old entries enter a 12-month deprecation window.