Capstone architecture and design review
Your capstone brief
Build the infrastructure design for LedgerLeaf, a fictional subscription invoicing business. Customers submit invoices and query their status; workers produce reports. The service needs HTTPS, private database access, auditable changes and separate environments. The required work is an offline architecture and evidence package, not a deployment. Choose AWS or Azure as the primary platform and compare the other as an alternative for a future customer with hosting constraints. Do not run both merely to call the design multi-cloud. The application must be adapted and tested if database engines differ. A single primary writer is required for financial records.
AWS variant: client -> HTTPS load balancer -> ECS service (private tasks) -> RDS PostgreSQL (private subnets)Azure variant: client -> HTTPS application ingress -> App Service -> VNet integration -> Azure SQL private endpointEach variant: separate dev/staging/prod trust boundaries; independent state; workload identity -> secret storeData schemas are NOT interchangeable: Azure SQL requires application adaptation and migration testing.Use the following fictional targets: 99.9% successful requests per month, recovery time objective (RTO) 60 minutes and recovery point objective (RPO) 5 minutes. These are requirements, not measured capabilities. Production test data must never be copied into development without an approved sanitization process.
Compare the two variants
AWS uses a public HTTPS application load balancer with private ECS tasks. The database subnet group spans suitable availability zones; public database access is disabled and the database security group permits only the application security group on the required port. An ECS task role grants narrowly scoped application permissions, distinct from the execution role used by the platform. For Azure, use an HTTPS App Service ingress and regional VNet integration for outbound connections to an Azure SQL private endpoint, with private DNS and public database network access disabled. The integration subnet and private endpoint subnet serve distinct purposes. Managed identity can authenticate to compatible services after the correct data-plane authorization is assigned. Private addressing alone does not grant authorization or ensure TLS. Validate DNS, routes, authentication and encrypted connections in each design.
Capability AWS candidate Azure candidateApp hosting ECS service on Fargate App ServiceRelational storage RDS PostgreSQL Azure SQL DatabasePrivate access Subnets + security groups Private Link + private DNSWorkload identity ECS task role Managed identitySecret store Secrets Manager Key VaultState storage S3 with locking enabled Azure Blob backendObservability CloudWatch Azure MonitorThese are comparable capabilities, not one-to-one service equivalents. Azure SQL uses a different engine; justify the adaptation cost or propose a compatible PostgreSQL alternative with its own verified networking design. Compare scaling, availability, restore semantics and operational skills rather than choosing by service count. No service is provisioned in this project.
Define environment and module boundaries
Use separate accounts or subscriptions and deployment identities for dev, staging and prod; separate state keys and access grants for each root. Start with network, data and application roots because their lifecycle and privileges differ. The application consumes a small published contract such as a subnet identifier and database endpoint name. The database password is not an output. A state reader can often access the complete state snapshot even when only outputs are requested, so use a separately authorized configuration publication mechanism. Avoid circular dependencies: network first, data second, application third. The data root needs separate approval for destructive changes. Bootstrap backend storage independently of the workload it tracks.
variant/environment/network -> network contractvariant/environment/data -> database endpoint contractvariant/environment/app -> reads both contractsstate keys: aws/prod/data, azure/staging/app (examples only)owners: platform/network, data/data, service/appEach deployment identity is scoped to one environment and one responsibility. For AWS remote state, use a protected S3 bucket with versioning and supported locking; current documentation describes use_lockfile. Azure Blob backend uses native locking and consistency features. Protect state backups and plan artifacts as sensitive records; restrict read/write rights and verify restoration. A state backup cannot restore lost database rows.
Pin the implementation and test the interface
Pin registry modules to reviewed exact releases in each root; select provider versions with constraints and a reviewed lockfile. Local modules are pinned by the repository revision, not the registry version argument. The following registry address is fictional, deliberately not downloadable. It illustrates how a future internal catalog could be consumed.
module "network" { source = "registry.example.invalid/ledgerleaf/network/aws" version = "1.2.0" environment = "staging"}The starter includes a local Terraform configuration using only terraform_data to demonstrate a contract. Its exact version constraint retains the prior provisional Terraform 1.14.8 baseline; compatibility and execution have not been verified. The local sample does not create a VPC or verify a cloud provider schema. The offline Python harness checks fictional deployment records. Native Terraform test mock providers can replace selected provider behaviors in a separate test environment, but still require reviewed provider schemas and dependencies. A mock cannot establish real connectivity, permissions, availability or cost.
module "contract" { source = "./modules/contract" environment = "staging" variant = "aws"}See the capstone fixture for the local module. The revision is the module version for this bundled source; no fabricated provider lockfile is included.
Build a guarded delivery pipeline
The pull request pipeline formats and validates configuration using a pinned trusted binary, checks reviewed dependencies, runs offline assertions and scans for secrets. Do not expose production credentials to untrusted pull requests. A privileged plan job is isolated and reads only the approved target. Review the saved plan for deletes, replacements, policy failures, unknowns and costs. Apply only the exact approved plan artifact and revision in an authorized environment; stale plans require a new review. Keep plans in restricted artifact storage with a limited retention period. A deployment approval is not a permanent permission to change infrastructure.
untrusted PR -> offline checks (no cloud credentials)trusted merge -> protected plan -> policy/cost review-> environment approval + artifact digest -> serialized apply-> service verification -> release evidence -> close changeThis is pipeline pseudocode, not a configured CI workflow. In this capstone stop after offline checks. The policy model requires private data, encrypted storage, scoped identity, unique state keys, backup and restore evidence, and no broad destructive changes. Deny missing evidence rather than treating an unknown value as safe.
Estimate cost and defend trade-offs
Use the same fictional monthly load for both variants: 100,000 invoices and 730 service hours. Include compute, database, storage, backup, network, observability and support. The following invented amounts are not cloud quotes. Compare unit cost and budget headroom, then test sensitivity to report traffic. A lower modeled price does not prove a platform is cheaper in real operation.
Monthly model (USD, invented) AWS Azurecompute 120 150database 180 160storage + backup 45 50network 35 30observability 30 35support allocation 20 20total 430 445USD per 1000 invoices 4.30 4.45budget 500 500If network cost doubles, totals become 465 and 475. Identify pricing inputs that need region-specific quotes, discounts and tax assumptions. An alert is not necessarily a hard spending cap. Require the candidate architecture to meet recovery and security goals before selecting the lowest modeled cost.
Submit your design
Open lab-fixtures/professional-capstone/README.md. Complete starter/design.json and starter/decisions.md before comparing reference/solution.json and reference/solution.md. Run the offline checker on your draft, fix failures and document any justified alternative controls. Include your diagram, state/ownership matrix, version decisions, pipeline stages, cost calculation and provider choice. Use the rubric to review your reasoning. Do not present a passing synthetic policy check as a production certification. The next lesson tests how your design handles changes and incidents.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Capstone architecture and design review — knowledge check
Review capstone design and operational decisions.
Why compare two alternative deployment variants instead of deploying both?
How is the bundled local module version identified?
Which control is needed in addition to private addressing?
What does a provider lockfile track?
What can the offline checker establish?