Increase max timeout of SSM command
See original GitHub issueIn the following code, the executionTimeout
parameter has a maximum value of 172800 (48 hours); I am working at a company using AWS and boto3 and it would be very useful for us to be able to run SSM commands with higher timeout lengths than 48 hours – we are looking to be able to run SSM commands which take a few days to complete. Is there any way this maximum timeout value could be increased?
boto3.Session(aws_access_key_id=aws_access_key_id,
aws_secret_access_key=aws_secret_access_key).client('ssm'
, region_name='us-east-1'
).send_command(Parameters={'commands': [command],
'executionTimeout': [str(timeout_sec)]}, ...)
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Understanding command statuses - AWS Systems Manager
The default for Timeout (seconds) is 3600 seconds. The default for Execution Timeout is also 3600 seconds. Therefore, the total default timeout for...
Read more >SSM Automation Run Command is not longer than default ...
You must specify the execution timeout value in the Execution Timeout ... Systems Manager enforces the hard-coded default execution timeout.
Read more >SSM Automation Run Command longer than default 3600 ...
Hello,. You need to change "Execution Timeout" parameters when you use Run Command utility to override the default 3600 Second value of the...
Read more >Understanding command statuses - Amazon Systems Manager
Run Command statusUnderstanding command timeout values ... A plugin is a code-execution block that is defined in your command's SSM document.
Read more >AWS : Simple Systems Manager (SSM) - 2020 - BogoToBogo
For Timeout (seconds), type the number of seconds that Run Command should attempt to reach an instance before it is considered unreachable and...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@mureytasroc - Thank you for your post. What type of SSM document are you using ? If it is AWS-RunShellScript of AWS-RunPowerShellScript you can create a custom document and change that value.
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ssm.html#SSM.Client.create_document
Here you can change the
allowedPattern: "([1-9][0-9]{0,4})|(1[0-6][0-9]{4})|(17[0-1][0-9]{3})|(172[0-7][0-9]{2})|(172800)"
toallowedPattern": "([1-9][0-9]{0,4})|(1[0-6][0-9]{4})|(17[0-1][0-9]{3})|(172[0-7][0-9]{2})|(345600)"
something like that.Then with the new document, the validation rule will be 345600 instead of 172800. If that is not enough, just update the document and increase the validation rule. As long as it is less than 30 days it will be good.
How can I do the same from the command line? Is there a way to submit this re-configuration (allowedPattern: "…) from cli together with the run command? Or can I store it on my EC2 instance bash config somehow? Thanks!
@swetashre how can I do the same from the command line? Is there a way to submit this re-configuration (allowedPattern: "…) from cli together with the run command? Or can I store it on my EC2 instance bash config somehow? Thanks!