Presumably you can select the relevant ID based on plan properties (cores, RAM, etc.) rather than hardcoding IDs. Though I completely agree that once a plan has a specific ID, as long as that plan is available the ID should be constant.
Presumably you can select the relevant ID based on plan properties (cores, RAM, etc.) rather than hardcoding IDs. Though I completely agree that once a plan has a specific ID, as long as that plan is available the ID should be constant.
What if they upgrade the 1024 plan to 1536? (That has actually happened, by the way.) Now you're extracting the number and comparing it to a range?
> Give me the plan where the RAM is >= 1024 and < 2048.
What if they upgrade the 1536 plan to 2048?
> Nevermind, just give me the plan with two cores.
Okay, do you want the $20/mo plan or the $120/mo plan?
> Fine, sort the plans by cores and memory and give me the smallest plan.
Oops, they introduced a new plan with one core and less (i.e. not enough) storage.
I'm not saying it's impossible. Just impractical.
The API should throw an error, so I can adjust my scripts, instead of silently provisioning a server I never intended to provision.
There should be a deprecation process when a plan is discontinued, so this doesn't happen unexpectedly.
If AWS can't provision me a t1.micro, they don't just go and give me a m3.small instead.