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
[LocalStack Cloud Pods](/aws/capabilities/state-management/cloud-pods) enable you to create persistent state snapshots of your LocalStack instance, which can then be versioned, shared, and restored.
16
19
It allows next-generation state management and team collaboration for your local cloud development environment, which you can utilize to create persistent shareable cloud sandboxes.
17
20
Cloud Pods works directly with the [LocalStack CLI](/aws/integrations/aws-native-tools/aws-cli#localstack-aws-cli-awslocal) to save, merge, and restore snapshots of your LocalStack state.
@@ -38,7 +41,7 @@ For this tutorial, you will need the following:
@@ -331,6 +341,48 @@ The available merge strategies are:
331
341
332
342

333
343
344
+
## Testing the Application
345
+
346
+
After deploying and invoking the Lambdas, first verify the end-to-end ML workflow via the data loading, training, and inference. After successfully running the application and saving a Cloud Pod, re-running the application after Pod restore should yield identical results.
To compute accuracy locally (optional extension): Add to `infer.py` after predictions:
367
+
368
+
```python
369
+
from sklearn.metrics import accuracy_score
370
+
# Assuming y_test saved similarly
371
+
y_test = np.load('y-test.npy') # You'd need to save this during training
372
+
accuracy = accuracy_score(y_test, predicted)
373
+
print(f"Model accuracy: {accuracy:.4f}")
374
+
```
375
+
376
+
Expected Model accuracy: 0.9689
377
+
378
+
### Validation After Pod Restore
379
+
380
+
- Save Pod: `localstack pod save reproducible-ml`
381
+
- (In a new instance) Load: `localstack pod load reproducible-ml`
382
+
- Re-invoke `ml-predict`: Outputs should match exactly, proving state persistence (S3 objects, Lambdas intact).
383
+
384
+
If a mismatch occurs, check the Pod's merge strategy `(default: overwrite)` or logs for S3/Lambda errors.
385
+
334
386
## Conclusion
335
387
336
388
In conclusion, LocalStack Cloud Pods facilitate collaboration and debugging among team members by allowing the sharing of local cloud infrastructure and instance state.
0 commit comments