---
title: "Managing multiple Stripe test environments from your AWS-hosted application"
description: "Stripe sandboxes provide isolated test accounts that let teams manage multiple environments from one account. Unlike legacy test mode, each sandbox has separate data, its own API keys, and configurable user access, while up to five sandboxes can exist per account. They support simulated external events, fake balances, Test Payouts with API v2 keys, and CLI or SDK access by changing keys. For AWS-hosted applications, the recommended pattern stores sandbox and production keys in AWS Secrets Manager, using secret names as environment-neutral aliases rather than embedding environment logic in code. Teams can combine Stripe sandbox permissions with AWS IAM resource policies and directory groups to restrict which users or accounts can retrieve keys and prevent accidental production access."
---

# Managing multiple Stripe test environments from your AWS-hosted application

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

**Type:** Explainer

## Summary

Stripe sandboxes provide isolated test accounts that let teams manage multiple environments from one account. Unlike legacy test mode, each sandbox has separate data, its own API keys, and configurable user access, while up to five sandboxes can exist per account. They support simulated external events, fake balances, Test Payouts with API v2 keys, and CLI or SDK access by changing keys. For AWS-hosted applications, the recommended pattern stores sandbox and production keys in AWS Secrets Manager, using secret names as environment-neutral aliases rather than embedding environment logic in code. Teams can combine Stripe sandbox permissions with AWS IAM resource policies and directory groups to restrict which users or accounts can retrieve keys and prevent accidental production access.

## Context

The post addresses the need to manage multiple Stripe test environments and developers across AWS accounts. It contrasts legacy test mode with sandboxes, whose isolated data and configurable access are intended to provide richer testing and clearer environment separation.

## Approach / What changed

Create sandboxes in the Stripe Dashboard, obtain their API keys, and store sandbox and production credentials in AWS Secrets Manager. Use secret-name aliases so application code can remain consistent across environments, then apply Stripe access controls and AWS IAM resource policies to restrict key retrieval and separate sandbox access from production access.

## Takeaways

- A Stripe account can have up to five sandboxes, each with isolated data, a unique API key, and access controls separate from production.
- AWS Secrets Manager can store sandbox and production keys under environment-specific secret names, allowing the same application code to retrieve the appropriate credential without embedded environment logic.
- AWS IAM resource policies can grant selected users, roles, or other AWS accounts access to sandbox secrets while preventing beta environments from accessing production keys.

**Tags:** [AWS](https://yomu.fyi/topic/aws), [Developer Experience](https://yomu.fyi/topic/developer-experience), [Testing](https://yomu.fyi/topic/testing)

- Source: [Stripe](https://stripe.dev/blog/managing-multiple-stripe-test-environments-from-aws)
- Source URL: https://stripe.dev/blog/managing-multiple-stripe-test-environments-from-aws
- Ingested by Yomu: 2026-08-28T08:57:14.813Z

[Read original post](https://stripe.dev/blog/managing-multiple-stripe-test-environments-from-aws)
