hands-on lab

Querying Amazon VPC Flow Logs with Amazon Athena

Up to 1h
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.
Lab description

Flow logs are a powerful feature of Amazon Virtual Private Cloud (VPC) that allow you to record the network traffic in a VPC and inspect it later. Amazon Athena is a serverless interactive query service that allows you to interrogate data stored in a number of different data stores.

By learning how to capture and query Amazon VPC flow logs, you will be able to debug and analyse your VPC networks with ease.

In this lab, you will configure an Amazon S3 bucket to store flow logs, you will enable flow logs for an Amazon VPC, and you will query the flow logs using Amazon Athena.

Learning Objectives

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

  • Configure an Amazon S3 bucket policy
  • Enable Amazon VPC flow logs VPC wide
  • Run queries on flow log data stored in Amazon S3 using Amazon Athena

Intended Audience

  • Candidates for the AWS Solutions Architect Associate certification
  • Cloud Architects
  • Data Engineers
  • DevOps Engineers


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

  • Amazon Simple Storage Service (S3)
  • Amazon Virtual Private Cloud (VPC)
  • Amazon Athena

The following courses can be used to fulfill the prerequisites:


September 8th, 2023 - Updated the instructions and screenshots to reflect the latest UI

Environment before
Environment after
About the author
Learning paths

Andrew is a Labs Developer with previous experience in the Internet Service Provider, Audio Streaming, and CryptoCurrency industries. He has also been a DevOps Engineer and enjoys working with CI/CD and Kubernetes.

He holds multiple AWS certifications including Solutions Architect Associate and Professional.

Covered topics
Lab steps
Logging In to the Amazon Web Services Console
Storing Amazon VPC Flow Logs in Amazon S3
Querying Amazon VPC Flow Logs with Amazon Athena