Skip to main content

2 posts tagged with "AWS"

AWS services and serverless architecture

View All Tags

AWS Cost and Usage Report to Snowflake for Margin Analysis

· 22 min read
Puneet Gupta
Founder, Supaflow

Moving the AWS Cost and Usage Report to Snowflake answers a question that Cost Explorer cannot answer alone: does the revenue from each customer justify the cloud cost required to serve them?

The practical architecture is straightforward. Export AWS Cost and Usage Report 2.0 (CUR 2.0) to Amazon S3 as Parquet, load the files into Snowflake, sync revenue data from Stripe, and add customer and segment context from Salesforce. A shared customer identity model then turns three disconnected systems into customer-level cost, revenue, and margin analysis.

AWS Data Exports -> S3 Parquet ---\
\
Stripe ------------------------------> Supaflow -> Snowflake -> dbt -> Margin dashboard
/
Salesforce ------------------------/

This guide explains the pipeline, the allocation decisions that matter, and the Snowflake model needed to calculate gross margin without hiding shared or unattributed costs.

In other words, moving AWS billing data to Snowflake is the data-engineering foundation for cloud unit economics and customer profitability analysis.

Export Salesforce to S3 with Lambda and Step Functions: A Complete Open-Source Solution

· 7 min read
Puneet Gupta
Founder, Supaflow

Export Salesforce to S3 in 10 Minutes​

Export Salesforce to S3 and query it in Athena — no ETL tools, no long‑running servers.

This open‑source, serverless pipeline uses AWS Lambda, Step Functions, and the Salesforce Bulk API 2.0 to export every Salesforce object to S3. After each run, it automatically updates the AWS Glue Data Catalog, so your data is immediately queryable in Athena.

After a single deployment, you can query your Salesforce data directly in Athena:

SELECT * FROM salesforce_export.account_raw LIMIT 10;