π― Overview
In this project, I built a complete analytics pipeline using AWS services.
The goal was simple:
Read CSV files from S3 β Convert to tables using Glue β Query using Athena β Visualize in Grafana
This is a real-world data analytics workflow used widely in Cloud + DevOps environments.
π Architecture Diagram
ποΈ Services Used
| Service | Purpose |
| --------------------- | ------------------------------------- |
| S3 | Stores raw CSV files |
| Glue Crawler | Detects schema & creates Athena table |
| Glue Data Catalog | Manages table metadata |
| Athena | SQL queries on S3 files |
| Grafana | Visualizes Athena queries |
π§© Step 1 β Upload CSV Data to S3
I created a folder structure:
s3/
βββ s3-athena-analytics-abhishek31/raw/
βββ bd-dec22-births-deaths-natural-increase.csv
βββ bd-dec22-deaths-by-sex-and-age.csv
βββ electronic-card-transactions.csv
Upload using AWS CLI:
aws s3 cp your_file_name.csv s3-athena-analytics-abhishek31/raw/
π€ Step 2 β Create AWS Glue Crawler
The crawler:
- Points to S3 folder
- Detects CSV schema
- Creates a table inside AWS Data Catalog
- Database name: s3_log_db
- Table name: s3_athena_analytics_abhishek31 After running, I validated the schema.
π Step 3 β Query Data in Athena
Athena reads the S3 data using SQL.
Example query:
SELECT
series_reference,
period,
series_title_2,
value
FROM s3_log_db.s3_athena_analytics_abhishek31
ORDER BY series_title_2 ASC;
This verified the data is properly structured.
π Step 4 β Connect Grafana to Athena
In Grafana:
- Add datasource β AWS Athena
- Configure:
- AWS Region
- S3 query results bucket
Workgroup
Test connection β Success
π Step 5 β Build Dashboards in Grafana
I created multiple visualizations using raw queries (not JSON imports):
Bar chart for age-group distribution
Time series analysis
Gender-wise population trends
Total population per year
ποΈ Project Folder Structure
AWS-Athena-S3-Grafana-Analytics/
βββ docs/
β βββ README.md
βββ s3/
β βββ README.md
βββ sql/
β βββ athena_queries.sql
βββ grafana/
β βββ README.md
βββ README.md
π Key Learnings
β How to automate schema detection with Glue
β How Athena queries S3 without a database server
β How to integrate AWS & Grafana
β How to visualize analytics with Live SQL
Great project for Cloud + DevOps profile! π―
π GitHub Repository:
https://github.com/abhikorde31/aws-s3-athena-grafana-analytics
π Conclusion
This project shows how to build a production-grade analytics pipeline using AWS serverless services + Grafana.
If you want a visualization dashboard, real-time updates with Lambda, or Terraform automation β I can help you extend it.




Top comments (0)