Scenario practice: performance and cost
Twelve more original questions, this time on performance and cost. Decide first, then open the explanation.
Q1 — Slow global static content
A media company serves images and videos from an S3 bucket in one Region. Users on other continents report slow loading. The bucket must not be publicly accessible. What should the architect recommend?
- A. Enable S3 Transfer Acceleration
- B. Create a CloudFront distribution with the bucket as origin using Origin Access Control, and update the bucket policy
- C. Replicate the bucket to every Region with CRR
- D. Move the content to EBS volumes on larger instances
Show answer
Answer: B. CloudFront caches content near users; OAC keeps the bucket private. A speeds up uploads, not downloads. C is costly and complex. D removes scalability.
Q2 — Read-heavy database
A reporting dashboard's queries are slowing down the production Amazon RDS for MySQL instance. Reports can tolerate data a few seconds old. What is the most effective fix?
- A. Enable Multi-AZ and send reports to the standby
- B. Create a read replica and point the reporting tool at it
- C. Increase backup retention
- D. Switch to a burstable instance type
Show answer
Answer: B. Read replicas offload read traffic; slight lag is acceptable here. A's standby (in a Multi-AZ instance deployment) can't serve reads. C and D don't help performance.
Q3 — Repeated product lookups
An e-commerce site queries the same product details thousands of times per second from Amazon DynamoDB. Latency must drop to microseconds with minimal code change. What should be used?
- A. Amazon ElastiCache for Memcached with custom caching code
- B. DynamoDB Accelerator (DAX)
- C. DynamoDB global tables
- D. Increase provisioned read capacity
Show answer
Answer: B. DAX is an API-compatible in-memory cache for DynamoDB that gives microsecond reads. A works but needs more code. C is for multi-Region. D raises throughput, not latency to microseconds.
Q4 — Shared high-performance files for ML
A machine learning team trains models on a 200 TB dataset stored in S3. Training clusters need a shared file system with very high throughput and sub-millisecond latency. Which service fits best?
- A. Amazon EFS with Standard storage class
- B. Amazon FSx for Lustre linked to the S3 bucket
- C. EBS io2 volumes with Multi-Attach
- D. S3 File Gateway
Show answer
Answer: B. FSx for Lustre is built for HPC/ML throughput and integrates natively with S3. A is shared but not designed for this throughput. C is limited to a few instances in one AZ. D is for on-premises access.
Q5 — Real-time clickstream
A company must capture clickstream events from its website and run three independent real-time applications on the same data, with the ability to replay the last 7 days. Which service should ingest the data?
- A. Amazon SQS standard queue
- B. Amazon Kinesis Data Streams with 7-day retention
- C. Amazon Data Firehose to S3
- D. Amazon SNS
Show answer
Answer: B. Kinesis Data Streams supports multiple independent consumers, ordering per key and replay with extended retention. A deletes messages once consumed by a single consumer group. C delivers to destinations in near real time without replay for consumers. D pushes without retention.
Q6 — Cheap analytics on logs
Application logs land in S3 as JSON. Analysts run a few ad-hoc SQL queries per week. The company wants the lowest cost and no infrastructure to manage. Which approach is best?
- A. Load the logs into an Amazon Redshift cluster
- B. Use AWS Glue to catalog and convert the logs to partitioned Parquet, then query with Amazon Athena
- C. Run an EMR cluster permanently with Hive
- D. Import logs into RDS for PostgreSQL
Show answer
Answer: B. Athena is serverless and pay-per-query; Parquet and partitioning reduce the data scanned (and cost). A and C keep clusters running for occasional queries. D isn't designed for this.
Q7 — Batch processing costs
A nightly image-processing job takes 3 hours on 50 instances. It can be restarted if interrupted and must finish by morning. How can costs be minimised?
- A. Purchase 3-year Reserved Instances
- B. Run the job on Spot Instances using AWS Batch with a capacity-optimized allocation strategy
- C. Use Dedicated Hosts
- D. Use On-Demand Instances in a cluster placement group
Show answer
Answer: B. Interruptible, flexible batch work is the ideal Spot use case, and AWS Batch manages retries. A commits to 24/7 capacity for a 3-hour job. C and D are more expensive.
Q8 — NAT gateway bill
EC2 instances in private subnets copy several terabytes per day to and from S3 in the same Region. The NAT gateway data processing charges are high. What is the most cost-effective fix?
- A. Replace the NAT gateway with a NAT instance
- B. Create an S3 gateway VPC endpoint and update the private route tables
- C. Move the instances to public subnets
- D. Enable S3 Transfer Acceleration
Show answer
Answer: B. Gateway endpoints for S3 are free and route S3 traffic privately, bypassing the NAT gateway. A adds management overhead and still processes traffic. C weakens security. D costs extra and doesn't avoid NAT.
Q9 — Unknown access patterns
A company stores millions of objects in S3 whose access patterns are unpredictable: some are read daily, others not for months. They want to reduce storage cost without performance impact or retrieval fees. Which storage class should be used?
- A. S3 Standard-IA
- B. S3 Intelligent-Tiering
- C. S3 Glacier Flexible Retrieval
- D. S3 One Zone-IA
Show answer
Answer: B. Intelligent-Tiering moves objects between tiers automatically based on access, with no retrieval fees. A charges retrieval fees and a 30-day minimum. C has slow retrievals. D reduces durability across AZs and charges retrieval fees.
Q10 — Variable relational workload
A new internal application uses PostgreSQL. Usage is unpredictable: heavy for a few hours on some days, nearly idle otherwise. The team wants to minimise cost and management. What should be used?
- A. RDS for PostgreSQL on a large reserved instance
- B. Amazon Aurora Serverless v2 (PostgreSQL-compatible)
- C. PostgreSQL on EC2 with Auto Scaling
- D. DynamoDB on-demand
Show answer
Answer: B. Aurora Serverless v2 scales capacity automatically with load, so you pay little when idle and need no capacity planning. A pays for peak capacity always. C is high operational effort and databases don't scale that way. D isn't PostgreSQL.
Q11 — Static IPs for a global app
A gaming company runs a UDP-based game server fleet in two Regions. Players need low latency, and enterprise customers require fixed IP addresses to allow-list. Failover between Regions must be fast. Which service should be used?
- A. Amazon CloudFront
- B. AWS Global Accelerator
- C. Route 53 latency routing
- D. An Application Load Balancer in each Region
Show answer
Answer: B. Global Accelerator provides two static anycast IPs, supports UDP, routes over the AWS backbone and fails over quickly. A is for HTTP(S) content. C relies on DNS caching for failover and gives no static IPs. D doesn't support UDP and has no static IPs.
Q12 — Spend visibility and control
A company with 15 accounts wants a single bill, automatic alerts when a team's monthly spend is forecast to exceed its budget, and cost reports by project. Which combination achieves this? (Select THREE.)
- A. AWS Organizations with consolidated billing
- B. Cost allocation tags for projects, activated in the billing console
- C. AWS Budgets with forecast-based alerts per team
- D. Amazon CloudWatch billing alarms in each account only
- E. AWS Trusted Advisor
Show answer
Answer: A, B and C. Organizations gives one bill (and shared discounts), tags allow cost reporting by project in Cost Explorer, and Budgets provides forecast alerts per team. D is limited and per-account. E gives best-practice recommendations, not budget alerts or project reports.