Hermes Wiki

Domain 4: Design Cost-Optimized Architectures

Domain 4 Mind Map

Mind Map Outline

  • Storage Optimization
    • Amazon S3: Lifecycle Policies (Automated Transitions), Intelligent-Tiering (Unknown Access Patterns), Storage Classes (Standard-IA, One Zone-IA, Glacier), Requester Pays (Shift Download Costs), Moving BLOBs from DB to S3
    • Amazon EBS: Right-sizing (gp3 vs Provisioned IOPS), Delete Unattached Volumes (Trusted Advisor), Data Lifecycle Manager (Snapshot Deletion), Burstable Performance (gp2/gp3)
    • Migration & Hybrid: Snow Family (Bulk Physical Transfer), Ephemeral Storage (Instance Store included in rate), S3 File Gateway (Caching for on-premises)
  • Compute Optimization
    • Purchasing Models: Spot Instances (Fault-tolerant/Batch, 90% savings), Savings Plans (Flexible across EC2, Fargate, Lambda), Reserved Instances (Predictable baseline usage), On-Demand (Unpredictable/Short-term)
    • Scaling & Design: Horizontal Scaling (More smaller instances), Compute Optimizer (AI-based right-sizing), Auto Scaling (Match capacity to demand), EC2 Hibernation (Pause compute costs)
    • Managed & Serverless: AWS Lambda (Pay per duration/memory), AWS Fargate (Eliminate idle capacity), Batch (Spot Instance orchestration)
  • Database Optimization
    • Selection & Migration: NoSQL Migration (DynamoDB for simple schema), Aurora Serverless (Unpredictable/Intermittent load), Scale to Zero (Aurora Serverless pausing)
    • Scaling Strategies: Read Replicas (Cheaper than vertical scaling), ElastiCache (Offload DB queries), RDS Proxy (Connection pooling/sharing)
    • Management: Backup Retention Policies, Point-in-Time Recovery alignment with RPO, RDS Storage Auto Scaling
  • Network Optimization
    • Data Transfer Efficiency: VPC Gateway Endpoints (Free S3/DynamoDB traffic), CloudFront (Cheaper egress than EC2-to-Internet), Same Availability Zone routing (Avoid cross-AZ fees), Global Accelerator (Optimize global paths)
    • Connectivity & Hubs: Site-to-Site VPN (Cost-effective DX backup), Shared NAT Gateway (Consolidate for Dev/Test), VPC Peering (Cheaper than Transit Gateway), API Gateway Throttling (Prevent runaway costs)
  • Cost Management Tools
    • Monitoring & Analysis: AWS Cost Explorer (Trend analysis), Cost and Usage Report (CUR) (Granular data), AWS Budgets (Automated alerts/actions)
    • Governance: Cost Allocation Tags (Attribution), Trusted Advisor (Identify idle resources), AWS Organizations (Consolidated billing)

Domain 4: Design Cost-Optimized Architectures constitutes 20% of the SAA-C03 exam and focuses on the core theme of eliminating payment for idle resources by leveraging various pricing tiers, right-sizing, and automation.

1. Design Cost-Optimized Storage Solutions

Cost optimization in storage requires matching the data's access patterns to the most economical service and configuration.

  • Amazon S3 Tiering and Lifecycles: Use S3 Lifecycle policies to automatically transition data to cheaper tiers like Glacier or delete it when no longer needed.
    • S3 Intelligent-Tiering is ideal when access patterns are unknown, as it automatically moves individual objects to the most cost-effective tier as patterns change.
    • Standard-IA and One Zone-IA offer lower storage costs for rarely accessed data but incur retrieval fees.
    • For external data sharing, a Requester Pays bucket can shift the costs of requests and data downloads from the owner to the requester.
  • EBS Right-sizing: Avoid over-provisioning by ensuring volumes are correctly sized for the workload. You can optimize costs by switching from Provisioned IOPS to gp3/gp2 if the workload can be handled by bursting performance.
  • Hybrid Migration: For moving massive amounts of data (terabytes to petabytes), using the AWS Snow Family (e.g., Snowball) is often faster and more cost-effective than using a dedicated internet line.
  • Ephemeral Storage: Locally attached instance store (ephemeral storage) is the lowest-cost compute-related storage option because it is included in the EC2 instance's hourly run rate, though it is not for persistent data.

2. Design Cost-Optimized Compute Solutions

Selecting the appropriate instance family, size, and pricing model is critical for compute savings.

  • Purchasing Models:
    • On-Demand: Best for unpredictable, short-term workloads with no commitment.
    • Savings Plans and Reserved Instances (RIs): Offer up to 72% savings for predictable, baseline production loads with 1- or 3-year commitments.
    • Spot Instances: Offer up to 90% discounts for stateless, fault-tolerant, or batch processing workloads that can handle interruptions.
  • Right-sizing and Elasticity: Always select the cheapest instance family (e.g., compute-optimized vs. memory-optimized) that meets performance requirements. Use horizontal scaling (more smaller instances) rather than vertical scaling (larger instances) to improve elasticity and reduce costs.
  • Managed and Serverless Services: Managed services like AWS Lambda or Fargate reduce costs by removing the need to manage underlying servers; for Lambda, you are only charged for the resources consumed and the actual runtime.

3. Design Cost-Optimized Database Solutions

Database costs are optimized by selecting the right data store and reducing administrative overhead.

  • Service Selection: Relational databases (RDS) are not always the answer; moving subsets of data to Amazon DynamoDB (NoSQL) or large objects to Amazon S3 can reduce the total cost of ownership.
  • Scaling Strategies: Horizontal scaling—such as adding a Read Replica or using Amazon ElastiCache—is often more cost-effective than vertically scaling a database instance to handle heavy read traffic.
  • Aurora Serverless: This is more cost-effective than standard Aurora for workloads that are unpredictable or have frequent periods of inactivity.
  • Backup Management: Align your backup plan with your RPO requirements and use retention policies to ensure snapshots are not kept beyond their useful life.

4. Design Cost-Optimized Network Architectures

Networking costs are primarily driven by data transfer and the use of specialized connectivity services.

  • Data Transfer Costs: While data transfer into AWS is free, data transfer out to the internet is expensive, and traffic across Availability Zones or Regions also incurs charges.
  • Optimization Patterns:
    • VPC Endpoints: Use Gateway Endpoints for S3 and DynamoDB to allow communication without incurring data transfer charges within the same region.
    • Amazon CloudFront: Use CloudFront to cache data closer to users; data transfer from CloudFront to the internet is generally cheaper than raw EC2-to-internet egress.
    • NAT Gateways: In development environments, use a single shared NAT Gateway rather than one per Availability Zone to minimize hourly costs.
  • Hybrid Connectivity: A Site-to-Site VPN is typically more cost-effective and faster to implement than AWS Direct Connect unless high throughput or specific security is required.
  • VPC Peering: For connecting VPCs, VPC Peering can be more cost-effective than using an AWS Transit Gateway.

Monitoring and Management Tools

Continual improvement through monitoring is essential for an iterative cost-optimization strategy.

  • AWS Cost Explorer: Provides a high-level view of costs and allows for drilling down into specifics.
  • AWS Budgets: Allows you to set thresholds and initiate automated actions or alerts when spending exceeds limits.
  • Cost and Usage Reports (CUR): Offer the most granular breakdown of costs by the hour, day, or resource tag.
  • Trusted Advisor: Identifies underutilized resources, such as unattached EBS volumes, to help eliminate waste.
  • Tagging Strategy: Use cost allocation tags to accurately categorize, track, and attribute expenditures across different projects or domains.

Domain 4: Design Cost-Optimized Architectures (20%)

The Core Theme: Stop paying for idle resources. Leverage tiers and lifecycle rules.

1. Compute Cost Optimization

  • On-Demand: Paid by the second. No commitment. Use for unpredictable, short-term testing workloads.
  • Savings Plans / Reserved Instances (RIs): Commit to a consistent amount of compute usage (measured in $/hr) for a 1- or 3-year term. Saves up to 72%. Use for baseline, predictable production loads.
  • Spot Instances: Spare AWS capacity discounted up to 90%. Exam trap: AWS can reclaim them with a 2-minute warning. Only use for stateless, fault-tolerant workloads (e.g., batch processing, background workers).

2. S3 Lifecycle Tiering

Moving data through S3 tiers automatically via lifecycle policies is a major component of the cost domain:

[S3 Standard] ---> (After 30 days) ---> [S3 Standard-IA] ---> (After 90 days) ---> [S3 Glacier Flexible]
(Frequent Access)                         (Infrequent Access)                         (Archival / Retain)

  • S3 Intelligent-Tiering: Automatically moves objects between frequent and infrequent tiers based on access patterns without operational overhead. Best when access patterns are totally unknown.
  • S3 Standard-IA / One Zone-IA: Lower storage cost, but you pay a per-GB retrieval fee. Use for backups you rarely access. One Zone is 20% cheaper but loses data if an AZ goes down.
  • Glacier Instant Retrieval: Millisecond retrieval for archives accessed a few times a year.
  • Glacier Flexible/Deep Archive: Takes minutes to hours to retrieve, but offers the absolute lowest storage cost on earth. Used for compliance data.

3. Networking Cost Controls

  • Data transfer into AWS is free. Data transfer out to the internet is expensive.
  • Data transfer across AZs within the same region costs money.
  • Optimization Pattern: If you need to cache data locally or reduce internet egress charges, route external traffic through Amazon CloudFront because data transfer from CloudFront out to the internet is cheaper than raw EC2-to-internet egress.
Hermes Wiki