- Le plus récent
- Le plus de votes
- La plupart des commentaires
Hi,
Your code looks correct. But, you make 2 important API calls: instance list and pricing info,
Did you check how many answers you get in your for instance_type in instance_types:
? 705 or something different ?
Then, if you have all instance types, the pricing for a given instance may be missing.
So, I would all some counters in your code to see if you get all instance types or not and then check if issue comes with pricing and collect the types for which it's missing to understand.
Best,
Didier
The output from that API call might be paginated. One thing your code isn't doing is checking for the existence of NextToken
in the output - that can be sent to the next API call to continue to get results.
Unfortunately there's no
NextToken
parameter in the output. The results are all there, so the API isn't really getting all the instances available in the price list for determined region and OS.
Contenus pertinents
- demandé il y a un an
- demandé il y a un an
- demandé il y a un an
- AWS OFFICIELA mis à jour il y a un an
- AWS OFFICIELA mis à jour il y a 2 ans
Hello!
It gets 761 instances - the problem is with the pricing, it's probably missing. If I delete the
tenancy
flag, it gets 701 instances, but those don't have the correct price.Apparently the API can't retrieve all the instance prices available on the Pricing List, but I'm not entirely sure.