Turbonomic provides a complete picture of your environment. For those with AWS Targets, this includes spend amounts, which populate the Expenses -> Cost Breakdown views as seen in the "Cloud" tab. In order to display month-to-day spend, you must expose this information via placing the AWS Cost and Usage report in an S3 Bucket that Turbonomic will access.
To do this, you must do two things:
- Create a Cost and Usage Report in AWS, saving it to an S3 bucket
- Give Turbonomic access to the bucket in Target Configuration.
NOTE: This Guide assumes that the user performing these tasks has both the "AmazonS3FullAccess" and "Billing" permissions that will allow the user to create an S3 bucket to place a report into, and set report preferences for type of report (Daily Cost and Usage) plus location of the S3 bucket. For more details on Billing start here: Cost and Usage Report - AWS Billing and Cost Management
Do you use Consolidated Billing (Consolidated Billing for Organizations - AWS Billing and Cost Management )? Turbonomic will report the month-day spend summary by AWS Services, but in 5.9.0 cannot parse the different accounts and organizations. You will need to add a AWS Target with an IAM User that is part of the Master Account Organization or outside Account which minimally has S3 Access to the bucket that is created in that organization. Also, we need to have EC2 instance ( VM either Powered OFF or ON ) on the Account that the IAM User is part of.
Create Cost and Usage Report
Creating reports for AWS budgeting
- Select a region (for instance eu-west-2), this is used in the Ops-Manager later on
- Click on your name in the upper left corner
- From the Drop down list select "My Billing Dashboard"
- From the left menu select "Reports"
- Click on "Create Report"
- Enter a Name for the report, select Daily
- Select Resource IDs
- Click Next
- Next, we need to create an S3 Bucket in which to store the report. If you have an existing bucket you may skip this step
- Right click on "S3 Console" and open in a new Window
- Click on Create Bucket. Make NOTE of the REGION this bucket is in.
- Enter a name for the bucket, as well as select a region.
- The name must be unique within all of S3 (must be universally unique)
- Click Next
- On "Set Properties", click Next
- On "Set Permissions", click Next. These will be modified in a future step
- On "Review", Click "Create Bucket"
- Back on the S3 page, your new Bucket will be created:
- Click on the bucket to open it
- Click on Permissions
- Click on "Bucket Policy"
- Now switch back on the Report Page
- Enter the s3 bucket name you created (or had pre-created) and click verify, you should see the error "X Invalid Bucket" - this is expected, this will cause the sample policy to be adjusted to the correct bucket name)
- Next, click on the "Sample Policy" in the window
- Enter the Name of the bucket just created and then click on the link "sample policy"
- Copy the Contents of the Pop-up
- Note: if you are creating the bucket and do not have billing access to generate this json permissions policy, you can use Example 9 in this AWS document: Billing and Cost Management Permissions Reference - AWS Billing and Cost Management
- Return to S3, and Paste the contents to the "Bucket Policy" editor
- Click Save
- Back in the report Window, click on Verify - now the bucket should be marked as Valid - Click next
- Under "Report Path prefix" type: daily - Click Next
- On the Review Page click "Review and Complete"
- The required Bucket and report are now present.
NOTE: AWS publishes the standard daily billing report twice a day, and may take up to 24 hours for the first report to be placed in the bucket. The Cost Breakdown views in Turbonomic will start populating 1 - 2 hours after.
Specifying the Target
Navigate to the Target Configuration section (under Settings) in Turbonomic to add the target.
If you have already added the AWS target to Turbonomic, you may modify the existing target to add the bucket and report fields. However you will need to re-enter the Secret Access Key. If you target does not validate after modification, make sure you re-enter all credentials. For more information about adding an AWS Target, please see the latest Target Configuration Guide at https://greencircle.vmturbo.com/community/products/pages/documentation.
Note the IAM User (which belongs to the Access and Secret Access Key info) specified as the AWS Target needs to only have S3 access to use the report - Billing access is not required.
The three target fields needed for to access this report are:
- Cost and Usage Report Bucket: enter the full bucket name (for example, turbo.billing.report)
- Cost and Usage Report Path: enter report path (without a prefix or trailing /) - you can copy the report path from the BIlling Report details (see image below - note there are no / before or after)
- Cost and Usage Report Region: enter the region name of the S3 bucket (see this list for all AWS regions)
Example of AWS Target with AWS billing based on the above Billing Report, created on an S3 Bucket in Canada Central Region (ca-cental-1):
After target discovery is complete, Turbonomic will display spend in the UI (please note that AWS reports make take up to 24hours to be created, only after they are created Turbonomic will start displaying detailed billing data)