Individually Connecting Your AWS Account to Usage (Method 1: AWS IAM Role)
Step 1: Start the AWS Account Connection
- Navigate to Integrations and select AWS.
- Click the Connect button.
Step 2: Grant Access via AWS IAM Role
- Initiate the Connection
- Use the AWS IAM interface or follow the on-screen instructions to connect your AWS account to Usage AI.
- Run the Provided AWS CLI Command
- Follow the dashboard instructions to execute the provided AWS CLI command.
- This will create a service-linked role for Elasticache, enabling Usage AI to access necessary data.
- Add an Account Nickname
- Enter a unique nickname for easy identification of this AWS account.
- Select Product(s)
- Ensure Insured Commitments is selected to grant permissions for EC2, RDS, Elasticache, OpenSearch, Redshift, and ECS/EKS Fargate.
- You can modify this selection if needed.
- Proceed to the Next Step
- Click the AWS IAM ROLE button to continue with the integration process.
Step 3: Enable Hourly Cost Data (Skip if no Fargate spend)
- Determine if Fargate is Needed:
- If you do not need Fargate recommendations, you can skip this step.
- If you have Fargate enabled, leave the checkbox selected and proceed.
- Enable Hourly Cost Data in AWS Cost Explorer
- Open the Cost Explorer Settings in the AWS Console.
- Under Hourly Granularity (up to 14 days of past data), check the box:
- "Cost and usage data for all AWS services at hourly granularity (without resource-level data)."
- Confirm Selection
- Check the box "I have Fargate enabled and have successfully enabled this option on AWS Cost Explorer Settings."
- Proceed to the Next Step
- Click Continue to move forward.
Step 4: Create an IAM Policy
- Access the IAM Policy Page
- Go to the IAM Policy Page in the AWS Console.
- Add a New Policy
- Click on Create Policy.
- Switch to the JSON tab.
- Insert the Usage AI Policy
- Copy the JSON policy provided in the Usage AI dashboard.
- Paste it into the JSON editor, replacing any default content.
- Set the Policy Name
- Name the policy "UsageAI".
- Create the Policy
- Click Create Policy to finalize.
- Proceed to the Next Step
- After the policy is successfully created, click Continue in the Usage AI dashboard.
Step 5: Add an IAM Role
- Access the IAM Role Page
- Go to the IAM Role Page in the AWS Console.
- Create a New IAM Role
- Click Create Role.
- Under Select trusted entity, choose Custom Trust Policy.
- Insert the Trust Policy
- Copy the trust policy provided in the Usage AI dashboard.
- Paste it into the JSON editor to replace any default content.
- Attach the Policy to the Role
- Search for "UsageAI" (the policy created in the previous step).
- Select it to attach to this role.
- Review and Create the Role
- Click Next through the configuration pages until you reach the Review stage.
- Set the role name as "UsageAI".
- Click Create Role to finalize.
- Proceed to the Final Step
- After the role is successfully created, click Continue in the Usage AI dashboard.
Step 6: Link Your New IAM Role
- Find Your Role ARN
- Go to the IAM Roles Page in the AWS Console.
- Locate the IAM role you just created (named "UsageAI").
- Copy the Role ARN (Amazon Resource Name).
- Paste the Role ARN
- In the Usage AI dashboard, paste the copied ARN into the field labeled "Paste your Role ARN here".
Click Complete Integration to finalize the connection of your AWS account to Usage AI.
Batch Connecting Your AWS Organization to Usage (Method 2: AWS CloudFormation)
Step 1: Select CloudFormation as the Connection Method
- Navigate to Integrations and select AWS.
- Click the Connect button.
- Under the More Options dropdown, select Connect via AWS CloudFormation.
Step 2: Enable Hourly Cost Data (Skip if no Fargate spend)
- Determine if Fargate is Needed:
- If you do not need Fargate recommendations, you can skip this step.
- If you have Fargate enabled, leave the checkbox selected and proceed.
- Enable Hourly Cost Data in AWS Cost Explorer
- Open the Cost Explorer Settings in the AWS Console.
- Under Hourly Granularity (up to 14 days of past data), check the box:
- "Cost and usage data for all AWS services at hourly granularity (without resource-level data)."
- Confirm Selection
- Check the box "I have Fargate enabled and have successfully enabled this option on AWS Cost Explorer Settings."
- Proceed to the Next Step
- Click Continue to move forward.
Step 3: Create and Verify the CloudFormation Stack
- Check for Existing Stack (Optional)
- If you have already created a stack with Usage AI, check the box "Created a stack already?" to skip the creation process.
- Create a New Stack
- Click on Create Stack within the specified AWS region.
- Note: The stack creation process may take up to 2 minutes.
- Verify Stack Creation
- Once the stack is created, navigate to the Outputs tab in the AWS CloudFormation Console.
- Copy the Role ARN provided in the outputs.
- Enter the Role ARN
- Paste the copied Role ARN into the "Paste your Role ARN here" field in the Usage AI dashboard.
- Enable Trust Access
- Check the box "I have enabled trust access to enable stack sets" if required.
- Add the Account
- Click Add Account to proceed.
Step 4: Finalize CloudFormation Setup and Verify Integration
- Add Root Account
- After pasting the Role ARN in the Usage AI dashboard, click on "Add Root Account" to proceed to the "View All Accounts" page.
- Enable Trust Access
- Follow the provided link on the dashboard to enable trust access and activate stack sets in your AWS account.
- Copy and Execute CloudFormation Code
- Copy the CloudFormation code displayed on the Usage AI dashboard.
- Click the link below the code to open your AWS CLI Console.
- Paste the copied code into the AWS CLI Console and execute it.
- Retrieve the Operation ID
- After executing the stack set, the AWS CLI Console will generate an Operation ID as part of the output.
- Verify Account Status
- Return to the Usage AI dashboard.
- Paste the Operation ID into the designated field under "Verify Account Status".
- Complete the Setup
- Click "Continue" to proceed to the next step.
Click "Verify Status" to complete the setup process.
Batch Connecting Your AWS Organization to Usage (Method 3: Terraform)
Step 1: Select Terraform as the Connection Method
- Navigate to Integrations and select AWS.
- Click the Connect button.
- Under the More Options dropdown, select Connect via Terraform.
Step 2: Enable Hourly Cost Data (Skip if no Fargate spend)
- Determine if Fargate is Needed:
- If you do not need Fargate recommendations, you can skip this step.
- If you have Fargate enabled, leave the checkbox selected and proceed.
- Enable Hourly Cost Data in AWS Cost Explorer
- Open the Cost Explorer Settings in the AWS Console.
- Under Hourly Granularity (up to 14 days of past data), check the box:
- "Cost and usage data for all AWS services at hourly granularity (without resource-level data)."
- Confirm Selection
- Check the box "I have Fargate enabled and have successfully enabled this option on AWS Cost Explorer Settings."
- Proceed to the Next Step
- Click Continue to move forward.
Step 3: Connect via Terraform
- Ensure your AWS credentials are connected with Terraform.
- Copy the Terraform code provided in the Usage AI dashboard.
- Open your Terraform console, paste the code, and run the script (this may take up to 2 minutes).
- After the script completes, copy the generated Role ARN from the output.
- Paste the Role ARN into the designated field in the Usage AI dashboard.
Click "Complete Integration" to finalize the connection.