ladderlore
请求新指南
  • 输入服务名称,例如 S3 或 IAM。

Design Cost-Optimized Architectures

复习清单

04

Design Cost-Optimized Architectures

这个领域的要点,几屏读完,考前再看一遍。

这份复习清单暂时以英文显示。

4.1Storage classes and lifecycle

  • Pick the class from the access pattern, then check minimum period, minimum size and read fee.
  • Standard-IA and One Zone-IA: 30 days minimum. Glacier Instant and Flexible: 90 days. Deep Archive: 180 days.
  • IA classes and Glacier Instant bill at least 128 KB per object. Many tiny objects: stay in Standard.
  • Unknown or changing access: Intelligent-Tiering. No read fee, small monitoring fee per object.
  • Glacier Flexible: Expedited 1 to 5 minutes, Standard 3 to 5 hours, Bulk 5 to 12 hours. Deep Archive: 12 and 48 hours.
  • Lifecycle: Standard to IA needs 30 days. Objects under 128 KB do not move by default.

4.1Storage classes and lifecycle

  • Versioned bucket: add a noncurrent version rule. Add a rule to abort incomplete multipart uploads.
  • Requester Pays: the requester pays requests and transfer. Fewer, larger objects cut request cost.
  • Intelligent-Tiering

    Use when
    Access unknown or changing
    Catch
    Small monitoring fee per object
  • Standard-IA

    Use when
    Monthly reads, milliseconds
    Catch
    30 days and 128 KB minimum, read fee
  • One Zone-IA

    Use when
    Re-creatable, infrequent
    Catch
    One AZ only
  • Glacier Instant

    Use when
    Archive read in milliseconds
    Catch
    90 days minimum
  • Deep Archive

    Use when
    Yearly or never, wait up to 12 hours
    Catch
    180 days minimum
Which S3 class, and its catch.

1 / 2

  • Intelligent-Tiering

    Use when
    Access unknown or changing
    Catch
    Small monitoring fee per object
  • Standard-IA

    Use when
    Monthly reads, milliseconds
    Catch
    30 days and 128 KB minimum, read fee
  • One Zone-IA

    Use when
    Re-creatable, infrequent
    Catch
    One AZ only

2 / 2

  • Glacier Instant

    Use when
    Archive read in milliseconds
    Catch
    90 days minimum
  • Deep Archive

    Use when
    Yearly or never, wait up to 12 hours
    Catch
    180 days minimum
Which S3 class, and its catch.

4.1Block, file and scaling

  • gp3 over gp2: about 20% cheaper per GB, 3,000 IOPS baseline, IOPS separate from size.
  • io2 only for sustained very high IOPS or sub-millisecond latency. st1 for big sequential reads, sc1 for cold data.
  • EBS snapshot archive tier: up to 75% cheaper for snapshots kept 90 days or more. Data Lifecycle Manager automates snapshots.
  • Delete unattached EBS volumes and old snapshots.
  • EFS lifecycle moves cold files to Infrequent Access and Archive. EFS One Zone is cheaper, in one AZ.
  • FSx for Windows: HDD is cheaper than SSD, and deduplication saves space. Lustre scratch: short-lived data.

4.1Block, file and scaling

  • Grows by itself: S3, EFS, Aurora. Needs action: EBS (Elastic Volumes, cannot shrink), FSx. RDS autoscaling must be enabled.

4.1Moving data in

  • Time = size divided by bandwidth. 100 TB over 1 Gbps is about 9 days at full speed.
  • Data into AWS is free. Pick the tool by size, deadline and whether it repeats.
  • Too big or too slow: Snow Family. Scheduled online copy: DataSync. Ongoing local access: Storage Gateway.
  • Partners on SFTP, FTPS or FTP: Transfer Family. Far-away uploads to one bucket: S3 Transfer Acceleration.
  • Direct Connect suits steady large flows but takes weeks to order.
Too big or too slow?
Partners use SFTP?
Ongoing local access?
Snow FamilyTransfer FamilyStorage GatewayDataSyncyesnoyesnoyesno
Which migration service.

4.1Cost tools (4.1 to 4.4)

  • A tag shows in billing only after you activate it as a cost allocation tag. A backfill can cover up to 12 past months.
  • Tag policies in Organizations standardize tag keys and values.
  • Cost Explorer: charts, forecasts, rightsizing and Savings Plans recommendations.
  • Cost Anomaly Detection: machine learning flags unusual spend and alerts by email or SNS.
  • Budgets types: cost, usage, RI and Savings Plans utilization, RI and Savings Plans coverage.
  • Budget actions can apply an IAM policy or SCP, or stop EC2 and RDS instances.
  • Cost and Usage Reports: most detailed data, resource IDs, to S3. Query with Athena.

4.1Cost tools (4.1 to 4.4)

  • Consolidated billing: one payer, pooled volume tiers, shared RI and Savings Plans discounts. The management account can turn sharing off.
  • Cost allocation tags

    Split the bill by team or project. Activate in Billing
  • Cost Explorer

    Where did the money go? Forecasts, recommendations
  • Budgets

    Alert or act at a threshold
  • Cost and Usage Reports

    Resource-level data in S3, query with Athena
  • Consolidated billing

    One bill, pooled tiers, shared RIs
Which cost tool for which question.

1 / 2

  • Cost allocation tags

    Split the bill by team or project. Activate in Billing
  • Cost Explorer

    Where did the money go? Forecasts, recommendations
  • Budgets

    Alert or act at a threshold
  • Cost and Usage Reports

    Resource-level data in S3, query with Athena

2 / 2

  • Consolidated billing

    One bill, pooled tiers, shared RIs
Which cost tool for which question.

4.2Purchasing options

  • Steady all year: Savings Plans or Reserved Instances. Unknown or short: On-Demand. Interruptible: Spot, up to 90% off.
  • Standard RI: up to 72%. Convertible RI: up to 66%, can be exchanged. Only Standard can be sold in the Marketplace.
  • Regional RI: any AZ, size flexible, no capacity. Zonal RI: one AZ, capacity reserved.
  • Compute Savings Plan: up to 66%, covers EC2, Fargate and Lambda. EC2 Instance plan: up to 72%, one family and Region.
  • Capacity Reservation: capacity but no discount. Savings Plans: discount but no capacity.
  • Spot: two-minute notice, stay stateless, diversify, price-capacity-optimized. Mixed instances group: On-Demand base plus Spot.

4.2Purchasing options

  • Dedicated Host: per-socket or per-core licences, host affinity. Dedicated Instance: isolation only.
  • Steady all year

    Savings Plans or RIs
  • Spiky or unknown

    On-Demand
  • Interruptible batch

    Spot
  • Per-core licence

    Dedicated Hosts
  • Guaranteed capacity in one AZ

    Capacity Reservation or zonal RI
  • May change service or Region

    Compute Savings Plan
Which purchase option for which workload.

1 / 2

  • Steady all year

    Savings Plans or RIs
  • Spiky or unknown

    On-Demand
  • Interruptible batch

    Spot
  • Per-core licence

    Dedicated Hosts

2 / 2

  • Guaranteed capacity in one AZ

    Capacity Reservation or zonal RI
  • May change service or Region

    Compute Savings Plan
Which purchase option for which workload.

4.2Sizing, scaling and compute choice

  • Rightsize from metrics. Memory needs the CloudWatch agent. Compute Optimizer recommends sizes with the least effort.
  • High CPU and low memory: compute optimized. High memory: memory optimized. Low baseline, short peaks: burstable.
  • Graviton (Arm) gives better price performance if the software supports Arm. Rightsize before buying commitments.
  • Horizontal scaling follows demand without downtime. Vertical scaling needs a restart and has a limit.
  • Non-production: one AZ, smaller, Spot, stopped outside work hours. Production: Multi-AZ.
  • Instance Scheduler on AWS starts and stops EC2 and RDS on a schedule.
  • Stop: pay EBS only, RAM lost. Hibernate: RAM saved to encrypted EBS, fast resume.

4.2Sizing, scaling and compute choice

  • Lambda for bursty or rare load. EC2 or Fargate for steady busy load. Fargate Spot: up to 70% off.
  • Edge: CloudFront Functions for light work, Lambda@Edge for heavier. Outposts processes data locally.

4.3Design cost-optimized database solutions.

  • DynamoDB on-demand for spiky or unknown traffic. Provisioned with auto scaling for steady traffic. Reserved capacity for the base.
  • DynamoDB Standard-IA table class: about 60% cheaper storage, about 25% dearer requests. TTL deletes old items free.
  • DAX cuts read units for hot items. A cache in front of RDS often beats extra read replicas.
  • Stop dev RDS instances when idle (restart after 7 days). Multi-AZ doubles instance cost, so use it in production.
  • Aurora Serverless v2 for variable load. Aurora I/O-Optimized when I/O is over about 25% of the Aurora bill.
  • RDS and Aurora Reserved Instances: engine, family, Region. Database Savings Plans: 1 year, no upfront, up to 35% off, flexible, cover serverless.

4.3Design cost-optimized database solutions.

  • Automated backups: up to 35 days, point-in-time recovery. Manual snapshots stay until deleted.
  • AWS Backup lifecycle: cold storage after N days (90 days minimum) for services that support it.
  • Redshift is columnar, for analytics. Archive old data to S3 and query with Athena.
  • Spiky database traffic

    DynamoDB on-demand, Aurora Serverless v2
  • Aurora I/O over 25% of spend

    Aurora I/O-Optimized
  • Repeated reads

    Cache before read replicas
  • Old data in hot tables

    TTL or export to S3, query with Athena
  • Steady database

    Reserved Instances or Database Savings Plans
Database cost problem and fix.

4.4Transfer, NAT and connectivity

  • Free: data in, and private traffic inside one AZ. Charged: cross-AZ, cross-Region and internet out.
  • Traffic over public or Elastic IPs is charged even inside one AZ. Use private IPs.
  • NAT gateway: hourly fee plus per GB. Gateway endpoints for S3 and DynamoDB are free.
  • One NAT gateway per AZ for resilience. One shared NAT gateway is cheapest but a single point of failure.
  • NAT instance: you manage it, no built-in high availability. Private NAT gateway: no internet, for overlapping ranges.
  • VPN: two tunnels, up to 1.25 Gbps each. More bandwidth: several VPNs with Transit Gateway ECMP.

4.4Transfer, NAT and connectivity

  • Direct Connect: port-hour fee, lower data-out price, weeks to order. Dedicated 1, 10, 100, 400 Gbps. Add a VPN as backup.
  • Peering has no hourly or processing fee. Transit Gateway charges per attachment and per GB.
  • NAT gateway

    Hourly fee and per GB processed
  • Gateway endpoint

    Free, for S3 and DynamoDB
  • Site-to-Site VPN

    Hourly fee, 1.25 Gbps per tunnel
  • Direct Connect

    Port hours, lower data-out price, weeks to order
  • VPC peering

    No hourly or processing fee
  • Transit Gateway

    Per attachment hour and per GB
Cost shape of each network option.

1 / 2

  • NAT gateway

    Hourly fee and per GB processed
  • Gateway endpoint

    Free, for S3 and DynamoDB
  • Site-to-Site VPN

    Hourly fee, 1.25 Gbps per tunnel
  • Direct Connect

    Port hours, lower data-out price, weeks to order

2 / 2

  • VPC peering

    No hourly or processing fee
  • Transit Gateway

    Per attachment hour and per GB
Cost shape of each network option.

4.4Edge caching and throttling

  • CloudFront pays off with repeated content and a high hit ratio. Origin fetch from AWS is free.
  • Raise the hit ratio: longer TTLs, small cache keys, compression. Origin Shield cuts origin requests.
  • Price Class 100: cheapest locations, North America and Europe. Fewer locations means more latency far away.
  • Global Accelerator is for performance and static IPs, not for cutting cost. Route 53 alias queries to AWS resources are free.
  • API Gateway usage plans: rate, burst and quota per customer. 429 means throttled.
  • WAF rate-based rule blocks IPs over a limit. SQS buffers bursts. Lambda reserved concurrency protects the database.

4.4Edge caching and throttling

  • Clients retry with exponential backoff and jitter.

考试陷阱

  • “Unpredictable access, lowest cost, no work” → S3 Intelligent-Tiering, not a lifecycle rule to Standard-IA.
  • “Archive, but readable in milliseconds” → Glacier Instant Retrieval, not Flexible Retrieval.
  • “Billions of tiny objects” → the IA classes bill 128 KB each, so they may cost more, not less.
  • “Tags applied but missing in Cost Explorer” → activate them as cost allocation tags, not apply them again.
  • “Sudden unexpected spend spike, no limit known” → Cost Anomaly Detection, not a fixed budget
  • “Cost per resource ID with SQL” → Cost and Usage Reports with Athena, not Cost Explorer.

考试陷阱

  • “Capacity guaranteed in one AZ” → Capacity Reservation or zonal RI, not a Savings Plan.
  • “May move to Fargate or Lambda” → Compute Savings Plan, not EC2 Instance Savings Plan.
  • “Per-core licences” → Dedicated Hosts, not Dedicated Instances.
  • “Private subnet reads S3 through NAT, high cost” → gateway VPC endpoint, not a bigger NAT gateway.
  • “Aurora bill mostly I/O” → I/O-Optimized. “Spiky load” → Serverless v2.
  • “Reduce egress for static content” → CloudFront, not Global Accelerator.
  • “Per-customer API limits” → usage plans. “One abusive IP” → WAF rate rule.