Skip to content

Skill 4.2.5: Optimize costs and set cost quotas by using appropriate cost management tools


Question Answer & Explanation
### Question 1 - Forecasted Spend Alerts for Amazon Bedrock

A startup is developing a generative AI assistant using Amazon Bedrock. The finance team wants to be alerted via an Amazon SNS notification as soon as the projected monthly spend on Bedrock token invocations is on track to exceed $5,000. The solution must provide this warning before the actual overage occurs, allowing time to act.

Which AWS cost management tool meets these requirements with the least operational overhead? (Select ONE)

- A) AWS Cost Explorer
- B) AWS Budgets
- C) AWS Trusted Advisor
- D) AWS Compute Optimizer
Correct Answer: B

Correct Answer Analysis:
- B is Correct: AWS Budgets allows you to set custom cost budgets and alerts. Crucially, it supports forecasted cost alerts, notifying you via SNS or email when your projected (on-track) spend is predicted to exceed your defined threshold, long before the actual spend breaches the limit.

Distractor Analysis:
- A is Incorrect: AWS Cost Explorer is used for visualizing and analyzing historical and forecasted spend data, but it does not natively generate automated threshold-driven SNS alert notifications based on forecasts.
- C is Incorrect: AWS Trusted Advisor performs checks against AWS best practices to identify idle or underutilized resources, but it does not track custom forecasted spending thresholds for specific services like Bedrock.
- D is Incorrect: AWS Compute Optimizer recommends right-sized compute resources based on utilization metrics; it does not perform cost tracking or budget alerting.

> Key Takeaway: Use AWS Budgets for proactive, forecast-based threshold alerting to prevent cost overages before they happen, rather than analyzing past spend.
### Question 2 - Cost Attribution for ML Teams

An enterprise has multiple ML teams using a mix of Amazon SageMaker AI endpoints and Amazon Bedrock models. The FinOps team needs to accurately attribute the compute and token spend of each resource to specific business units to optimize costs and set internal chargeback models. The solution must use an AWS-native tagging strategy.

Which approach satisfies these requirements with the least operational overhead? (Select ONE)

- A) Enable AWS Cost and Usage Reports (CUR) and aggregate spend by AWS account.
- B) Apply Cost Allocation Tags in AWS to SageMaker and Bedrock resources, then activate them in the AWS Billing console.
- C) Create a separate AWS account for each business unit and use AWS Organizations consolidated billing.
- D) Configure Amazon CloudWatch dashboards to track invocation counts and multiply by the token price.
Correct Answer: B

Correct Answer Analysis:
- B is Correct: Applying Cost Allocation Tags to resources (like SageMaker endpoints or Bedrock usage tags) and activating them in the AWS Billing console allows AWS Cost Explorer and AWS Budgets to group and filter spend by those tags. This directly attributes costs to specific business units with native tooling.

Distractor Analysis:
- A is Incorrect: While CUR provides detailed spend data, aggregating by account alone does not provide granular attribution if multiple teams share the same account.
- C is Incorrect: Creating a separate AWS account for each business unit introduces significant operational overhead in terms of account management, IAM, and networking, compared to simply using tags.
- D is Incorrect: Building custom CloudWatch dashboards to mathematically multiply invocations by price is a manual, brittle approach that doesn't account for pricing tiers, discounts, or data transfer, whereas native billing tools handle this automatically.

> Key Takeaway: Cost Allocation Tags are the quiet prerequisite for ML cost attribution; without them, a cost report shows only a service total with no way to identify which team or model produced the spend.
### Question 3 - Identifying Idle Compute Resources

A machine learning team has launched several large Amazon SageMaker AI notebook instances and training clusters for exploratory data analysis. Due to a shift in project priorities, these resources were left running for weeks without executing any code. The team needs an automated AWS-native tool to identify these idle instances and surface cost optimization recommendations.

Which tool is purpose-built to discover this specific cost pattern? (Select ONE)

- A) AWS Compute Optimizer
- B) AWS Trusted Advisor
- C) Amazon Bedrock AgentCore Observability
- D) AWS X-Ray
Correct Answer: B

Correct Answer Analysis:
- B is Correct: AWS Trusted Advisor inspects your AWS environment against best practices and includes specific cost optimization checks, such as identifying idle Amazon EC2 instances and underutilized SageMaker resources, advising you to terminate them to save money.

Distractor Analysis:
- A is Incorrect: AWS Compute Optimizer analyzes utilization history to recommend right-sized instances (e.g., downscaling from an ml.m5.2xlarge to ml.m5.xlarge), but it does not specifically flag completely idle, zero-utilization resources for termination as effectively as Trusted Advisor.
- C is Incorrect: Bedrock AgentCore Observability is used for tracing agent tool invocations and token consumption, not for infrastructure compute right-sizing or idle resource detection.
- D is Incorrect: AWS X-Ray traces application requests to identify performance bottlenecks; it is a performance monitoring tool, not a cost management tool.

> Key Takeaway: Use AWS Trusted Advisor to passively identify idle compute resources and basic cost optimization opportunities across your AWS accounts.
### Question 4 - Commitment-based Pricing for SageMaker

A media streaming company runs a steady, year-round recommendation model on an Amazon SageMaker AI real-time endpoint. The traffic is predictable and maintains a consistent baseline 24/7. The team wants to reduce the rate charged for this baseline compute usage by making a 1-year commitment, without changing the underlying architecture.

Which purchasing option applies to this workload? (Select ONE)

- A) Compute Savings Plans
- B) EC2 Instance Savings Plans
- C) SageMaker AI Savings Plans
- D) Amazon Bedrock Provisioned Throughput
Correct Answer: C

Correct Answer Analysis:
- C is Correct: SageMaker AI Savings Plans offer a flexible, commitment-based pricing model specifically for Amazon SageMaker ML instance usage (including Real-Time Inference, Training, and Processing). Committing to a consistent hourly spend over 1 or 3 years provides a significant discount compared to On-Demand pricing.

Distractor Analysis:
- A is Incorrect: Compute Savings Plans apply to Amazon EC2, AWS Fargate, and AWS Lambda usage, but they do not cover SageMaker ML instance types.
- B is Incorrect: EC2 Instance Savings Plans apply exclusively to Amazon EC2 instances within a specific instance family and Region, providing no discounts for SageMaker resources.
- D is Incorrect: Bedrock Provisioned Throughput is used to reserve model units for foundation model inference on Amazon Bedrock (billed by tokens), not for SageMaker compute instances (billed by hours).

> Key Takeaway: Match the commitment plan to the service: SageMaker usage requires SageMaker AI Savings Plans, while EC2/Lambda/Fargate require Compute Savings Plans.
### Question 5 - Cost Optimization for High-Volume Bedrock Traffic

A financial services firm uses a large language model on Amazon Bedrock for daily, high-volume market sentiment analysis. The workload runs continuously and predictably throughout the day. The team wants to optimize token inference costs and avoid the variable pricing of on-demand capacity, while maintaining steady, real-time throughput.

Which capacity management strategy is the most cost-effective for this scenario? (Select ONE)

- A) Use Bedrock Batch Inference for all requests.
- B) Purchase Amazon Bedrock Provisioned Throughput.
- C) Apply Prompt Caching and reduce context length.
- D) Switch to a smaller, less capable foundation model.
Correct Answer: B

Correct Answer Analysis:
- B is Correct: For predictable, high-volume, real-time inference workloads, Amazon Bedrock Provisioned Throughput allows you to reserve dedicated model units at a fixed hourly rate. This provides a discounted rate compared to On-Demand token pricing for steady-state traffic.

Distractor Analysis:
- A is Incorrect: Bedrock Batch Inference is designed for asynchronous workloads that can tolerate delays (up to 24 hours), not real-time interactive analysis.
- C is Incorrect: While prompt caching and context reduction are good general cost-optimization levers, they do not address the fundamental pricing model (On-Demand) for a steady, predictable high-volume baseline.
- D is Incorrect: Switching to a smaller model might reduce token costs, but it risks degrading the quality of the sentiment analysis. The question asks for the most cost-effective way to handle the steady capacity demand, which is Provisioned Throughput.

> Key Takeaway: Just as steady compute baselines use Savings Plans, steady foundation model token baselines use Bedrock Provisioned Throughput to lower fixed rates.
### Question 6 - Identifying the Cost Driver of Rising Bills

A generative AI application sees a sudden 40% increase in its monthly AWS bill for Amazon Bedrock usage. The engineering team needs to determine if the rising bill is caused by an increase in raw API request volume or by users sending significantly longer, heavier prompts. The solution must allow grouping and filtering by usage type.

Which AWS tool is designed to identify this specific cost driver? (Select ONE)

- A) AWS Cost Explorer
- B) AWS Trusted Advisor
- C) AWS Budgets
- D) AWS Compute Optimizer
Correct Answer: A

Correct Answer Analysis:
- A is Correct: AWS Cost Explorer reports historical and forecasted spend and can group and filter it by tag, service, or usage type. By grouping Bedrock usage by "usage type", the team can see exactly how the spend is distributed between input tokens, output tokens, and request counts, revealing the driver behind the rising bill.

Distractor Analysis:
- B is Incorrect: Trusted Advisor identifies idle resources and best practice violations, but it does not provide granular breakdowns of token usage types within a single service like Bedrock.
- C is Incorrect: AWS Budgets tracks spend against a defined threshold and sends alerts, but it is not primarily a deep-dive analytical tool for identifying the root cause of usage type changes.
- D is Incorrect: Compute Optimizer recommends right-sized compute instances based on CPU/GPU utilization, having no insight into token-based billing metrics.

> Key Takeaway: When a bill rises, use AWS Cost Explorer's grouping by "Usage Type" or "Tag" to isolate whether the driver is higher traffic volume or heavier per-request token consumption.
### Question 7 - Cost Optimization for Asynchronous Workloads

An e-commerce company needs to process 10 million product descriptions daily using a foundation model to generate SEO-optimized summaries. The job runs nightly, takes several hours, and can tolerate a 24-hour processing delay. The team must choose the most cost-effective way to execute this workload on Amazon Bedrock.

Which inference option meets these requirements? (Select ONE)

- A) Bedrock On-Demand invocation via AWS Step Functions
- B) Bedrock Provisioned Throughput
- C) Bedrock Batch Inference
- D) Amazon SageMaker Asynchronous Endpoint
Correct Answer: C

Correct Answer Analysis:
- C is Correct: Bedrock Batch Inference is designed specifically for large-scale, asynchronous workloads. It allows you to upload a large dataset to S3 and process it with a foundation model at a significantly discounted rate compared to On-Demand, making it the most cost-effective choice for non-urgent, bulk processing.

Distractor Analysis:
- A is Incorrect: Using Step Functions to trigger On-Demand invocations individually would incur standard On-Demand token pricing and introduce unnecessary orchestration overhead for a bulk batch job.
- B is Incorrect: Provisioned Throughput is meant for steady, real-time, predictable traffic. Paying for reserved model units to run a nightly batch job would leave the capacity idle for 20+ hours a day, making it highly cost-ineffective.
- D is Incorrect: SageMaker Asynchronous Endpoints are for custom models hosted on SageMaker, not for invoking managed foundation models on Bedrock.

> Key Takeaway: For foundation model workloads that tolerate delay, move the work to Bedrock Batch Inference to access lower token rates compared to real-time On-Demand pricing.
### Question 8 - Cost Optimization for Interruptible Training

A machine learning engineer is training a custom computer vision model on Amazon SageMaker AI. The training job takes 50 hours to complete, uses distributed processing, and can be interrupted and restarted from a checkpoint without impacting the final model integrity. The team requires the most cost-effective infrastructure purchasing option for this specific job.

Which option should the engineer use? (Select ONE)

- A) SageMaker On-Demand Instances
- B) SageMaker Managed Spot Training
- C) SageMaker AI Savings Plans
- D) EC2 Reserved Instances
Correct Answer: B

Correct Answer Analysis:
- B is Correct: SageMaker Managed Spot Training utilizes spare EC2 capacity at a significantly reduced cost (up to 90% off On-Demand). Since the job can be interrupted and restarted from checkpoints, it is perfectly suited for Spot capacity, which can be reclaimed by AWS with a 2-minute warning.

Distractor Analysis:
- A is Incorrect: On-Demand Instances provide guaranteed capacity but are the most expensive option and do not take advantage of the job's fault tolerance.
- C is Incorrect: SageMaker AI Savings Plans are a 1-year or 3-year commitment designed for steady, long-term usage baselines, not for a single, interruptible 50-hour training job.
- D is Incorrect: EC2 Reserved Instances require a long-term commitment and apply to raw EC2 capacity, not managed SageMaker training jobs.

> Key Takeaway: If a training job can checkpoint and recover from interruptions, always use SageMaker Managed Spot Training to leverage spare capacity at a massive discount.
### Question 9 - Enforcing Hard Cost Limits

A startup is building an AI application using Amazon Bedrock and AWS Lambda. To prevent runaway development costs, the CTO wants to enforce a strict monthly budget of $2,000. If the budget is breached, the team wants to automatically apply an IAM policy that denies the bedrock:InvokeModel action to all users, stopping spend instantly.

Which tool can natively automate this enforcement action? (Select ONE)

- A) AWS Service Quotas
- B) AWS Budgets Actions
- C) AWS Cost Explorer Anomaly Detection
- D) AWS Trusted Advisor
Correct Answer: B

Correct Answer Analysis:
- B is Correct: AWS Budgets Actions allows you to configure a response when a budget threshold is breached. This response can include sending an SNS notification AND automatically applying an IAM policy (e.g., denying specific API actions like bedrock:InvokeModel) or stopping EC2 instances to hard-stop spending.

Distractor Analysis:
- A is Incorrect: AWS Service Quotas is used to limit the rate or number of API requests (like maximum concurrent Bedrock invocations), but it does not monitor or enforce monetary cost limits.
- C is Incorrect: Cost Anomaly Detection monitors for unusual spending spikes and sends alerts, but it cannot automatically execute IAM policy changes to block API calls.
- D is Incorrect: Trusted Advisor provides recommendations but cannot automatically enforce IAM policies based on budget thresholds.

> Key Takeaway: AWS Budgets Actions goes beyond alerting—it can automatically apply IAM policies or stop resources to enforce hard cost ceilings when a threshold is breached.
### Question 10 - Granular Cost Data for BI Tools

An enterprise FinOps team needs granular, hourly cost data for their Amazon SageMaker and Bedrock usage. They need this data broken down by specific resource IDs and cost allocation tags, formatted as a CSV or Parquet file, and delivered to an Amazon S3 bucket so it can be queried with Amazon Athena for internal BI dashboards.

Which AWS service provides this level of detailed, queryable cost data? (Select ONE)

- A) AWS Cost and Usage Report (CUR)
- B) AWS Budgets
- C) AWS Cost Explorer
- D) Amazon CloudWatch Billing Metrics
Correct Answer: A

Correct Answer Analysis:
- A is Correct: The AWS Cost and Usage Report (CUR) is the most comprehensive billing dataset available. It can be configured to publish hourly data, broken down by resource ID, tags, and usage type, and delivered directly to an S3 bucket in Parquet format for seamless querying with Amazon Athena.

Distractor Analysis:
- B is Incorrect: AWS Budgets provides high-level tracking against thresholds but does not export the granular, line-item level hourly cost data needed for deep BI analysis.
- C is Incorrect: AWS Cost Explorer provides a visual dashboard and API for analyzing spend, but it does not provide the raw, granular, hourly resource-level CSV/Parquet file delivery to S3 that is standard for BI ingestion.
- D is Incorrect: CloudWatch Billing Metrics provides daily estimated charges at the service level, but it does not offer the hourly, resource-ID-level granularity required for this BI use case.

> Key Takeaway: When you need to ingest AWS billing data into Athena, Redshift, or QuickSight for custom analytics, configure the AWS Cost and Usage Report (CUR) to deliver Parquet files to S3.