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
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-management or 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
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
aws ce get-savings-plans-coverage --time-period Start=YYYY-MM-DD,End=YYYY-MM-DD
aws ce get-savings-plans-purchase-recommendation --savings-plans-type <value> --term-in-years <value> --payment-option <value> --lookback-period-in-days <value>
aws ce get-savings-plans-utilization --time-period Start=YYYY-MM-DD,End=YYYY-MM-DD
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
aws ce get-reservation-purchase-recommendation --service <value>
aws ce get-reservation-utilization --time-period Start=YYYY-MM-DD,End=YYYY-MM-DD
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.