AWS Patch Manager任务给出失败状态

时间:2018-06-11 10:32:22

标签: node.js amazon-web-services

这些是我用来创建窗口ID的参数

var params = {
    AllowUnassociatedTargets: true, 
    Cutoff: '', 
    Duration: '', 
    Name: '',
    Schedule: ''
};

这些是我用来创建目标ID的参数

var params = {
    ResourceType: "INSTANCE", 
    Targets: [ 
                {
                  Key: 'InstanceIds',
                  Values: [result.instanceId]
                }
    ],
    WindowId: data.WindowId,
    Description: req.body.patchName+" Description",
    Name: req.body.patchName
};

这些是我用来创建任务ID的参数

var targetId = data.WindowTargetId;
var params = {
        MaxConcurrency: '1',
        MaxErrors: '1',
        ServiceRoleArn: result.service_arn,
        Targets: [ 
            {
              Key: 'InstanceIds',
              Values: [result.instanceId]
            }
        ],
        TaskArn: 'AWS-RunPatchBaseline',
        TaskType: 'RUN_COMMAND' ,
        WindowId: WindowId,
        Name:req.body.patchName,
        Priority: 1,
        TaskInvocationParameters: {
          RunCommand: {
            "Parameters": {
               "DocumentDescription" : ["Scans for or installs patches from a patch baseline."],
               "Operation" : [req.body.operationType]
             }
          }
        }
};

当任务运行并且计划开始时,它总是给我一个失败状态,但如果我去完成任务并编辑任务并点击"编辑运行命令任务"之后,它将开始显示 SUCCESS 的任务执行。

0 个答案:

没有答案