You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/aws/capabilities/config/configuration.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -397,6 +397,7 @@ To learn more about these configuration options, see [Persistence](/aws/capabili
397
397
|`SNAPSHOT_SAVE_STRATEGY`|`ON_SHUTDOWN`\|`ON_REQUEST`\|`SCHEDULED`\|`MANUAL`| Strategy that governs when LocalStack should make state snapshots |
398
398
|`SNAPSHOT_LOAD_STRATEGY`|`ON_STARTUP`\|`ON_REQUEST`\|`MANUAL`| Strategy that governs when LocalStack restores state snapshots |
399
399
|`SNAPSHOT_FLUSH_INTERVAL`| 15 (default) | The interval (in seconds) between persistence snapshots. It only applies to a `SCHEDULED` save strategy (see [Persistence Mechanism](/aws/capabilities/state-management/persistence))|
400
+
|`DISABLE_COMPATIBILITY_RULES`|`0` (default) \|`1`| Disable the [state compatibility rules](/aws/capabilities/state-management/persistence#state-compatibility) that prevent loading incompatible state into LocalStack. Applies to both snapshot persistence and Cloud Pods. |
Copy file name to clipboardExpand all lines: src/content/docs/aws/capabilities/state-management/cloud-pods.mdx
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -669,6 +669,10 @@ Loading a Cloud Pod with mismatching version might lead to a corrupted state of
669
669
Do you want to continue? [y/N]:
670
670
```
671
671
672
+
In addition to this prompt, Cloud Pods are subject to the [state compatibility rules](/aws/capabilities/state-management/persistence#state-compatibility) shared with snapshot-based persistence.
673
+
Pods that were saved before `v2026.03` cannot be loaded into LocalStack `v2026.03` or later, because persistence was rewritten for several services in that release.
674
+
Set `DISABLE_COMPATIBILITY_RULES=1` to bypass the checks at your own risk.
675
+
672
676
We are working to extend Cloud Pods support to all AWS services emulated in LocalStack.
673
677
However, state management might not yet work reliably for every service.
Copy file name to clipboardExpand all lines: src/content/docs/aws/capabilities/state-management/persistence.mdx
+58-2Lines changed: 58 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,8 +52,7 @@ docker run \
52
52
53
53
:::note
54
54
Snapshots may not be compatible across different versions of LocalStack.
55
-
It is possible that snapshots from older versions can be restored, but there are no guarantees to whether LocalStack will start into a consistent state.
56
-
We are actively working on a solution for this problem.
55
+
LocalStack applies [state compatibility rules](#state-compatibility) that block loading state files known to be incompatible with the running LocalStack version.
57
56
:::
58
57
59
58
### Save strategies
@@ -116,6 +115,63 @@ curl -X POST localhost:4566/_localstack/state/save
116
115
{"service": "s3", "status": "ok"}
117
116
```
118
117
118
+
## State compatibility
119
+
120
+
The internal state format of LocalStack changes over time as services evolve.
121
+
To prevent silently loading state into an incompatible runtime, LocalStack ships a set of compatibility rules that compare the LocalStack version recorded in the saved state with the version of the running container.
122
+
The same rules apply to both [snapshot-based persistence](#configuration) and [Cloud Pods](/aws/capabilities/state-management/cloud-pods).
123
+
124
+
If a rule rejects the state, LocalStack does not load it and logs the reason.
125
+
The rules currently enforced are:
126
+
127
+
| Rule | Behavior |
128
+
| - | - |
129
+
| Forward compatibility | Reject loading a state into a LocalStack version older than the one that produced it. |
130
+
| First CalVer release (`v2026.03`) | Reject loading state saved before `v2026.03` into LocalStack `v2026.03` or later. Persistence was rewritten for several services in the first calendar-versioned release. |
131
+
132
+
Loading a state saved with `v2026.03` or later into a newer LocalStack version of the same series remains supported.
133
+
For example, a state saved with `v2026.03` can be loaded into `v2026.03.1` or `v2026.04`.
134
+
135
+
### Disable compatibility checks
136
+
137
+
If you understand the risks and want LocalStack to load state regardless of these rules, start the container with `DISABLE_COMPATIBILITY_RULES=1`.
138
+
This bypasses every compatibility rule and lets LocalStack attempt to load the state as-is.
0 commit comments