Clarification on the purpose and population of the aws_prices collection #777
ContextHello everyone, I hope this message finds you well. While analyzing the pricing flow used by the AWS recommendations, I noticed that the MongoDB collection From reviewing the codebase, it appears that pricing data in OptScale is fetched dynamically, either through the Insider API or via direct calls to the AWS Pricing API through the cloud adapter. In these cases, the aws_prices collection seems to serve only as an optional cache for recently fetched SKUs, written to when a module explicitly performs a pricing lookup that stores results. In other words, the platform appears to rely primarily on on-demand pricing resolution rather than maintaining a persistent pricing catalog. As a result, aws_prices may stay empty unless certain workflows explicitly trigger caching behavior. QuestionIs it expected that the aws_prices collection remains empty under normal operation? If this behavior is intentional, could it might be helpful to clarify in the documentation that aws_prices is designed as a temporary cache layer? So that an empty collection does not necessarily indicate a configuration or data issue. Thank you all in advance! |
Replies: 1 comment 1 reply
|
Hello @gabrielecalafange! optscale/insider/insider_api/controllers/flavor_price.py Lines 142 to 155 in 6d7bc0c It is populated dynamically by requests to AWS for a specific flavor prices. As far as I know, the flavor_price API for AWS is only used into "Reserved Instances" recommendation. An empty aws_prices collection indicates that you have no suitable instances for this recommendation or flavor_price API call isn't successful (for example, if you haven't configured |
Hello @gabrielecalafange!
The aws_prices collection is currently used as a cache layer into insider's flavor_price api, reducing a number of requests made to AWS.
optscale/insider/insider_api/controllers/flavor_price.py
Lines 142 to 155 in 6d7bc0c