You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

为何我的SSM文档步骤的executionTimeout修改后未生效?

SSM自动化文档runCommand步骤超时配置不生效问题

已配置SSM多步骤自动化文档,其中config_topology步骤使用aws:runCommand执行Shell脚本,尽管已将步骤级timeoutSeconds和AWS-RunShellScript的TimeoutSeconds参数都设为12800秒,控制台仍显示默认3600秒超时并触发"Execution Timed Out"错误。

步骤配置如下:

- name: config_topology
  action: 'aws:runCommand'
  timeoutSeconds: 12800
  inputs:
    DocumentName: AWS-RunShellScript
    TimeoutSeconds: 12800
    Parameters:
      ...

解决方法

  • 配置文档根级超时:SSM自动化文档默认全局超时为3600秒,若未在根节点设置timeoutSeconds,单个步骤的超时会被全局限制。需在文档根目录添加全局超时设置,值需大于等于步骤的超时值:
    schemaVersion: '0.3'
    description: 你的自动化文档描述
    timeoutSeconds: 13000 # 需大于步骤设置的12800秒
    mainSteps:
      - name: config_topology
        action: 'aws:runCommand'
        timeoutSeconds: 12800
        inputs:
          DocumentName: AWS-RunShellScript
          TimeoutSeconds: 12800
          Parameters:
            commands:
              - 你的脚本命令内容
    
  • 发布文档新版本:修改配置后必须发布文档的新版本,执行自动化任务时选择最新版本,旧版本的配置不会自动生效。
  • 确认两层超时逻辑:步骤的timeoutSeconds是SSM自动化服务等待Run Command执行完成的超时,inputs内的TimeoutSeconds是目标实例上脚本的执行超时,前者需大于等于后者,避免自动化步骤先触发超时。

内容的提问来源于stack exchange,提问作者Ali Ourag

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.10 23:26:14