Translate Natural Language to Athena Queries with Amazon Bedrock

Translate Natural Language to Athena Queries with Amazon Bedrock
Translate Natural Language to Athena Queries with Amazon Bedrock

CLOUD LABS



Translate Natural Language to Athena Queries with Amazon Bedrock

In this Cloud Lab, you’ll learn how to use an Amazon Bedrock Agent to translate natural language into Amazon Athena queries, enabling you to analyze datasets without writing SQL.

8 Tasks

intermediate

2hr

Certificate of Completion

Desktop OnlyDevice is not compatible.
No Setup Required
Amazon Web Services

Learning Objectives

An understanding of how to prepare datasets using Amazon S3, Glue crawlers, and Athena tables
The ability to build and configure an Amazon Bedrock agent with an action group
Practical knowledge of translating natural language into Athena queries using a Bedrock-powered agent

Technologies
Bedrock
Athena
S3 logoS3
Glue
Cloud Lab Overview

Managing data and making it accessible for insights can be challenging, especially when dealing with large, raw datasets. Teams often need to prepare data for querying, build the right schemas, and design workflows that allow technical and non-technical users to extract information efficiently. Manually writing SQL queries adds another layer of complexity, limiting accessibility for users who may not be fluent in SQL. This is where services like Amazon Athena and Amazon Bedrock can work together to simplify the process, enabling seamless querying of structured data using natural language.

In this Cloud Lab, you’ll learn how to integrate an Amazon Bedrock agent with Amazon Athena to query datasets using plain English instructions instead of SQL. You’ll start by preparing your dataset—creating an Amazon S3 bucket, uploading raw data, and configuring an AWS Glue crawler to automatically detect the schema and make the data queryable in Athena. Once the data is ready, you’ll run your first SQL query in Athena to confirm everything is set up correctly.

Next, you’ll focus on enabling natural language querying. You’ll create resources for an action group and build a Bedrock agent capable of interpreting plain English questions and converting them into SQL queries. The agent will also be able to return query results in plain English. Finally, you’ll use the agent to query the dataset directly with natural language, bypassing the need to manually craft SQL statements.

After completing this Cloud Lab, you’ll understand how to prepare and query data in Amazon Athena and how to integrate Amazon Bedrock for natural language querying. You’ll gain hands-on experience setting up the full workflow—from preparing the dataset and schema to enabling a Bedrock-powered agent that transforms natural language requests into actionable insights. This will give you a practical foundation for building intelligent, user-friendly data querying solutions in the cloud.

Below is the high-level architecture diagram of the infrastructure you’ll create in this Cloud Lab:

Querying data in plain English via Athena and Bedrock
Querying data in plain English via Athena and Bedrock
Cloud Lab Tasks
1.Introduction
Getting Started
2.Preparing the Data for Athena
Create S3 Buckets and Upload Data
Configure the AWS Glue Crawler
Run an SQL Query Using Athena
3.Integrating Bedrock for Query Generation
Create Resources for the Action Group
Use Bedrock Agent to Query Using Natural Language
4.Conclusion
Clean Up
Wrap Up
Labs Rules Apply
Stay within resource usage requirements.
Do not engage in cryptocurrency mining.
Do not engage in or encourage activity that is illegal.

Relevant Course

Use the following content to review prerequisites or explore specific concepts in detail.

Hear what others have to say
Join 1.4 million developers working at companies like