Purchase action in EC2 RI Optimizer fails showing failed purchase attempts across different instance types and regions.
search cancel

Purchase action in EC2 RI Optimizer fails showing failed purchase attempts across different instance types and regions.

book

Article ID: 411491

calendar_today

Updated On:

Products

CloudHealth

Issue/Introduction

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]."

Cause

The error occurs because the IAM role being used does not have the required permission in its policy to purchase EC2 Reserved Instances.

Resolution

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": "*"
}

Refer: https://techdocs.broadcom.com/us/en/vmware-tanzu/cloudhealth/tanzu-cloudhealth/saas/tnz-cloudhealth/working-with-reports-and-recommendation-of-tanzu-cloudhealth-aws-reservation-management.html#automate-an-exchange-through-tanzu-cloudhealth