Rechercher

Ce contenu n'est pas disponible dans la langue sélectionnée.

Chapter 1. Creating an Amazon Web Services integration

download PDF

To add an AWS account to hybrid committed spend, you must configure your AWS account to provide metrics, then add your AWS account as an integration from the hybrid committed spend user interface.

Note

You must have a user with Cloud Administrator entitlements before you can add integrations to hybrid committed spend.

When you add your AWS account as an integration, this creates a read-only connection to AWS to collect cost and usage information hourly in hybrid committed spend, but does not make any changes to the AWS account.

Before you can add your AWS account to hybrid committed spend as an integration, you must configure the following services on your AWS account to allow hybrid committed spend access to metrics:

  1. An S3 bucket to store cost and usage data reporting for hybrid committed spend
  2. An Identity Access Management (IAM) policy and role for hybrid committed spend to process the cost and usage data
  3. A Hybrid Committed Spend integration on Red Hat Hybrid Cloud Console

As you will complete some of the following steps in the AWS console, and some steps in the hybrid committed spend user interface, keep both applications open in a web browser.

Add your AWS integration to hybrid committed spend from the Integrations page.

Note

Because non-Red Hat products and documentation can change, instructions for configuring the third-party integrations provided in this guide are general and correct at the time of publishing. See the AWS documentation for the most up-to-date and accurate information.

1.1. Adding an AWS account as an integration

Prerequisites

  • To add data integrations to cost management, you must have a Red Hat account with Cloud Administrator permissions.

Procedure

  1. From Red Hat Hybrid Cloud Console, click Settings Menu Settings icon > Integrations.
  2. On the Settings page, in the Cloud tab, click Add integration.
  3. On the Select integration type step, in the Add a cloud integration wizard, select Amazon Web Services. Click Next.
  4. Enter a name for the integration and click Next.
  5. On the Select configuration step, select how you want to connect to your AWS integration.

    1. Select Account authorization to provide your AWS account credentials and let Red Hat configure and manage your integration for you.
    2. Select Manual configuration to customize your integration. You can filter your information before it is sent to hybrid committed spend. For instructions on how to filter your data, see Chapter 2, Filtering your Amazon Web Services data before sending it to hybrid committed spend. Click Next.
  6. In the Select application step, select Cost management. Click Next.
  7. If you selected the account authorization method, on the Review details step, review the details and click Add. If you selected the manual configuration method, continue to the next step in the wizard and configure your S3 bucket.

1.2. Creating an AWS S3 bucket for storing your cost data

Create an Amazon S3 bucket with permissions configured to store billing reports.

Procedure

  1. Log in to your AWS account to begin configuring cost and usage reporting.
  2. 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.
  3. In the AWS Billing console, create a data export that will be delivered to your S3 bucket. Specify the following values and accept the defaults for any other values:

    • Report name: <rh_cost_report> (note this name as you will use it later)
    • Additional report details: Include resource IDs
    • S3 bucket: <the S3 bucket you configured previously>
    • Time granularity: Hourly
    • Enable report data integration for: Amazon Redshift, Amazon QuickSight (do not enable report data integration for Amazon Athena)
    • Compression type: GZIP
    • Report path prefix: cost

      Note

      See the AWS Billing and Cost Management documentation for more details on configuration.

  4. On the Create storage step, in the Add a cloud integration wizard, paste the name of your S3 bucket and select the region that it was created in. Click Next.
  5. In the Add a cloud integration wizard, on the Create cost and usage report step, click Next.

1.3. Activating AWS tags

To use tags to organize your AWS resources in the hybrid committed spend application, activate your tags in AWS to allow them to be imported automatically.

Procedure

  1. In the AWS Billing console:

    1. Open the Cost Allocation Tags section.
    2. Select the tags you want to use in the hybrid committed spend application, and click Activate.
  2. If your organization is converting systems from CentOS 7 to RHEL and using hourly billing, activate the com_redhat_rhel tag for your systems in the Cost Allocation Tags section of the AWS console.

    1. After tagging the instances of RHEL you want to meter in AWS, select Include RHEL usage.
  3. In the Red Hat Hybrid Cloud Console Integrations wizard, click Next.

Additional resources

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

1.4. Configure an IAM policy to enable minimal account access for Cost and Usage Reports

To provide data in the web interface and API, hybrid committed spend must consume the Cost and Usage Reports produced by AWS. To only provide access to the stored information and nothing else, create an IAM policy and role for hybrid committed spend to use.

Procedure

  1. From the AWS Identity and Access Management (IAM) console, create a new IAM policy for the S3 bucket that you configured previously.

    1. Select the JSON tab and paste the following content in the JSON policy text box:

      {
        "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
      Replace <your_bucket_name> in both locations with the name of the Amazon S3 bucket you configured previously.
  2. In the AWS IAM console, create a new IAM role:

    1. Select Another AWS account as the type of trusted entity.
    2. Enter 589173575009 as the Account ID to provide the hybrid committed spend application with read access to the AWS account cost data.
    3. Attach the IAM policy you just configured.
    4. Enter a role name and description.
  3. In the AWS IAM console, in the Roles section, open the summary screen for the role you just created.

    1. Copy the Role ARN, which is a string beginning with arn:aws:.
  4. In the Red Hat Hybrid Cloud Console Add a cloud integration wizard, paste your Role ARN and click Next.
  5. Review the details and click Finish to add the AWS account to cost management.

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

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

Red Hat logoGithubRedditYoutubeTwitter

Apprendre

Essayez, achetez et vendez

Communautés

À propos de la documentation Red Hat

Nous aidons les utilisateurs de Red Hat à innover et à atteindre leurs objectifs grâce à nos produits et services avec un contenu auquel ils peuvent faire confiance.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez leBlog Red Hat.

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

© 2024 Red Hat, Inc.