2

I have been working with AWS Systems Manager and I have created a Document to run a command, But it appears there is no way to overwrite the timeout for a run command in an SSM

I have changed the execution timeout here in the parameters but does not work. enter image description here

also, I added a timeoutSeconds in my Document and it doesn't work either.

This is my Document (I'm using schema version 2.2):

schemaVersion: "2.2"
description: "Runs a Python command"
parameters:
  Params:
    type: "String"
    description: "Params after the python3 keyword."
mainSteps:
- action: "aws:runShellScript"
  name: "Python3"
  inputs:
    timeoutSeconds: '300000'
    runCommand:
      - "sudo /usr/bin/python3 /opt/python/current/app/{{Params}}"
John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
Miguel Garcia
  • 35
  • 2
  • 8

2 Answers2

1

1: The setting that’s displayed in your screenshot in the Other parameters section is the Delivery Timeout, which is different from the execution timeout.

You must specify the execution timeout value in the Execution Timeout field, if available. Not all SSM documents require that you specify an execution timeout. If a Systems Manager document doesn't require that you explicitly specify an execution timeout value, then Systems Manager enforces the hard-coded default execution timeout.

2: In your document, the timeoutSeconds attribute is in the wrong place. It needs to be on the same level as the action.

...
mainSteps:
- action: "aws:runShellScript"
  timeoutSeconds: 300000
  name: "Python3"
  inputs:
    runCommand:
    - "sudo /usr/bin/python3 /opt/python/current/app/{{Params}}"
Dennis Traub
  • 50,557
  • 7
  • 93
  • 108
  • 1
    Thank you for your answer but timeoutSeconds is in the right place according to schemaVersion: '2.2' also with the default Delivery Timeout doesn't work either :| https://docs.amazonaws.cn/en_us/systems-manager/latest/userguide/ssm-plugins.html – Miguel Garcia Jun 23 '20 at 21:22
1
    timeoutSeconds: '300000'

Isn't this string but not integer?

Mark Dai
  • 11
  • 1