When using the EC2 RI Optimizer for making a purchase, you might see the purchase action fail with an error similar to the following:
"Encountered error: Please contact support. Purchase failed for: No Upfront for [Instance Type] in [Region]."
The error occurs because the IAM role being used does not have the required permission in its policy to purchase EC2 Reserved Instances.
Modify the IAM policy attached to the role. Add a statement permitting the ec2:PurchaseReservedInstancesOffering action, along with any relevant read/list permissions, and then try to purchase EC2 Reserved Instances through CloudHealth.
In the Policy Document tab, click Edit and add these privileges to add the ability to purchase RIs.
{
"Effect": "Allow",
"Action": [
"ec2:DescribeReservedInstancesOfferings",
"ec2:PurchaseReservedInstancesOffering"
],
"Resource": "*"
}