How do I troubleshoot a disconnection with a "SERVER_INITIATED_DISCONNECT" message in AWS IoT Core?

2 minute read

AWS IoT Core disconnected with a "SERVER_INITIATED_DISCONNECT" message. I want to understand this disconnect event and its associated message.

Short description

If AWS IoT Core disconnects your clients with a "SERVER_INITIATED_DISCONNECT" error, then the service initiated the disconnection for scheduled maintenance. The required updates that happen during the scheduled maintenance strengthen security, reliability, and operational performance.


Because this is a server-side disconnection and is necessary for maintenance, it's a best practice to prepare for a disconnect event. Learn what to expect and the best practices for your connected devices.

Manage a disconnect event

When a device disconnects from AWS IoT Core, the service publishes a message to the MQTT topic $aws/events/presence/disconnected/clientId. For a server-initiated disconnect, you see the disconnectReason listed as SERVER_INITIATED_DISCONNECT.

For guidance on how to manage a disconnect event, see the Handling client disconnections.

Understand the time frame

AWS IoT Core performs regular maintenance to update its services and doesn't have a published maintenance schedule.

Anticipate costs

When you reconnect to AWS IoT Core, start-up processes initiate, such as AWS IoT rules, AWS Step Functions, and Amazon DynamoDB write requests. After a server-initiated disconnection, AWS IoT Core continues to meter these processes when you reconnect. These processes incur costs, similar to other times that you connect or reconnect to the service. For more information, see AWS IoT Core additional metering details and AWS IoT Core Service Level Agreement.

Continue to troubleshoot disconnections

For more information on how to identify and troubleshoot an AWS IoT Core disconnection, see Troubleshooting device fleet disconnects.

AWS OFFICIALUpdated 9 months ago