Athena
Amazon Athena runs SQL queries directly against files in S3, using the Glue Data Catalog for table definitions. In the Data and ETL Blueprint it is the way a person looks at what the pipeline produced. No unit creates Athena resources; the service is there to use once the catalog is populated.
What it does
Athena is serverless: you pick a database from the Data Catalog, write a query, and pay for the data scanned. It reads columnar formats such as Parquet efficiently, honors partition columns to skip files, and writes query results to an S3 location you choose. When Lake Formation governs the catalog, Athena enforces the same grants as every other consumer.
How BuiltForProd uses it
The blueprint prepares everything Athena needs and leaves the query to you:
- The Glue job writes Parquet under
output/in the processed bucket, partitioned byyear,monthandday. The crawler scans that same prefix and writes the tables it finds intoacme-usw2-dev-processed-db, so the tables you query describe exactly what the job wrote. - The Glue job role already holds the Lake Formation query actions (
StartQueryPlanning,GetQueryState,GetQueryStatistics,GetWorkUnits) that Athena's Lake Formation integration uses. - Access for people follows the Lake Formation grants: the
sso_data_engineer_role_arnsinput gives a data-engineer permission setSELECTon the processed and curated databases, and column-level grants can hide sensitive columns from a principal. Athena applies these; a bucket policy denies any attempt to read the files directly. - Athena needs a query result location. The blueprint does not create one; the deployment guide has the reader create a results bucket in the stage account before the first query.
Beyond the data lake, the compliance guide lists Athena as one of the ways to query CloudTrail logs archived in the audit account's bucket when an auditor asks for evidence.
Terms you will see
| Term | Meaning |
|---|---|
| Workgroup | An Athena setting group, including the query result location. |
| Partition | A column such as year whose value is encoded in the file path, so queries skip other paths. |
| Parquet | The columnar file format the Glue job writes. |
| Query result location | The S3 path where Athena stores each query's output. |
| Data scanned | What Athena bills on; partitions and columnar files reduce it. |
Where to read more
- Data and ETL Blueprint overview
- Glue for the catalog and crawler
- Lake Formation for the grants Athena enforces
- S3 for the buckets