SSM Automation Run Command longer than default 3600 seconds

0

Currently, it appears there is no way to overwrite the timeout for a run command in an SSM automation:

{
"name": "LongRunningCommand",
"action": "aws:runCommand",
"inputs": {
"DocumentName": "AWS-RunPowerShellScript",
"InstanceIds": ["i-1234567890abcdef0"],
"Parameters": {
"commands": "Sleep(3601) ",
--"timeoutSeconds": "4000"--
}
}
}

The runCommand must finish in under 3600 or it times out. Is there a workaround?

질문됨 7년 전4279회 조회
5개 답변
1

I had issues with AWS Data Pipeline RunShellScript send commands timing out after an hour (default 3600 seconds) when I upgraded the SSM agent on my Linux EC2 instance to the latest version. The solution was to change the parameters.

Original:

--parameters commands=["python my_script.py"]

New (with 9999 second timeout):

--parameters '{"workingDirectory":["path/to/my/script"],"executionTimeout":["9999"],"commands":["python my_script.py"]}'

The AWS documentation around this is very poor but I managed to figure it out by creating a Run Command in the AWS Systems Manager console. Once you've input all the settings you want just scroll to the "AWS command line interface command" section at the bottom and you can copy the code from there into CLI, Data Pipeline or wherever else you want to run it. Hope this helps someone!

답변함 6년 전
  • thank you so much for the answer really helped me

0

Hello,

You need to change "Execution Timeout" parameters when you use Run Command utility to override the default 3600 Second value of the Execution Timeout.
Below document provides a step by step guide for it:
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/tutorial_run_command.html#rc-tutorial-ui

Regards,
Santosh K

답변함 7년 전
0

Perhaps you missed my question. This is regarding an SSM Automation, not just the Run Command. I want to change the Execution Timeout in an Automation SSM Document.

답변함 7년 전
0

Is anyone going to respond to this question? I'm also hitting problems with the fact that this value is only configurable in the Run Command web UI, not in SSM Automation, the AWS CLI, or or in boto3.

I know I'm not alone in saying that I use the console to prototype before automating. Effectively, this limitation means everyone who uses this and requires a moderate command timeout (like 90 minutes, which is my use case) will hit this blocker.

When can we expect a fix?

답변함 6년 전
0

Thank you tobyayre! That did the trick.

It seems confusing to me that an execution timeout would be tied to a document type, as it would seem to be universal. But that appears to the case; knowing where to look I found this documentation on document specific parameters: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-doc-syntax.html

Thanks again!

답변함 6년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠