Use Amazon Glue to connect Athena to your data in Amazon S3 - Amazon Athena
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Use Amazon Glue to connect Athena to your data in Amazon S3

Athena uses the Amazon Glue Data Catalog to store metadata such as table and column names for your data stored in Amazon S3. This metadata information becomes the databases, tables, and views that you see in the Athena query editor.

When using Athena with the Amazon Glue Data Catalog, you can use Amazon Glue to create databases and tables (schema) to be queried in Athena, or you can use Athena to create schema and then use them in Amazon Glue and related services.

To define schema information for Amazon Glue, you can use a form in the Athena console, use the query editor in Athena, or create an Amazon Glue crawler in the Amazon Glue console. Amazon Glue crawlers automatically infer database and table schema from your data in Amazon S3. Using a form offers more customization. Writing your own CREATE TABLE statements requires more effort, but offers the most control. For more information, see CREATE TABLE.

Additional Resources