> ## Documentation Index
> Fetch the complete documentation index at: https://cloud-architect.ipoint-labs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Creating Cost and Usage Reports

> Hands-on lab · 45m

Launch this lab in the IP Lab Portal, then follow the steps below in the AWS console.

<a className="ip-lab-portal-btn" href="https://labs.intellectualpoint.com/labs/creating-cost-and-usage-reports" target="_blank" rel="noreferrer">
  Open IP Lab Portal
</a>

## Overview

#### Lab details

1. The objective of this lab is to generate a Cost and Usage Report and storing it in an S3 bucket lies in understanding and managing the costs associated with AWS services effectively.
2. Duration: **1 Hour**
3. AWS Region: **US East (N. Virginia) us-east-1**

#### Introduction

#### AWS Cost and Usage Report

1. Cost and Usage Reports provide detailed information about your AWS usage and associated costs. This includes data on the usage of various AWS services, such as EC2 instances, S3 storage, RDS databases, etc., along with the corresponding costs incurred.
2. The reports offer granular usage data, typically aggregated by the hour, day, or month, depending on your chosen time granularity. This level of detail allows users to analyze their AWS spending patterns over different time periods and identify trends or anomalies.
3. Users can customize the Cost and Usage Reports based on their specific requirements. They can choose which additional content to include in the reports, such as resource IDs, split cost allocation data (for shared resources like Amazon ECS), and enable integration with services like Amazon Athena, Redshift, or QuickSight for further analysis.
4. By analyzing the Cost and Usage Reports, users can gain insights into their AWS spending and identify opportunities for cost optimization. This may involve identifying unused or underutilized resources, optimizing instance types, leveraging Reserved Instances or Spot Instances, or implementing cost-saving strategies like rightsizing and scheduling.
5. Cost and Usage Reports promote transparency and accountability in AWS spending. They provide stakeholders with visibility into resource usage, costs, and utilization across different departments, teams, or projects. This transparency helps in allocating costs accurately, tracking budget adherence, and facilitating financial planning and reporting processes.

#### Architecture diagram

<img src="https://mintcdn.com/ip-cloud-architect-pathway/vScAll09yOH6D8RK/images/labs/creating-cost-and-usage-reports/001.png?fit=max&auto=format&n=vScAll09yOH6D8RK&q=85&s=f42115608b44d14ebda73696b9e1484e" alt="" width="1785" height="1017" data-path="images/labs/creating-cost-and-usage-reports/001.png" />

#### Task details

1. Sign in to AWS Management Console
2. Create Cost and Usage report
3. Validation of the Lab

#### Launching the lab environment

1. To launch the lab environment, Click on the **Launch lab** button.
2. Please wait until the cloud environment is provisioned. It will take less than a minute to provision.
3. Once the lab is started, you will be provided with **IAM user name, Password, Access Key,** and **Secret Access Key**.

<Note>
  You can only start one lab at any given time
</Note>

## Lab guide

#### Lab steps

#### Task 1: Sign in to AWS Management Console

1. Click on the **Open console** button, and you will get redirected to AWS Console in a new browser tab.
2. On the AWS sign-in page,

   * Leave the Account ID as default. Never edit/remove the 12 digit Account ID present in the AWS Console. otherwise, you cannot proceed with the lab.
   * Now copy your **User Name** and **Password** in the lab Console to the **IAM Username and Password** in AWS Console and click on the **Sign in** button.
3. Once Signed In to the AWS Management Console, Make the default AWS Region as **US East (N. Virginia) us-east-1**.

#### Task 2: Creating Cost and usage Report

1. Navigate to **Billing and Cost Management** by clicking on the **Services** menu at the top, then click on **Billing and Cost Management** in the Cloud Financial Management section.

2. Make sure you are in the **US East (N. Virginia) us-east-1** Region.

3. In the **Billing and Cost Management** Click on **Data Exports** in the left panel and click on **Create** button.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/vScAll09yOH6D8RK/images/labs/creating-cost-and-usage-reports/002.png?fit=max&auto=format&n=vScAll09yOH6D8RK&q=85&s=b50aa2e09c140681da5562a02d00daf8" alt="" width="2034" height="808" data-path="images/labs/creating-cost-and-usage-reports/002.png" />

4. Export Type : Select **Standard data report**

5. Export Name: Enter **WhizReport**

6. **For Data table content settings:**

* Keep **resource IDs** and **Split cost allocation data** as **uncheck** for now as they 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.
* Time granularity: Select **Hourly**

<img src="https://mintcdn.com/ip-cloud-architect-pathway/vScAll09yOH6D8RK/images/labs/creating-cost-and-usage-reports/003.png?fit=max&auto=format&n=vScAll09yOH6D8RK&q=85&s=8579541a9cc908879a1d4a85a89f0ea9" alt="" width="1366" height="798" data-path="images/labs/creating-cost-and-usage-reports/003.png" />

7. Keep **Data export delivery options** as default.

8. For Data export storage settings :

* To create S3 bucket click on **configure** button.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/vScAll09yOH6D8RK/images/labs/creating-cost-and-usage-reports/004.png?fit=max&auto=format&n=vScAll09yOH6D8RK&q=85&s=fd9c3c0d733c662776937051aec90f98" alt="" width="1448" height="182" data-path="images/labs/creating-cost-and-usage-reports/004.png" />

* Select **Create a bucket**
* Bucket name : Enter **whizbucket\<RANDOM\_NUMBERS>**
* Click on Create bucket button.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/vScAll09yOH6D8RK/images/labs/creating-cost-and-usage-reports/005.png?fit=max&auto=format&n=vScAll09yOH6D8RK&q=85&s=979d74beac1aa37789413aeaa1dc5fce" alt="" width="1186" height="1398" data-path="images/labs/creating-cost-and-usage-reports/005.png" />

* S3 path prefix: Enter **Report**

<img src="https://mintcdn.com/ip-cloud-architect-pathway/vScAll09yOH6D8RK/images/labs/creating-cost-and-usage-reports/006.png?fit=max&auto=format&n=vScAll09yOH6D8RK&q=85&s=df991a69fa98f0a2ae1780340ee4025e" alt="" width="1520" height="508" data-path="images/labs/creating-cost-and-usage-reports/006.png" />

9. Click on Create button to create the report.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/vScAll09yOH6D8RK/images/labs/creating-cost-and-usage-reports/007.png?fit=max&auto=format&n=vScAll09yOH6D8RK&q=85&s=80f201d210f6b99b6fb937cff3770ffd" alt="" width="2154" height="822" data-path="images/labs/creating-cost-and-usage-reports/007.png" />

10. Your Cost Report is created and it will be stored in S3 bucket after 24 hours.

<Note>
  This lab is developed to show how to store cost reports in an S3 bucket. AWS policy states that it can take up to 24 hours for reports to start appearing in the S3 bucket. Therefore, this lab will only last 1 hour, which means we can't not be able to access the actual report during this time.
</Note>

<Tip>
  **Do you know?**

  AWS Cost and Usage Reports not only facilitate cost optimization but also foster a culture of financial stewardship and accountability, ultimately contributing to the long-term success and sustainability of businesses operating in the cloud.
</Tip>

#### Task 3: Validation of the Lab

1. Once the lab steps are completed, please click on the **Check my work** button on the Right side panel.
2. This will validate the resources in the AWS account and displays whether you have completed this lab successfully or not.
3. Sample output :

<img src="https://mintcdn.com/ip-cloud-architect-pathway/vScAll09yOH6D8RK/images/labs/creating-cost-and-usage-reports/008.gif?s=093ea03e58925a9a7806799b1914399e" alt="" width="974" height="539" data-path="images/labs/creating-cost-and-usage-reports/008.gif" />

#### Completion and conclusion

1. You have successfully created cost usage report

#### End lab

1. Sign out of AWS Account.
2. You have successfully completed the lab.
3. Once you have completed the steps, click on **End lab** in the IP Lab Portal.

## What gets checked

When you press **Check my work**, the platform verifies each of these:

* **Check whether a data export report is created with HEALTHY state or not** — Check whether a data export report is created with HEALTHY state or not
* **check s3 object** — Check whether an object is uploaded to the S3 bucket.

## Related help

* [FAQs and Troubleshooting](/aws-cp/support/faqs-and-troubleshooting)
