Skip to main content

Accessing Savings Plans and Reserved Instances Recommendations

warning
This module is being shut down in March 2025. See Shutdown of Cost and Compliance Modules for more information.

Stax does not provide Savings Plans recommendations, but organizations with Stax-managed AWS accounts can access both Savings Plans and Reserved Instances recommendations using the AWS CLI and API.

For organizations with an account ownership model whereby the management account is owned by a reseller, this method must be used to access recommendations. For organizations maintaining the ownership of their management account, the AWS Console's native cost tools can also be used.

Before You Begin

  • Time to complete: 15 minutes
  • You must have the latest version of AWS CLI installed
  • You must have the latest version of stax2aws installed
  • Ensure you have access to your organization's management account
  • Ensure Cost Explorer has been enabled
tip

While the below commands have been tested by the Stax team, this is neither an exhaustive list nor a guarantee that all commands are available for consumption. For further information see AWS's guidance.

Logging in to the Management Account

To run the commands below, log in to your organization's management account using stax2aws. To determine the management account, log in to Stax and make a note of the account in the foundation-managementor foundation-management-resell Account Type.

Log in to the account and make a note of the profile name emitted by stax2aws. For example:

$ stax2aws login --installation stax-au1 --org-alias stax-demo --profile stax-demo-management --role-arn arn:aws:iam::123456789012:role/staxid-admin-role
Authorization flow complete

Selected role: arn:aws:iam::123456789012:role/staxid-admin-role

Credentials successfully saved.
Profile name: stax-demo-management

Retrieving Recommendations

Execute the commands below to retrieve recommendations from AWS.

Values within angle brackets (< >) should be replaced with the appropriate values. See the AWS documentation for each command for more information on expected values.

Replace date values below with the desired date window in the format of YYYY-MM-DD (for example, 2006-12-26 for 26 December 2006).

Savings Plans Coverage and Recommendations

Get Savings Plan Coverage (AWS Reference)

aws ce get-savings-plans-coverage --time-period Start=YYYY-MM-DD,End=YYYY-MM-DD

Get Savings Plans Purchase Recommendations (AWS Reference)

aws ce get-savings-plans-purchase-recommendation --savings-plans-type <value> --term-in-years <value> --payment-option <value> --lookback-period-in-days <value>

Get Savings Plans Utilization (AWS Reference)

aws ce get-savings-plans-utilization --time-period Start=YYYY-MM-DD,End=YYYY-MM-DD

Get Savings Plans Utilization Details (AWS Reference)

aws ce get-savings-plans-utilization-details --time-period <value>

Reserved Instances Coverage and Recommendations

Get Reservation Coverage (AWS Reference)

aws ce get-reservation-coverage --time-period Start=YYYY-MM-DD,End=YYYY-MM-DD

Get Reservation Purchase Recommendations (AWS Reference)

aws ce get-reservation-purchase-recommendation --service <value>

Get Reservation Utilization (AWS Reference)

aws ce get-reservation-utilization --time-period Start=YYYY-MM-DD,End=YYYY-MM-DD

Troubleshooting

Should you encounter a DataUnavailableException error, this is generally as a result of a lack of Savings Plans or Reserved Instances. If any other errors are encountered, consult the AWS Cost Explorer Documentation.