---
title: "Using demo data for testing Stripe integrations in AWS-hosted applications"
description: "Stripe sandboxes let developers manage multiple test environments from one Stripe account for AWS-hosted applications, extending Stripe’s test mode with simulated external events, fake balances, and Test Payouts using API v2 keys. The post describes seeding a sandbox with products and other Stripe objects by exporting production data to CSV for import or generating records with the Stripe CLI and scripts. For local use, developers authenticate with stripe login, while CI scripts pass a sandbox key to each CLI request and can optionally delete the created products afterward. It recommends storing the key in AWS Secrets Manager, retrieving it at runtime through the AWS CLI or SDK, restricting access with IAM, avoiding logs and source repositories, and rotating keys; this lets CI scripts use sandbox data without exposing credentials."
---

# Using demo data for testing Stripe integrations in AWS-hosted applications

[Stripe](https://yomu.fyi/company/stripe) · James Beswick · Nov 22, 2024

**Type:** Tutorial

## Summary

Stripe sandboxes let developers manage multiple test environments from one Stripe account for AWS-hosted applications, extending Stripe’s test mode with simulated external events, fake balances, and Test Payouts using API v2 keys. The post describes seeding a sandbox with products and other Stripe objects by exporting production data to CSV for import or generating records with the Stripe CLI and scripts. For local use, developers authenticate with stripe login, while CI scripts pass a sandbox key to each CLI request and can optionally delete the created products afterward. It recommends storing the key in AWS Secrets Manager, retrieving it at runtime through the AWS CLI or SDK, restricting access with IAM, avoiding logs and source repositories, and rotating keys; this lets CI scripts use sandbox data without exposing credentials.

## Context

Complex Stripe integrations may need more test environments and capabilities than Stripe test mode provides. AWS-hosted applications and CI/CD workflows also need a way to map test environments to developers and securely provide the sandbox API key during automated runs.

## Approach / What changed

Use Stripe sandboxes as isolated test environments, seed them with products or other Stripe objects from exported CSV data or scripts, and invoke the Stripe CLI with a sandbox API key in local or CI workflows. Store the key in AWS Secrets Manager, retrieve it dynamically through the AWS CLI or SDK, control access with IAM, and rotate it periodically.

## Takeaways

- Stripe sandboxes support simulated external events, fake balances instead of real transactions, and Test Payouts using API v2 keys.
- Sandbox data can be created with Stripe CLI scripts, or products can be exported from a production account as CSV and recreated through the SDK.
- AWS Secrets Manager can provide sandbox API keys at runtime, with IAM access controls and rotation, without placing keys in source repositories or application logs.

**Tags:** [AWS](https://yomu.fyi/topic/aws), [CI/CD](https://yomu.fyi/topic/ci-cd), [Testing](https://yomu.fyi/topic/testing)

- Source: [Stripe](https://stripe.dev/blog/using-demo-data-for-testing-stripe-integrations-in-aws)
- Source URL: https://stripe.dev/blog/using-demo-data-for-testing-stripe-integrations-in-aws
- Ingested by Yomu: 2026-08-28T08:57:06.966Z

[Read original post](https://stripe.dev/blog/using-demo-data-for-testing-stripe-integrations-in-aws)
