Nothing Special   »   [go: up one dir, main page]

Aws: Cost and Usage Report: Video Assignment On The Course SWE4002 - Cloud Computing

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 25

School of Computer Science and Engineering (SCOPE)

Video Assignment on the Course SWE4002 – Cloud Computing


AWS: COST AND USAGE REPORT

Created by

Anisha V (19MIS1178)
MTech Integrated Software Engineering
VIT, Chennai
AWS: AMAZON WEB SERVICES
COST AND USAGE REPORT
AGENDA
ACCESS

A N A LY Z E A N D U N D E R S TA N D

QUERYING COST & USAGE REPORTS

BILLING REPORTS

CLOSING

3
INTRODUCTION
What is Cost and Usage Report

 Contains the most comprehensive set of cost and usage data.


Tracks AWS usage, provides estimated charges associated with
respective accounts.
 Every report produced contains line items for each unique
combination of products, their usage type and the operations
used by the respective account.
 AWS updates the report once a day in the bucket in csv format,
using spreadsheet software such as Microsoft Excel one can
access and view.
 The report is customizable and aggregate the information
either by hour, day or month.
 The report can be updated 3 times a day.
 Create, retrieve, and delete reports using AWS CUR API
reference.
 Deliver report files to your Amazon S3 Bucket
4
HOW DOES IT WORK
 Each update in a given month is cumulative, so each version of the Cost and Usage Reports includes
all of the billing data for the month to date.
 The reports generated throughout the month are estimated, and subject to change during the rest of
the month as you continue to use your AWS services.
 Different AWS services provide your usage-based billing information at different times, so you may
notice updates to a certain hour or day come in at different times.
 AWS finalizes the Cost and Usage Report's usage charges at the end of the month after an invoice has
been issued for your usage charges.
 AWS might update reports after they have been finalized if AWS applies refunds, credits, or support
fees to your usage for the month.
 You can identify whether your anniversary bill charges have been finalized by referencing whether or
not the Bill/InvoiceId column in your Cost and Usage Report has an Invoice ID for a line item.

5
HOW AWS METERING WORKS

6
7
HOW TO ACCESS
AWS COST DATA
L E T ’ S D I V E I N

8
CREATING REPORTS
To create can use the Cost & Usage Reports page of billing and cost management console.

1. Sign in to the Billing and Cost Management console at https://console.aws.amazon.com/billing/home#/


2. On the navigation pane, choose Cost & Usage Reports.
3. Choose Create report.
4. For Report name, enter a name for your report.
5. For Additional report details, select Include resource IDs to include the IDs of each individual resource in the
report.
6. Including resource IDs will create individual line items for each of your resources. This can increase the size of
your Cost and Usage Reports files significantly, based on your AWS usage.
7. 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.
8. Choose Next.
9. For S3 bucket, choose Configure.
10. In the Configure S3 Bucket dialog box, do one of the following:
11. Select an existing bucket from the drop down list and choose Next.
• Enter a bucket name and the Region where you want to create a new bucket and choose Next.
• Review the bucket policy, and select I have confirmed that this policy is correct and choose Save.

9
CREATING REPORTS
12. For Report path prefix, enter the report path prefix that you want prepended to the name of your report.
13. 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.
14. 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.
15. Overwriting reports can save on Amazon S3 storage costs. Delivering new report versions can improve auditability
of billing data over time.
17.For Enable report data integration for, select whether you want to enable your Cost and Usage Reports to
integrate with Amazon Athena, Amazon Redshift, or Amazon QuickSight. The report is compressed in the following
formats:
Athena: parquet format
Amazon Redshift or Amazon QuickSight: .gz compression
Choose Next.

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

10
VIEWING REPORTS
1. Sign in to the Billing and Cost Management console at https://console.aws.amazon.com/billing/home#/

2. On the navigation pane, choose Cost & Usage Reports.

3. You'll find a list of your Cost and Usage Reports listed on the page dashboard

11
From the image, you can see a report’s definition can’t be modified. For example, if you want the report to go to a
separate S3 bucket, you have to delete and recreate it.

12
ACCESSING YOUR COST AND USAGE
REPORTS IN AMAZON S3
Cost and Usage Reports delivery timeline
During the report period, AWS delivers a new report and a new manifest file each time AWS updates the report.
AWS builds on previous reports until the end of the billing period. After the end of the report billing period, AWS
generates a new report with none of the information from the previous report.

Cost and Usage Reports formatting


The Cost and Usage Reports is a .csv file or a collection of .csv files that is stored in an Amazon S3 bucket. The size of
an individual report can grow to more than a gigabyte and might exceed the capacity of desktop spreadsheet
applications to display every line. If a report is larger than most applications can handle, AWS splits the report into
multiple files that are stored in the same folder in the Amazon S3 bucket. The specific organization and naming
conventions of your AWS CUR files depend on what parameters you chose when you created your report.

Keeping your previous Cost and Usage Reports


When you choose to keep your previous Cost and Usage Reports, your AWS CUR uses the following Amazon S3
organization and naming conventions.
<example-report-prefix>/<example-report-name>/yyyymmdd-yyyymmdd/<assemblyId>/<example-report-name>-
<file-number>.csv.<zip|gz>
13
ACCESSING YOUR COST AND USAGE
REPORTS IN AMAZON S3
Overwriting previous Cost and Usage Reports
When you choose to overwrite your previous Cost and Usage Reports, your AWS CUR uses the following Amazon S3
organization and naming conventions.
<example-report-prefix>/<example-report-name>/yyyymmdd-yyyymmdd/<example-report-name>-<file-
number>.csv.<zip|gz>

Athena specifications
If you chose Athena support when you created your AWS CUR, the file naming conventions are the same as when
you choose to overwrite your AWS CUR except for the format and compression. Athena AWS CUR files use .parquet
instead. For example, your report could be delivered as a collection of the following files.
<example-report-prefix>/<example-report-name>/yyyymmdd-yyyymmdd/<example-report-name>.parquet
<example-report-prefix>/<example-report-name>/yyyymmdd-yyyymmdd/<cost_and_usage_data_status>
<example-report-prefix>/<example-report-name>/yyyymmdd-yyyymmdd/<example-report-name>-Manifest.json
<example-report-prefix>/<example-report-name>/yyyymmdd-yyyymmdd/<example-report-name>-create-table.sql
<example-report-prefix>/<example-report-name>/yyyymmdd-yyyymmdd/crawler-cfn.yml

14
Cost and Usage Reports manifest files
When AWS updates AWS CUR, AWS also creates and delivers manifest files that you can use for Amazon Athena,
Amazon Redshift, or Amazon QuickSight.

Manifest files use the naming conventions, and lists the following:
All of the detail columns that are included in the report to date
A list of report files if the report was split into multiple files
The time period covered by the report, and other information.
<example-report-prefix>/<example-report-name>/yyyymmdd-yyyymmdd/<example-report-name>-Manifest.json
<example-report-prefix>/<example-report-name>/yyyymmdd-yyyymmdd/<assemblyId>/<example-report-name>-
Manifest.json
<example-report-prefix>/<example-report-name>/<example-report-name>/year=2018/month=12/<example-report-
name>-Manifest.json

Keeping the previous Cost and Usage Reports


When you keep the previous Cost and Usage Reports, the manifest file is delivered to both the date range folder and
the assemblyId folder. Each time AWS creates a new AWS CUR for a date range, it overwrites the manifest file stored
in the date range folder with an updated manifest file. AWS delivers the same updated manifest file to the
assemblyId folder along with the files for that update. Manifest files in the assemblyId folder aren't overwritten.

Overwriting the previous Cost and Usage Reports


When you overwrite the previous AWS CUR, the manifest file is delivered to the month=mm folder. The manifest file
is overwritten along with the report files.
15
Cost and Usage Reports contain details about your usage. The following sections list and describe a subset of
columns that you see in your report, and the corresponding definitions.

To download the full list of the columns that can appear in AWS Cost and Usage Reports (AWS CUR) and the services
that the columns apply to, download Column_Attribute_Service.zip. This comma-separated values (CSV) list includes
the columns Identity, Billing, Line Item, Reservation, Pricing, and Product.

16
QUERYING COST
AND USAGE
REPORTS USING
AMAZON ATHENA
L E T ’ S D I V E I N

17
Amazon Athena is a serverless query service that you can use to analyze the data from your AWS Cost and Usage
Reports (AWS CUR) in Amazon Simple Storage Service (Amazon S3) using standard SQL. This helps you avoid having
to create your own data warehouse solutions to query AWS CUR data.

Create both a new Amazon S3 bucket and a new AWS CUR report to use with Athena. AWS CUR supports only the
Apache Parquet compression format for Athena and automatically overwrites previous reports that are stored in
your S3 bucket.

• Setting up Athena using AWS CloudFormation templates


• Setting up Athena manually
• Running Amazon Athena queries
• Loading report data to other resources

18
we can go beyond the last 14 days
and see if we are achieving any
savings on EC2 over the last year.
From the image, it seems : in August
2015, this AWS account was spending
$85,000 for its EC2 instances. As of
June 2016, it is spending an average
of $65,000, a cost reduction of
$20,000:

19
20
BILLING REPORTS
Billing reports are yet another type of report and like cost and usage reports, they too have to be saved
in an S3 bucket in CSV format. Billing Reports can be enabled from the AWS Billing preferences screen.
Once the S3 bucket has been verified, you can choose to receive the following types of reports:
• Monthly report
• Detailed report
• Cost allocation report
• Detailed billing report with resources and tags

21
MONTHLY REPORTS
Can download a Monthly Report of your estimated AWS charges from the Bills page of the Billing and Cost
Management console.
The report contains line items for each unique combination of AWS product, usage type, and operation that the
account uses. The estimated report is updated up to several times per day.
You can get reports for previous months by selecting the
statement period, starting with the report for the month
when you signed up for monthly reports. Reports from
before you signed up are not available.

22
MONTHLY COST ALLOCATION
You can create custom cost allocation tag sets for your AWS resources that can describe the business dimensions of
your AWS usage. These tag sets enable you to organize and track your AWS costs. Many AWS services expose
tagging in their feature sets. You create the tags within those services by using the console, API, or the AWS
command line interface (CLI).

After you create your tags, you can


obtain a monthly cost allocation
report/. This is essentially the
Monthly Report including your
cost allocation tag sets.

23
AWS USAGE REPORT
You can download dynamically generated AWS usage reports. Each report covers a single service, and you can
choose which usage type, operation, and time period to include. You can also choose how the data is
aggregated.

24
References:
https://docs.aws.amazon.com/cur/latest/userguide/what-is-cur.html
https://docs.aws.amazon.com/cur/latest/userguide/cur-data-view.html
https://docs.aws.amazon.com/cur/latest/userguide/data-dictionary.html

You might also like