

# Creating Cost and Usage Reports
<a name="creating-cur"></a>

**Note**  
Data Exports enables you to create exports of the Cost and Usage Report (CUR) 2.0. This is the new and recommended way to receive your detailed cost and usage data from AWS. For more information, see [Migrating from CUR to CUR 2.0 in Data Exports](https://docs.aws.amazon.com/cur/latest/userguide/dataexports-migrate.html).  
When you use billing transfer, you can create AWS Cost and Usage Report reports for your billing transfer views only from the Data Export page, not from the legacy AWS Cost and Usage Report page.

You can use the **Cost and Usage Reports** page in the Billing and Cost Management console to create Cost and Usage Reports. In the following section, you'll find information on how to get started with Cost and Usage Reports.

**Topics**
+ [Setting up an Amazon S3 bucket for Cost and Usage Reports](cur-s3.md)
+ [Creating reports](cur-create.md)

# Setting up an Amazon S3 bucket for Cost and Usage Reports
<a name="cur-s3"></a>

To receive billing reports, you must have an Amazon S3 bucket in your AWS account to receive and store your reports. When creating a Cost and Usage Report in the billing console, you can select an existing Amazon S3 bucket that you own or create a new bucket. In either case, you’ll be asked to review and confirm the application of the following default bucket policy. Editing this policy in the Amazon S3 console or changing the bucket owner after you’ve created a Cost and Usage Report will prevent AWS from being able to deliver your reports. Storing the billing reports data in your Amazon S3 bucket is billed at standard Amazon S3 rates. For more information, see [Quotas and restrictions](billing-cur-limits.md).

The following policy is applied to every bucket when creating a Cost and Usage Report:

```
{
    "Statement": [
        {
            "Effect": "Allow",
            "Principal": {
                "Service": "billingreports.amazonaws.com"
            },
            "Action": [
                "s3:GetBucketAcl",
                "s3:GetBucketPolicy"
            ],
            "Resource":"arn:aws:s3:::amzn-s3-demo-bucket",
            "Condition": {
                "StringEquals": {
                    "aws:SourceArn": "arn:aws:cur:us-east-1:${AccountId}:definition/*",
                    "aws:SourceAccount": "${AccountId}"
                }
            }
        },
        {
            "Sid": "Stmt1335892526596",
            "Effect": "Allow",
            "Principal": {
                "Service": "billingreports.amazonaws.com"
            },
            "Action": "s3:PutObject",
            "Resource": "arn:aws:s3:::amzn-s3-demo-bucket/*",
            "Condition": {
                "StringEquals": {
                    "aws:SourceArn": "arn:aws:cur:us-east-1:${AccountId}:definition/*",
                    "aws:SourceAccount": "${AccountId}"
                }
            }
        }
    ]
}
```

This default policy helps ensure that the Cost and Usage Report data can be read by the bucket owner and confirms that the bucket is owned by the account that created the Cost and Usage Report. Specifically: 
+ Every time a Cost and Usage Report is delivered, AWS first confirms whether the bucket is still owned by the account which setup the report. If the bucket ownership has changed, the report will not be delivered. This helps to ensure the security of the account’s billing data. This bucket policy allows AWS (`"Effect": "Allow"`) to check which account owns the bucket (`"Action": ["s3:GetBucketAcl", "s3:GetBucketPolicy"`).
+ To deliver reports to your Amazon S3 bucket, AWS needs write permissions for that bucket. To do this, the bucket policy grants (`"Effect": "Allow"`) the AWS Cost and Usage Reports service (`"Service": "billingreports.amazonaws.com"`) permission to deliver (`"Action": "s3:PutObject"`) reports to the bucket you own (`"Resource": "arn:aws:s3:::amzn-s3-demo-bucket/*"`).

  This bucket policy does not give AWS permissions to read or delete any objects in your bucket, including the Cost and Usage Reports after they’ve been delivered.
+ For an Amazon S3 bucket that has ACL enabled, AWS further applies a `BucketOwnerFullControl` ACL to the reports when delivering them. By default, Amazon S3 objects, such as these reports, can only be read by the user or service principal who wrote them. To provide you or the bucket owner with permission to read the reports, AWS must apply the `BucketOwnerFullControl` ACL. The ACL grants the bucket owner `Permission.FullControl` for these reports. However, it’s recommended to disable ACL and use an Amazon S3 bucket policy to control access. Note that Amazon S3 has changed the default settings and, for newly created buckets, ACLs are disabled by default. For more information, see [Controlling ownership of objects and disabling ACLs for your bucket](https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html).

If you see an **Invalid bucket** error in your billing console for Cost and Usage Report, you should verify that this policy and bucket ownership haven’t changed after report setup.

# Creating reports
<a name="cur-create"></a>

**Note**  
Data Exports enables you to create exports of the Cost and Usage Report (CUR) 2.0. This is the new and recommended way to receive your detailed cost and usage data from AWS. For more information, see [Migrating from CUR to CUR 2.0 in Data Exports](https://docs.aws.amazon.com/cur/latest/userguide/dataexports-migrate.html).

You can use the **Cost and Usage Reports** page of the Billing and Cost Management console to create Cost and Usage Reports. You can create up to 10 reports for an individual AWS account.

**Note**  
It can take up to 24 hours for AWS to start delivering reports to your Amazon S3 bucket. After delivery starts, AWS updates the AWS Cost and Usage Reports files at least once a day.<a name="create-cur-steps"></a>

**To create Cost and Usage Reports**

1. Open the Billing and Cost Management console at [https://console.aws.amazon.com/costmanagement/](https://console.aws.amazon.com/costmanagement/).

1. In the navigation pane, under **Legacy Pages**, choose **Cost and Usage Reports**.

1. Choose **Create report**.

1. For **Report name**, enter a name for your report.

1. For **Report additional content**, select **Include resource IDs** to include the IDs of each individual resource in the report.
**Note**  
Including resource IDs creates individual line items for each of your resources. This might increase the size of your Cost and Usage Reports files significantly, based on your AWS usage.

1. Select **Split cost allocation data** to include detailed cost and usage for shared resources (Amazon ECS and Amazon EKS).
**Note**  
Including split cost allocation data creates individual line items for each of your resources (that is, ECS tasks and Kubernetes pods). This might increase the size of your Cost and Usage Reports files significantly, based on your AWS usage.

1. For **Data refresh settings**, select whether you want the AWS Cost and Usage Reports to refresh if AWS applies refunds, credits, or support fees to your account after finalizing your bill. When a report refreshes, a new report is uploaded to Amazon S3.

1. Choose **Next**.

1. For **S3 bucket**, choose **Configure**.

1. In the **Configure S3 bucket** dialog box, do one of the following:
   + Select an existing bucket.
   + Select **Create a bucket**, enter a bucket name, and then choose the Region where you want to create a new bucket.

1. Review the bucket policy, select **The following default policy will be applied to your bucket**, and then choose **Save**.

1. For **Report path prefix**, enter the report path prefix that you want prepended to the name of your report. 

1. For **Time granularity**, choose one of the following:
   + **Hourly** if you want the line items in the report to be aggregated by the hour.
   + **Daily** if you want the line items in the report to be aggregated by the day.
   + **Monthly** if you want the line items in the report to be aggregated by month.

1. For **Report versioning**, choose whether you want each version of the report to overwrite the previous version of the report or to be delivered in addition to the previous versions.

   Overwriting reports can save on Amazon S3 storage costs. Delivering new report versions can improve auditability of billing data over time.

1. For **Report data integration**, select whether you want to enable your Cost and Usage Reports to integrate with Amazon Athena, Amazon Redshift, or Quick. The report is compressed in the following formats:
   + **Athena**: parquet format
   + **Amazon Redshift or Quick**: .gz compression

1. Choose **Next**.

1. After you have reviewed the settings for your report, choose **Review and Complete**. 

You can always return to the **Cost and Usage Reports** page in the Billing and Cost Management console to see when your reports were last updated.