Ends in

AWS Cloud Practitioner Sale - Get a Chance to Win FREE Access to our new DEA Practice Exams

Guided Lab: Amazon Athena Data Querying and Table Creation


Welcome to our guided lab, where we’ll dive into the world of data analytics using Amazon Athena, AWS S3, and the AWS Glue Data Catalog. This hands-on session is designed to introduce you to the power and flexibility of analyzing structured and semi-structured data stored in S3, utilizing the serverless interactive query service provided by Athena. Whether you’re a data analyst, engineer, or just a data enthusiast, this lab will equip you with the knowledge to efficiently query and analyze data at scale.

Overview of Steps

In this lab, you’ll go through a series of steps that will take you from setting up your environment to executing queries that will provide insights into your data. Here’s a brief outline of what we’ll cover:

  1. Environment Setup: You’ll start by creating an S3 bucket and uploading an activity log file, setting the stage for our analysis.

  2. AWS Glue Data Catalog Configuration: Next, we’ll create a database using the AWS Glue Data Catalog. This serves as a central metadata repository that Athena will leverage to understand the structure of your data.

  3. Table Creation in Athena: With the metadata repository in place, you’ll learn how to define and create a table in Athena that maps to the structure of your activity log data stored in S3. This is a critical step that enables Athena to execute SQL queries against your data.

  4. Data Querying: Armed with a structured view of your data, you’ll run several SQL queries in Athena. These queries will range from basic data retrieval to more complex aggregation queries, designed to familiarize you with Athena’s querying capabilities and help you derive meaningful insights from your dataset.



This lab assumes you have experience creating Amazon S3 Bucket and are familiar with its basic components.

If you find any gaps in your knowledge, consider taking the following labs:

  • Creating an Amazon S3 bucket.
  • Querying Data with Amazon Athena and AWS Glue Crawler Integration.


In this lab, you will:

  • Learn how to query data directly from S3 using Amazon Athena.

  • Learn how to create an external table using Amazon Athena query.

  • Use AWS Glue to create a data catalog (database) for organizing data from Amazon S3.