Interview Prep/Python for DevOps/boto3, HTTP & API errors

`ApiException: (410) Reason: Gone ... "too old resource version: 123456 (789012)"` in a watch loop.

AdvancedTroubleshootingboto3, HTTP & API errors
Answer

Likely causes → The watch resumed from a resourceVersion older than the API server's retained history (etcd compaction).

Diagnose → The 410 appears after reconnects or long idle periods.

Fix → On 410, re-list to get a fresh resource_version, reconcile the full state, then start a new watch from that version. Use allow_watch_bookmarks=True to keep the version fresh.

Prevent → Use frameworks (kopf) or informer-style code that handles relist; design reconciliation to be level-triggered.

All Python for DevOps questions Roadmap: Python for automation

More on boto3, HTTP & API errors