How do I troubleshoot Systems Manager Run Command timeout issues?
3 minute read
I used AWS System Manager Run Command to run an SSM document on my managed Amazon Elastic Compute Cloud (Amazon EC2) instance. However, the process failed with a timeout error.
Run Command timeout status details include the following:
Execution timeout: The time, in seconds, for a command to complete before it is considered to have failed. The default is 3600 (1 hour). The maximum value is 172800 (48 hours).
Delivery timeout: The command wasn't delivered to the managed node before the total timeout expired.
Total timeout: The value of the delivery timeout plus the execution timeout. If the execution timeout isn't required by the SSM document, then total timeout is equal to the delivery timeout plus the default execution timeout.
Choose the hyperlinked Command ID to open the Command status page.
From the Targets and outputs section, choose the hyperlinked Instance ID, and then review the output.
When the output is truncated, connect to the EC2 instance using SSH, and then navigate to the following directories to see the full error details. Note the exit status codes, and then see Troubleshooting Systems Manager Run Command for additional troubleshooting steps.
If the SSM Agent logs don't provide the information that you need to resolve the error, then allow debug logging to reproduce the issue.
Troubleshoot timeout issues
Make sure that your Run Command SSM document total time to complete is less than the timeoutSeconds property. and verify that the total time required to complete them is less than the timeoutSeconds parameter. The default timeoutSeconds property value is 3600s seconds (1 hour). For more information on specifying the timeoutSeconds property value, see Handling timeouts in runbooks.