LoginSignup
1
0

More than 3 years have passed since last update.

AWS-RunShellScriptのexecutionTimeout値を変更したい

Posted at

SSM AutomationのstepにてAWS-RunShellScriptのドキュメントを利用した際のハマったのでメモ。
'aws:runCommand'でEC2インスタンス内shを実行していたが、デフォルトtimeoutの1hを超えてしまった。

やりたいこと

'aws:runCommand'の実行タイムアウト値を1h→3hに変更したい。

前提

Run Commandにはtimeout値が2種類あり、今回変えたいのはExecutionTimeout。
デフォルト3600(1hour)であり、MAX172800(48hours)とのこと。
https://docs.aws.amazon.com/ja_jp/systems-manager/latest/userguide/monitor-commands.html

やったこと(NG)

  1. ドキュメントのコンテンツにexecutionTimeoutを追加 スクリーンショット 2021-01-25 11.59.18.png

実行時間1hを超えるとFailed。
検証のため、60を指定したところ1mの設定になった。1hより短い分には設定できそう。

  1. コンソールからexecutionTimeoutを入力 スクリーンショット 2021-01-25 11.46.26.png

同様の結果。

やったこと(OK)

AWS-RunShellScriptのコピードキュメントを作成し、executionTimeoutを設定。
スクリーンショット 2021-01-25 11.53.23.png

複製はできないので、コンテンツをコピーし新規ドキュメントとして作成。
schemaVersion=1.2のドキュメントはバージョン更新できないので注意。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0