Capacity Planner ["Capacity Planner"]
["Capacity Planner > Data Collector"]["User Guide"]

Set up IAM role based Data Collector access

Overview

The preferred way to access data is to set up an IAM role in each AWS account to be analysed, and to allow the Capacity Planner Data Collector to assume that role in order to collect data.

There are two ways in which you can set up the required access:

Before starting, ask ITRS to supply you with the account number to be used by the DataCollectorAccess role. You will need this account number to allow access to the Data Collector.

Set up access with CloudFormation

The DataCollectorAccess role allows the Data Collector on the ITRS estate to access the required data on your estate. Access can be controlled by deauthorising the role for the ITRS account, or by deleting it altogether.

The easiest way to configure AWS with the correct permissions for the Data Collector is to use CloudFormation in the AWS portal.

To set up the DataCollectorAccess role in a single account and region, follow these steps:

  1. Save the below template as a JSON file and name it CloudFormation-DataCollectorAccessRole.json. You will use it when creating a new stack.

  2. Open the AWS Console for the account.

  3. From the list of available services, select Management & Governance > CloudFormation.

  4. Click Create stack. This will open the setup window where you can upload the template file.

  5. Select the Template is ready in the Prerequisite - Prepare template section and Upload a template file in the Specify template section of the setup window.

  6. Click Choose file and upload your saved CloudFormation-DataCollectorAccessRole.json file, and then click Next.

  7. Enter a name for the stack in order to identify it on the CloudFormations page of the AWS portal.

  8. Provide values for ExternalAccount, ExternalId and ExternalUser.

  9. Click Next and add tags. This is not mandatory but this can help you with ongoing management.

  10. Select a preferred IAM role for managing the stack.

  11. Click Next-Review, check that your setup is correct, and click Create Stack.

Note: The easiest way to deploy stacks across an organisation's AWS accounts and regions is to use stack sets, however this requires setting up either self-managed or service-managed permissions across the organisation and needs to be decided at your organization's discretion. For more information, see AWS official documentation . The stack template JSON script used for creating a single stack can also be used to create stack sets.

Set up access manually

The steps below should be carried out for each AWS account that is to be analysed:

  1. Create a new permissions policy to allow access to the correct information. See Set up CostExplorerReadAccess policy.

  2. Create the role that the Data Collector will assume when collecting data. See Set up DataCollectorAccess role.

Set up CostExplorerReadAccess policy

The Data Collector requires a new permissions policy to access data. To set up the CostExplorerReadAccess policy, follow the steps:

  1. Open the AWS Console for the account.

  2. Go to IAM > Policies and click Create policy.

  3. Open the JSON tab.

  4. Copy the code into the text box:

  5. Name the policy CostExplorerReadAccess, and save.

Set up DataCollectorAccess role

The DataCollectorAccess role allows the Data Collector on the ITRS estate to access the required data on your estate. Access can be controlled by deauthorising the role for the ITRS account, or by deleting it altogether.

If you are setting up the Data Collector access role for several accounts, the role name should be the same across all accounts.

To create the DataCollectorAccess role, follow the steps:

  1. Go to IAM > Roles and click Create role.
  2. Select Another AWS Account and for the Account ID, provide the ITRS account number.
  3. Under Options, select Require external ID, and enter a suitable external ID of your choice. Make a note of the external ID as you will need to provide it to ITRS.
    Do not select Require MFA.
  4. Click Next: Permissions to assign permissions.
  5. In the Permissions window, assign the following permissions to the role by selecting the check boxes:

    • AmazonEC2ReadOnlyAccess

    • AmazonRDSReadOnlyAccess

    • AWSCloudTrailReadOnlyAccess

    • AWSSavingsPlansReadOnlyAccess

    • CloudWatchReadOnlyAccess

    • CostExplorerReadAccess

  6. Click Next and add tags. This is not mandatory but this can help you with ongoing management.

  7. Click Next-Review, check that your setup is correct, and click Create role.

  8. Name the role DataCollectorAccess, and save.

Note: You need to send the account number and external ID for the role to your ITRS representative in a secure way.