StripeHidetaka OkamotoTutorial
Importing sales data from Stripe into AWS
Summary
The article presents a low-code method for analyzing Stripe business and customer data and moving scheduled report results into AWS. Stripe Sigma lets users query payment, subscription, and plan-related data with SQL, while Sigma Assistant can generate and execute queries from natural-language prompts such as cancellation analysis. For delivery, the article uses the sigma.scheduled_query_run.created event and Stripe's Event Destination to Amazon EventBridge, where a partner event bus and event rule trigger AWS services without a separate public webhook API. Its Lambda example downloads the report CSV with the Stripe API key, parses it into JavaScript objects, and publishes the result through Amazon SNS; the same event-driven pattern can support Lambda, Step Functions, or Glue workflows.
Context
The article addresses the need for more detailed Stripe payment, subscription, sales, and customer analysis than dashboard reports provide, along with the security complexity of exposing a public webhook endpoint for SaaS event delivery. It also describes the need to combine Stripe data with other business data in AWS for analysis and planning.
Approach / What changed
Use Stripe Sigma and Sigma Assistant to query data with SQL or natural-language prompts, schedule analyses, and emit sigma.scheduled_query_run.created events. Configure Stripe Event Destinations to send those events to an Amazon EventBridge partner event bus, associate the event source, and create a matching rule. An AWS Lambda function then downloads the report CSV, parses it into JavaScript objects, and publishes the processed data to Amazon SNS.
Takeaways
Sigma Assistant can generate and execute SQL from prompts such as identifying subscription-cancellation reasons by product over the past year.
Stripe Event Destinations and Amazon EventBridge send Sigma report events into an AWS account, avoiding the need to expose and secure a separate public webhook API.
The example Lambda workflow retrieves the report CSV, parses it into JSON-like JavaScript objects, and publishes the result to an Amazon SNS topic.
Source and freshness
- Source
- stripe.dev
- Published
- Added to Yomu
- Last updated
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.