Loading…
Importing sales data from Stripe into AWS
Hidetaka Okamoto
- Source
- Stripe
- Published
- Added to Yomu
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.