SSM Document Timeout in CDK

1

I am writing an automation for systems manager using CDK. I would like to call a Systems Manager Run Command when a CloudWatch alarm enters the alarm state, via EventBridge. I was able to achieve this using the CfnDocument and CfnRule constructs in CDK. However, my Run Command shell script is long running, and can time out after 3600 seconds.

Is there any way that I can increase the timeout of the document when invoking from EventBridge?

I know you can increase the timeout when calling Run Command from the console, but I need this to be automated. I've also tried adding 'timeoutSeconds' to the long running steps in my SSM runbook, but it still times out after 3600 s of execution.

  • I think I figured it out. In your ssm document, in the mainsteps section, you add the timeoutSeconds parameter to the inputs of the runcommand, like so:

    mainSteps:
    - name: LongScript
      action: aws:runShellScript
      inputs:
      - runCommand: "sleep 10000"
        timeoutSeconds: 11000
    
답변 없음

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

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

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

관련 콘텐츠