此内容没有您所选择的语言版本。

Chapter 1. Creating an unfiltered AWS cloud integration


Note
  • If you want to create a filtered AWS integration, do not complete the following steps. Instead, go to Creating a filtered AWS integration.
  • If you are using RHEL metering, after you integrate your data with cost management, go to Adding RHEL metering to an AWS integration to finish configuring your integration for RHEL metering.
  • AWS is a third-party product and its UI and documentation can change. The instructions for configuring third-party integrations are correct at the time of publishing. For the most up-to-date information, see the AWS documentation.

In the Integrations page, you can create an AWS cloud integration and configure your AWS account to give cost management access.

Prerequisites

1.1. Adding an AWS account as an integration

Add an AWS integration so that cost management can process your AWS Cost and Usage Reports. You can add an integration automatically by providing your AWS account credentials.

Procedure

  1. From Red Hat Hybrid Cloud Console, click Settings Settings icon > Integrations.
  2. On the Settings page, click Create Integration Cloud to enter the Add a cloud integration wizard.
  3. On the Select integration type step, select Amazon Web Services. Click Next.
  4. Enter a name for the integration and click Next.
  5. On the Select configuration step, select Manual configuration. Do not select the recommended configuration mode when you set up cost management integrations. The recommendation is for other workflows.
  6. In the Select application step, select Cost management. Click Next.

1.2. Creating an S3 bucket and a data export

Next, you will create an Amazon S3 bucket with permissions configured to store your data exports.

Procedure

To create a data export, log in to your AWS account and complete the following steps:

  1. In the AWS S3 console, create a new S3 bucket or use an existing bucket. If you are configuring a new S3 bucket, accept the default settings.
  2. In the cost management Add an integration wizard, enter the name of your S3 bucket and select the region that it was created in. Click Next.
  3. In the AWS Billing Console, create a data export that will be delivered to your S3 bucket. Enter the following values and accept the defaults for any other values:

    • Export type: Legacy CUR export
    • Report name: koku
    • Include: resource IDs
    • Time unit: Hourly
    • Enable report data integration for: Amazon Redshift and Amazon QuickSight. Disable report data integration for Amazon Athena.
    • Compression type: GZIP
    • S3 bucket: <the S3 bucket that you configured previously>
    • Report path prefix: cost
  4. In the Add a cloud integration wizard, on the Create cost and usage report step, click Next.

    Note

    For more details on configuration, see the AWS Billing and Cost Management documentation.

1.3. Activating AWS tags

Tags can help you organize your AWS resources in cost management. Activate your tags in AWS and then give cost management permissions to import them automatically.

In the AWS Billing console:

  1. Click Cost Allocation Tags.
  2. Select the tags that you want to use in cost management. Click Activate.

    • If your organization is converting systems from CentOS 7 to RHEL and using hourly billing, activate the com_redhat_rhel tag for your systems.
    • If you are tagging instances of RHEL that you want to meter in AWS, select Include RHEL usage. Return to the Red Hat Hybrid Cloud Console Create an integration wizard and select Include RHEL usage.

For more information about tagging, see Adding tags to an AWS resource.

1.3.1. Configuring an IAM policy to enable account access for AWS Cost and Usage Reports

Cost management needs your AWS Cost and Usage Reports to display data. To provide access to only your stored information, create an Identity and Access Management (IAM) policy and role in AWS.

In the cost management Add a cloud integration wizard:

  1. On the Tags, aliases, and organizational units step, select any additional data points that you want to include:

    • Select Include AWS account aliases to display an AWS account alias rather than an account number. In the next step of the wizard, this selection will populate iam:ListAccountAliases in your IAM JSON policy.
    • Select Include AWS organization units if you are using consolidated billing rather than the account ID. In the next step of the wizard, this selection will populate _organization:List*_ and _organizations:Describe*_ in your IAM JSON policy.
  2. Click Next
  3. Copy the IAM JSON policy that is generated based on your selections.

In the AWS Identity and Access Management console:

  1. Create a new IAM policy for the S3 bucket that you configured.
  2. Select the JSON tab and enter the IAM JSON policy that you copied from the Red Hat Hybrid Cloud Console Add a cloud integration wizard.

Example IAM JSON policy

+

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "VisualEditor0",
      "Effect": "Allow",
      "Action": [
        "s3:Get*",
        "s3:List*"
      ],
        "Resource": [
        "arn:aws:s3:::<your_bucket_name>", 1
        "arn:aws:s3:::<your_bucket_name>/*"
      ]
    },

    {
      "Sid": "VisualEditor1",
      "Effect": "Allow",
      "Action": [
        "s3:ListBucket",
        "cur:DescribeReportDefinitions"
      ],
      "Resource": "*"
    }
  ]
}
  1. Next, create a new IAM role:

    1. Select Another AWS account as the type of trusted entity.
    2. Enter 589173575009 for the Account ID to give Red Hat Hybrid Cloud Console read access to the AWS account’s cost data.

In the cost management Add a cloud integration wizard:

  1. Click Next.
  2. Copy your External ID from the Create IAM role step.

In the AWS Identity and Access Management console:

  1. Enter your External ID.
  2. Attach the IAM policy that you configured.
  3. Enter a role name and description.
  4. In Roles, open the summary screen for the role that you created.

    1. Copy the Role ARN. It is a string that starts with arn:aws:.

In the cost management Add a cloud integration wizard:

  1. Click Next
  2. Enter your Role ARN and click Next.
  3. Review the details of your cloud integration and click Add.

Cost management will now begin collecting Cost and Usage data from your AWS account as well as any other linked AWS accounts.

Note

The data can take a few days to populate before it shows on the cost management dashboard.

Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.