Making Cost-Optimised Architecture Choices
This lesson explains how architectural decisions set the long-term cost baseline, and how cost-optimised designs match pricing models to workload patterns and remove waste continuously.
Learning outcomes
After completing this lesson, you will be able to:
- Choose compute by load pattern.
- Explain how storage is tiered by access needs.
- Explain why operations cost and guardrails belong in cost comparisons.
Compute by load pattern
The cheapest compute depends on how the load behaves. For variable or unpredictable load, serverless services such as Lambda, Fargate, DynamoDB on-demand, Aurora Serverless v2 and Redshift Serverless charge only for use and cost nothing, or little, when idle. For steady load, EC2 covered by Savings Plans gives the lowest price for capacity that is always busy. For fault-tolerant work, such as batch jobs, CI builds, big data and stateless services, Spot Instances offer large discounts in exchange for possible interruption. Across supported workloads, Graviton instances give 20–40% better price performance. The following table summarises the choices.
| Load pattern | Choose |
|---|---|
| Variable or unpredictable | Serverless: Lambda, Fargate, DynamoDB on demand, Aurora Serverless v2, Redshift Serverless (nothing when idle) |
| Steady | EC2 with Savings Plans |
| Fault-tolerant (batch, CI, big data, stateless) | Spot Instances |
| Supported workloads generally | Graviton: 20–40% better price performance |
Compute by load pattern
Storage tiering
Storage costs fall when data sits in the cheapest tier that meets its access needs. S3 Intelligent-Tiering suits data whose access pattern is unknown, and lifecycle rules move data with a known pattern, such as logs, to the Glacier classes. EFS moves files that have not been read recently to its Infrequent Access and Archive classes.
For block storage, gp3 volumes are cheaper than gp2 and allow IOPS and throughput to be set independently of size, so volumes are no longer oversized just to obtain performance, and the EBS Snapshot Archive tier reduces the cost of snapshots kept for months. Simple housekeeping, deleting unattached volumes and old snapshots, often saves more than any tiering.
Operations and guardrails
Managed services reduce the staff cost of patching, scaling and backups, which belongs in any cost comparison with self-managed alternatives. Scheduling, with Instance Scheduler or Systems Manager, stops non-production resources outside working hours, which removes about two thirds of their running time.
Guardrails keep costs from returning. AWS Budgets with actions and Cost Anomaly Detection alert on, or respond to, unexpected spending; SCPs deny expensive instance types and unused Regions; and infrastructure as code modules give teams right-sized defaults. Regular reviews of Cost Optimization Hub and Compute Optimizer recommendations make optimisation a routine rather than an occasional project.
Re-architecting a nightly batch platform
A company runs a fleet of twenty m5.4xlarge On-Demand instances around the clock to process files that arrive between 01:00 and 03:00. Utilisation outside that window is near zero. The redesign:
Before After
---------------------------------------------- --------------------------------------------------
20 x m5.4xlarge On-Demand, 24 x 7 ECS tasks on EC2 Spot (diversified c7g/m7g/r7g, Graviton),
scaling from 0 to the size each night needs
Files land on an NFS server S3 event -> EventBridge -> Step Functions -> ECS tasks
gp2 volumes for scratch Instance store / gp3 only while jobs run
Results kept indefinitely in S3 Standard Lifecycle to Glacier Instant Retrieval after 30 daysCompute that runs two hours a day instead of twenty-four, at Spot prices and with Graviton price performance, typically costs a small fraction of the original. Because the jobs are retryable, Spot interruptions only add delay, and Batch resubmits interrupted jobs automatically.
Which compute suits fault-tolerant batch work at the lowest cost?
Show answer
Spot capacity, through EC2 Spot or Fargate Spot, with checkpointing and a diverse choice of instance types.
Exam Tips
Remember for the exam
- Fault-tolerant batch work at the lowest cost calls for Spot with diversified instance types.
- Variable relational load suits Aurora Serverless v2.
- Unknown object access patterns suit S3 Intelligent-Tiering.
- Cheaper EBS with configurable performance is gp3.
- To stop development environments at night, use scheduling.
- To prevent the use of expensive instance types, use an SCP.