Query encrypted Amazon S3 data with Amazon Athena

Beginner

26 students completed the lab in ~33m

Total available time: 55m

20+ students rated this lab!

Use Amazon Athena to query encrypted data on S3

Lab Overview

In this Lab you will use Amazon Athena to query server-side encrypted data stored on Amazon Simple Storage Service (S3). Amazon Athena is an interactive query service that allows you to issue standard Structured Query Language (SQL) commands to analyze data on S3. You will also learn how to encrypt the query results. This will provide an end-to-end data security model:

  • The data is stored encrypted (data at rest)
  • All communications within AWS are encrypted (data in transit)
  • The query results are encrypted (data at rest)

In addition to security, you will also learn several other features/benefits of using Athena and S3, such as speed, and the ability to query compressed data (which provides cost savings as well).

Lab Objectives

Upon completion of this lab you will be able to:

  • Encrypt data on S3
  • Define a schema in order to create a database and table in Amazon Athena
  • Perform basic queries in Athena
  • Encrypt the query results

Lab Prerequisites

You should be familiar with:

  • Amazon Simple Storage Service (S3) bucket creation and file uploads
  • Basic Standard Query Language (SQL) knowledge is not necessary, but is helpful

Lab Environment

After completing the lab instructions the environment should look similar to:

Follow these steps to learn by building helpful cloud resources

Logging in to the Amazon Web Services Console

Your first step to start the Lab experience

Create an S3 bucket

Create a new S3 bucket

Configuring Athena Query Results for encrypted storage on S3

Configure account settings to encrypt and store the results of Athena queries on S3

Preparing the Data and Storing it on S3

Get S3 data ready for Athena queries

Defining the Schema and Creating the Database Table in Athena

Define the schema and configure the table for the data source

Confirming Athena Query Results

Check that Athena query results are encrypted and saved to S3