| name | localstack-state |
| description | Manage LocalStack state and snapshots. Use when users want to save, load, export, or import LocalStack state, work with Cloud Pods, create local snapshots, or enable persistence across restarts. |
State Management
Save, load, and manage LocalStack state for reproducible development environments and state snapshots.
Capabilities
- Export and import state locally to files
- Save and load state to/from Cloud Pods (remote storage)
- Share state across teams via Cloud Pods
- Enable persistent state across container restarts
Local Snapshots (state export/import)
Local snapshots allow you to export LocalStack state to files and import them back. This works without requiring a Pro subscription.
Export State
localstack state export my-state.zip
localstack state export /path/to/backup/state.zip
Import State
localstack state import my-state.zip
localstack state import /path/to/backup/state.zip
Use Cases for Local Snapshots
- Backup/restore: Save state before destructive operations
- CI/CD pipelines: Commit state files to version control for reproducible tests
- Offline workflows: Work with state files without cloud connectivity
- Quick snapshots: Fast local save/restore during development
Cloud Pods (pod save/load)
Cloud Pods store state in LocalStack's cloud platform, enabling team collaboration and remote state management.
Prerequisites
Cloud Pods require a LocalStack Pro subscription and auth token:
export LOCALSTACK_AUTH_TOKEN=<your-token>
Save to Cloud Pod
localstack pod save my-pod-name
localstack pod save my-pod-name --message "Initial setup with S3 and DynamoDB"
Load from Cloud Pod
localstack pod load my-pod-name
localstack pod load my-pod-name --merge
List Cloud Pods
localstack pod list
Delete Cloud Pods
localstack pod delete my-pod-name
Inspect Cloud Pods
localstack pod inspect my-pod-name
Use Cases for Cloud Pods
- Team collaboration: Share consistent development environments across team members
- Demo environments: Prepare and share demo-ready states
- Cross-machine development: Access the same state from different machines
Local Persistence
For automatic persistence across LocalStack restarts (without explicit export/import):
PERSISTENCE=1 localstack start -d
Comparison
| Feature | Local Snapshots (export/import) | Cloud Pods (save/load) |
|---|
| Storage | Local files | LocalStack cloud |
| Pro required | No | Yes |
| Team sharing | Manual file sharing | Built-in |
| Version control | Can commit files | Cloud-managed |
| Offline use | Yes | No |
Best Practices
- Use
state export/import for local development and CI/CD pipelines
- Use Cloud Pods for team collaboration and shared environments
- Use descriptive names that indicate the state contents
- Enable
PERSISTENCE=1 for simple state retention across restarts