ladderlore
Request a guide
  • Type a service name, like S3 or IAM.

Service · Analytics · Builds on CLF-C02

Amazon Athena

Serverless SQL on S3. You pay for data scanned, so use partitions, Parquet and compression.

You know from Cloud Practitioner

  • Athena runs standard SQL directly on files in S3, with nothing to load.
  • You pay per query, for the data it scans.
  • Table definitions come from the Glue Data Catalog.
Read the Cloud Practitioner lesson
  • Parquet or ORC

    Reads only the columns needed
  • Compression

    Fewer bytes to scan
  • Partitions

    Filters skip whole folders
  • Larger files

    Less overhead per file
  • Workgroup limits

    Caps cost per query or team
Ways to scan less data and pay less.
Analyst
Athena
S3GlueLambdaSQLscanschemasconnector
Athena reads S3 data with schemas from Glue. A connector reaches other sources.

What it is

Cost and speed follow the data scanned. Three habits cut both. First, use a columnar format such as Parquet or ORC, so a query reads only the columns it needs. Second, compress the files. Third, partition the data, for example by date, so a query with a filter on the partition skips whole folders. Avoid thousands of tiny files: fewer, larger files read faster.

What it is

Workgroups separate teams and workloads. Each workgroup has its own query results location in S3, can enforce encryption, and can cap the data a query may scan or the total per day. Federated queries use Lambda-based connectors to run SQL on other sources, such as RDS or DynamoDB, and join them with data in S3. Use Athena for ad hoc and occasional queries. For heavy, repeated BI queries with many users, Redshift fits better.

Remember

  • Pay per TB scanned. Parquet or ORC, compression and partitions cut the scan.
  • Fewer, larger files beat many small ones.
  • Workgroups: separate results location, settings and data scanned limits per team.
  • Federated queries reach other sources through Lambda connectors.
  • Query results are written to an S3 location you choose.

On the exam

  • “Reduce Athena cost” points to Parquet, compression and partitioning.
  • “Occasional SQL on logs in S3 with no infrastructure” points to Athena.
  • “Limit the cost of a team’s queries” points to workgroup data scanned limits.
  • “Join S3 data with a database in one query” points to Athena federated query.