Ravindra BagaleCourses & study guides मराठी Track your progress

Ravi Sir's Cards › AWS

Handle GoneException

What is a VPC: your own private network inside one AWS Region, example ThreeTierVpc 10.0.0.0/16.

Handle GoneException Clients leave without a clean $disconnect (closed laptop). Stale connectionIds break broadcasts. PostToConnection on a dead id raises GoneException (410). Delete that connectionId and continue. try/except around post_to_connection; on GoneException delete the DynamoDB row for that connectionId. Broadcast to 5 ids where 1 is stale → 4 get the chat line; stale row is removed aut
Handle GoneException · Download PNG
Read card text

What this card says

Why do we need it?

Clients leave without a clean $disconnect (closed laptop). Stale connectionIds break broadcasts.

What is it?

PostToConnection on a dead id raises GoneException (410). Delete that connectionId and continue.

How to do it

try/except around post_to_connection; on GoneException delete the DynamoDB row for that connectionId.

GoneException

Example

Broadcast to 5 ids where 1 is stale → 4 get the chat line; stale row is removed automatically.

See all AWS revision cards