
From a CSV to a dashboard with no database: serverless analytics on AWS
How I used Amazon S3, AWS Glue, Athena, and QuickSight to analyze sales data with plain SQL, what broke along the way, and what the whole pipeline actually cost to run.
How I Queried 12.000+ Sales Records Without Touching a Database
Hi, I'm Santiago Martinez, a four-year Computer Science student. I got interested in cloud analytics after a data structures course project where I was handed a CSV export and, out of habit, immediately started sketching a Postgres schema for it before realizing I only needed to run six queries against it, ever. That mismatch stuck with me, and it's what led me to this project: build the smallest real AWS pipeline that lets me query a CSV with SQL without provisioning a database at all.
This article walks through the first AWS project I built end to end: a fully serverless analytics pipeline using Amazon S3, AWS Glue, Amazon Athena, and Amazon QuickSight.
The problem
For this project I used a synthetic retail dataset I generated myself
techmart_sales_q1_q2.csv modeled after a small electronics retailer with three months of order history: 12,543 rows with order_date , region , category , product , quantity , and revenue . I wanted to answer a specific question: which region-category combinations were driving most of the revenue, and was that concentration getting worse or better month over month?The "traditional" instinct is to load a CSV into a database just to query it. For exploratory, read-mostly analysis, that's a lot of operational overhead for six or seven queries. AWS has a pattern built specifically for this: query the data directly where it lives in S3, using SQL, and pay only for what you scan.
Architecture overview
The pipeline has four services, each with exactly one job:
Service | Role in the pipeline |
|---|---|
Amazon S3 | Stores the raw CSV — the single source of truth. |
AWS Glue Crawler | Scans the S3 data, infers the schema, registers it in the Glue Data Catalog. |
Amazon Athena | Runs SQL directly against the S3 data using that schema. |
Amazon QuickSight | Connects to Athena and turns query results into a dashboard. |
AWS services used, and why I chose them
- Amazon S3 durable object storage that both Glue and Athena read natively. I organized the bucket as
techmart-analytics-raw/sales/2026/, one prefix per year, so future crawler runs could be scoped narrowly.
- AWS Glue Crawler instead of hand-writing a
CREATE TABLEDDL with six columns and types, the crawler infers the schema from the file directly. For a first project this removed the most common source of typos.
- Amazon Athena schema-on-read SQL with nothing to provision. I chose it specifically to test the "pay only for what you scan" model against a real bill, not just the marketing claim.
- Amazon QuickSight connects directly to Athena as a data source, so the dashboard reflects the current S3 data with no separate refresh step.
Implementation walkthrough
1. Uploaded the dataset to S3
I created bucket
techmart-analytics-raw and uploaded techmart_sales_q1_q2.csv (3.1 MB) to sales/2026/ . The bucket has no public access — Glue and Athena reach it through IAM roles scoped to that prefix only.2. Let Glue discover the schema
I created a crawler (
techmart-sales-crawler ) pointing at s3://techmart-analytics-raw/sales/2026/ , gave it a role with s3:GetObject / s3:ListBucket scoped to that path, and pointed its output at a new database, techmart_db . The run took 46 seconds and produced a table sales with 6 columns, all inferred correctly except one (see below).3. Queried the data with Athena
SELECT region, category, SUM(revenue) AS total_revenue, SUM(quantity) AS total_unitsFROM salesGROUP BY region, categoryORDER BY total_revenue DESCLIMIT 10;
SELECT date_trunc('month', date_parse(order_date, '%Y-%m-%d')) AS month, region, SUM(revenue) AS monthly_revenueFROM salesGROUP BY 1, 2ORDER BY 1, 2;
4. Built the dashboard in QuickSight
I connected QuickSight to
techmart_db.sales via the Athena connector and built three visuals: a bar chart of revenue by region and category, a line chart of monthly revenue per region, and a pivot table for drill-down by product.What broke, and how I fixed it
- Athena refused my first query with a vague permissions-looking error. The actual cause was that I hadn't set a query-results S3 location yet — Athena needs an explicit output path before it will run anything. Setting it to
s3://techmart-analytics-raw/athena-results/fixed it immediately, but the error message gave no hint that this was the problem.
- The crawler inferred
order_dateas astring, not adate. My CSV stored dates as2026-01-15, which looks like a date to a human but Glue's sampling didn't confidently classify it. This meant every query neededdate_parse(order_date, '%Y-%m-%d')instead of native date functions a small but easy-to-miss gotcha that cost me about 20 minutes of confused debugging on a query that just silently returned zero rows.
- A trailing comma in the CSV header created a phantom seventh column named
""in the inferred schema. It didn't break queries, but it did show up as a confusing extra field in the QuickSight dataset editor until I cleaned the source file and re-ran the crawler.
Cost and performance
- Dataset size: 3.1 MB, 12,543 rows
- Glue crawler run: 46 seconds, effectively $0.00 (well under the per-second minimum billing threshold for a run this small)
- Athena: 9 queries run while building this article, 34 MB total data scanned, roughly $0.0002 total at $5/TB scanned
- QuickSight: Author account under the Standard edition free tier for the first 30 days; ongoing cost would be about $9/month for one author seat if continued past the trial
End to end, building and querying this pipeline cost less than one cent in compute, plus whatever QuickSight ends up costing after the trial period.
Results and metrics
The North region's Electronics category accounted for about 31% of total revenue across the dataset noticeably higher than any other region-category pair and that concentration grew slightly from Q1 to Q2 rather than leveling out, which suggested (to me, informally) that this combination was worth watching rather than a one-time spike.
Lessons learned
- You don't need a database to analyze data. For nine queries over three months of data, S3 + Athena was clearly simpler than provisioning and securing an RDS instance would have been.
- Schema-on-read has real trade-offs. The date-column issue above is a direct consequence of not enforcing a schema up front it's fast to get started, but you have to actually check what the crawler inferred instead of assuming it matched your CSV.
- A one-line CSV problem (the trailing comma) becomes a "phantom column" three layers downstream, in a tool (QuickSight) that has nothing to do with where the problem originated. Debugging cloud pipelines often means tracing an issue backward through services, not just fixing it where it surfaces.
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article