Design Cost-Optimized Architectures
What you will learn
In this domain, you learn how to design cost-optimized storage (S3 storage classes and lifecycles), compute (purchasing options, rightsizing, and serverless), databases (capacity modes and Aurora Serverless v2), and networking (data transfer charges, NAT gateways, and VPC endpoints), along with cost management tools such as AWS Cost Explorer and AWS Budgets.
Key points
- Purchasing options - Savings Plans or Reserved Instances for steady usage, Spot Instances for interruptible processing, and On-Demand for short-term or unpredictable usage
- Savings Plans - With Compute Savings Plans, the discount continues even if the EC2 family or Region changes, and it also applies to AWS Fargate and AWS Lambda
- S3 - Intelligent-Tiering for unpredictable access, Glacier Instant Retrieval for data read rarely but needed immediately, and Glacier Deep Archive for long-term retention where retrieval within 12 hours is acceptable
- Rightsizing - Review types and sizes with recommendations from AWS Compute Optimizer, and stop resources during unused hours
- Networking - Avoid NAT gateway processing charges for traffic to S3 and DynamoDB with gateway endpoints
- Management tools - Cost Explorer for analyzing cost trends, and Budgets for budget and forecast notifications
Terms and concepts
EC2 purchasing options
With On-Demand, you pay only for the time you use, with no commitment. Savings Plans and Reserved Instances give discounts for a 1-year or 3-year commitment and suit steady usage. Spot Instances let you use spare capacity at a large discount but can be interrupted, so use them for interruption-tolerant processing.
→ Savings Plans Glossary / → Comparing Savings Plans and RIs
Spot Instances
Spot Instances receive a notice 2 minutes before an interruption. Specifying multiple instance types and AZs makes it easier to obtain capacity, and designing processing so that it can resume partway limits the impact of interruptions. They suit batch processing, CI jobs, and similar work.
S3 storage classes
S3 Standard suits frequently read data, Standard-Infrequent Access suits data read about once a month, Glacier Instant Retrieval suits data read only about once a quarter but needed immediately, Glacier Flexible Retrieval suits data for which retrieval in minutes to hours is acceptable, and Glacier Deep Archive suits data read once or twice a year for which retrieval within 12 hours is acceptable. Lifecycle rules can move objects automatically based on their age in days.
→ Amazon S3 Glossary / → Amazon S3 Glacier Glossary / → Storage tiering strategy
NAT gateways and data transfer costs
NAT gateways incur hourly charges and charges for the amount of data processed. For large volumes of traffic from a private subnet to S3 or DynamoDB, switching to free gateway endpoints lowers costs. Data transfer charges also apply to traffic across AZs and to data sent to the internet.
→ Amazon VPC Glossary / → The cost structure of NAT gateways and how to avoid it
Cost management tools
AWS Cost Explorer analyzes past cost trends and also shows forecasts. AWS Budgets lets you set budgets and notifies you when the actual or forecast amount is likely to exceed them. AWS Compute Optimizer recommends changes to resource types and sizes based on usage records.
→ AWS Budgets Glossary / → AWS Compute Optimizer Glossary / → Managing costs with Budgets