hands-on lab

Analyzing AWS Cost and Usage Reports using Athena

Difficulty: Intermediate
Duration: Up to 1 hour
Students: 366
Rating: 3.8/5
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.

Description

AWS Cost and Usage Reports (CUR) can be used to provide you with detailed insights on your AWS cloud costs by the hour, day, or month, by product or product resource, and/or by your custom defined tags. Analyzing the collected CUR data allows you perform cost optimization on your running costs, allowing you to spend less on more.

In this hands-on lab, you'll learn how to turn on and activate CUR. AWS typically takes up to 24 hours before the first CUR reporting data is delivered. This lab will conveniently use a sample set of CUR data, pre-loading the data and config files into an S3 bucket that you will have access to. Once reviewed, you will then launch the provided CUR CloudFormation template. The CUR CloudFormation template provisions a Glue Crawler, which itself is configured to scan the current S3 bucket for newly published CUR parquet data files on scheduled basis. These data files are picked up and automatically populated into an Athena database. With the Athena CUR database now established, you'll finally be shown how to run various SQL queries using the Athena Query Editor to analyze the CUR data for areas where cost optimization can be applied.

Learning Objectives

Upon completion of this intermediate level lab, you will be able to:

  • Setup and establish AWS Cost and Usage Reports (CUR)
  • Create an Athena database containing CUR data
  • Analyze the CUR dataset using the Athena Query Editor
  • Write various SQL reporting queries

Intended Audience

  • Cloud Architects
  • Software Engineers
  • FinOps Practitioners

Prerequisites

Familiarity with the following will be beneficial but is not required:

  • AWS CloudFormation
  • Amazon S3

The following content can be used to fulfill the prerequisite:

Environment before

Environment after

Covered topics

Lab steps

Logging In to the Amazon Web Services Console
Review CUR S3 Bucket Configuration and Setup Files
Apply CUR CloudFormation Template
Analyze CUR Data using Athena SQL Queries