Fixing Stale EC2 Pricing Files with Mountpoint for Amazon S3
Short answer
C Mount the pricing bucket with Mountpoint for Amazon S3 so the Linux EC2 instances read the current pricing file directly from S3 instead of a launch-time copy.
Question
The pricing file is updated every 1-15 minutes and has several thousand line items. The pricing file is downloaded to each EC2 instance when the instance launches.
The EC2 instances occasionally use outdated pricing information that can result in incorrect charges for customers.
Which solution will resolve this problem MOST cost-effectively?
Key Takeaways
The trap is treating this as a storage-consistency question; the real issue is the download-once-at-launch pattern, and the winning option is the one that removes the local copy with the least added cost and code change.
This SAP-C02 scenario tests how to stop Auto Scaling EC2 instances from serving a launch-time snapshot of a frequently updated pricing file. Mountpoint for Amazon S3 (option C) is the most cost-effective fix, because every read reflects the current S3 object without extra infrastructure.
Common mistake: Option A (Lambda to DynamoDB) is the most tempting wrong answer: DynamoDB fits per-item price lookups, but it forces the ticketing service to abandon its flat-file consumption model, adds Lambda and DynamoDB read/write billing on every 1–15 minute refresh, and introduces its own propagation delay.
Expert Analysis
The Real Defect
The failure is not an S3 consistency problem — S3 has offered strong read-after-write consistency for all operations since December 2020. The defect is in the application pattern: each EC2 instance snapshots the pricing file once at launch and never refreshes it, so any instance that has been running for 15+ minutes serves stale prices. Any correct fix must remove that "download once, use forever" behavior.
Why Option A Is the Attractive Trap
Option A looks like the textbook SAP-C02 answer: a Lambda function reacts to the third-party upload and pushes prices into DynamoDB, and the service reads lookups from a fast key-value store. It does eliminate staleness, and DynamoDB genuinely suits item-level price lookups. But it fails on two counts. First, the ticketing service currently consumes a flat file with several thousand line items; option A forces a rewrite of the service into per-item query logic, a modeling and code change well beyond a configuration fix. Second, "most cost-effectively" is violated: you now pay for Lambda invocations, DynamoDB write capacity on every 1–15 minute refresh, and read capacity on every lookup, plus ongoing table storage. The added moving parts also introduce a propagation window between the S3 upload and the DynamoDB update.
Why Option C Wins
Option C is correct. Mountpoint for Amazon S3 is an open-source FUSE client supported on Linux — which the question explicitly states the instances run — that exposes the S3 bucket as a file path. Because Mountpoint reads the object from S3 on demand, every read reflects the current object version; there is no cached copy to go stale and no launch-time snapshot. The change is minimal: repoint the service at the mount path instead of the local file. Cost stays minimal too — no new compute, no intermediate storage tier, no replication of the pricing data, and you pay only for the S3 GET requests and Standard storage you already have. Option B adds a Lambda-triggered copy into EFS (extra storage billing plus eventual staleness of its own), and Option D fails outright: EBS Multi-Attach is an iSCSI-based shared block volume for clustered applications, it does not refresh data on already-running instances, and each new instance must re-upload the file.
Official Reference
https://docs.aws.amazon.com/AmazonS3/latest/userguide/mountpoint.html
This link opens the official vendor documentation in a new tab.
Exam Strategy
When a question says data is downloaded once at launch and "occasionally outdated," immediately identify the caching/snapshot pattern as the fault, not the storage service itself — read-after-write consistency in S3, DynamoDB, and EFS is no longer the differentiator. Then filter options by the least-invasive change: prefer the one that keeps the existing file-consumption model and adds no new compute or replicated storage tier, since "most cost-effectively" questions reward the minimal-footprint design. Always check the stated operating system before selecting a FUSE-based answer such as Mountpoint for Amazon S3.
Frequently Asked Questions
Doesn't Amazon S3 already guarantee strong consistency, so why is the pricing outdated?
Why not use a Lambda function to copy prices into DynamoDB on each update?
Is Mountpoint for Amazon S3 compatible with Linux EC2 instances?
Discussion 17 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 17
-
awsaz 👍 9 Answered CMountpoint for Amazon S3: This solution allows the EC2 instances to directly access the S3 bucket as if it were a local file system. This ensures that the instances always access the latest version of the pricing file without having to download it each time. Cost-Effective: This approach avoids the need to constantly download and store the file on each instance, which can save on both S3 GET requests and local storage costs. Simplicity: By mounting the S3 bucket, you ensure that all instances are using the most current file without additional logic or processes to manage file updates.
-
mifune 👍 7 Answered ADynamoDB in this scenario looks cheaper than EFS. Answer A
-
DS2023 👍 4 Answered AOption A is the correct answer.
-
liuliangzhou 👍 3 Answered AA. DynamoDB provides fast data access and query capabilities, suitable for frequently read but infrequently updated data. B. EFS may not be suitable for frequent small file updates, and its cost may be higher than using DynamoDB. C. This solution can directly read pricing files from S3, but it does not solve the problem of outdated pricing data being used by old instances even after the pricing files are updated. D. EBS is not good at Multi Attach to multiple EC2 instances, and it can increase complexity and cost.
-
nimbus_00 👍 3 Answered C"Mountpoint for Amazon S3 is available only for Linux operating systems. You can use Mountpoint to access S3 objects in all storage classes except S3 Glacier Flexible Retrieval, S3 Glacier Deep Archive, S3 Intelligent-Tiering Archive Access Tier, and S3 Intelligent-Tiering Deep Archive Access Tier." https://docs.aws.amazon.com/AmazonS3/latest/userguide/mountpoint.html
Show 12 more comments
-
0b43291 👍 2 Answered CBy leveraging the strong consistency guarantees, cost-effectiveness, and simplicity of Mountpoint for Amazon S3, Option C provides the most appropriate and cost-effective solution for ensuring the EC2 instances in the Auto Scaling group always have access to the latest pricing information, resolving the outdated pricing data problem. The other options have drawbacks or are less cost-effective: Option A: Using DynamoDB may not be cost-effective for storing and accessing a large, frequently updated pricing file with several thousand line items. Option B: While Amazon EFS is viable, it introduces additional infrastructure and potential costs compared to directly accessing the pricing file from the S3 bucket using Mountpoint for Amazon S3. Option D: Using an Amazon EBS volume with Multi-Attach would require updating the pricing file on the volume whenever a new instance launches, which is less efficient and more prone to errors than directly accessing the file from the S3 bucket.
-
JoeTromundo 👍 2 Answered CMountpoint for Amazon S3 allows EC2 instances to treat an S3 bucket like a file system. This solution ensures that the EC2 instances always have access to the latest version of the pricing file, as the file is directly accessed from S3. You avoid downloading the file every time and reduce the risk of using outdated pricing data. S3 Consistency: Amazon S3 provides strong read-after-write consistency, so any update to the pricing file in S3 will be immediately visible to all EC2 instances accessing the file via the mount point. Cost Efficiency: By using Mountpoint for Amazon S3, you leverage S3's cost-effective storage and avoid additional infrastructure like DynamoDB or Elastic File System (EFS). This solution does not require copying data to another storage system, minimizing overhead.
-
eesa 👍 2 Answered COption C (Mountpoint for S3) (best solution): Mountpoint for Amazon S3 allows the EC2 instances to directly access the latest version of the pricing file stored in S3 without repeatedly downloading it. Each EC2 instance will always read the most up-to-date file directly from S3, eliminating the risk of outdated information. This solution is cost-effective as it involves minimal overhead, does not incur unnecessary data transfer or operational complexity, and requires minimal application modification.
-
aka1177 👍 2 Answered AOnly A; S3 service is not a file share system by design. In reality it wont work as good as other solutions. You all were misled.
-
wbedair 👍 2 Answered Cthe question is asking about cost effectiveness so why choose A to add additional service like Dynamodb . I will go for option C
-
mns0173 👍 2There is no need to move away from S3
-
chris_spencer 👍 1none of them makes sense... if an S3 object is uploaded it is strongly consist since end 2020, eventual consistency is a matter of the past. So it doesn't matter if the lambda function get the trigger after upload and transfer the information to dynamodb (A) or EFS(b), or the ec2 instance get the object via blocklevel file access (C) or EBS (D). The consistency is being provided by the source system which is S3, so nothing helps here. From the cost perspective is C the cheapest
-
alexbraila 👍 1The way I understand it, the question is not about S3 consistency. The problem is that an EC2 instance downloads the file from S3 upon launch and never updates it during its lifetime. Hence A, B and C would all solve this problem (but not D, as the file in EBS would only be updated when a new instance is launched), but the most cost-effective is C
-
Danm86 👍 1Option C is most cost effective, but the question has ambiguity where it tells customer could be wrongly charged, more details should be provided on the same to understand if wrong charging is critical or not. If wrong charging is critical and needs low latency and more reliability on the queried data then its option A
-
alexbraila 👍 1I would argue that option C does solve the problem of outdated pricing data. If the ticketing service looks up the price in the local file upon every request and since the local file links to the up to date file in S3, it looks right to me
-
Aws00 👍 1https://aws.amazon.com/tw/blogs/storage/the-inside-story-on-mountpoint-for-amazon-s3-a-high-performance-open-source-file-client/#:~:text=UPDATE%20(8%2F9%2F2023)%3A%20Mountpoint%20for%20Amazon,S3%20is%20now%20generally%20available.
-
pk0619 👍 1 Answered Cmost cost effective
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All SAP-C02 Questions
Access 85 questions with complete answers and detailed explanations.
View Full SAP-C02 Practice Test →