简体   繁体   English

AWS ssm 发送命令:在 CLI 中修改超时

[英]AWS ssm send-command : modify timeout in CLI

I'm using AWS SSM to compute a long script on an ec2 instance.我正在使用 AWS SSM 在 ec2 实例上计算一个长脚本。

I would like to configure the execution timeout (execution time, not launch time) and I don't find how to do this on the official documentation (opposing informations or not working).我想配置执行超时(执行时间,而不是启动时间),但我在官方文档(反对信息或不工作)中找不到如何执行此操作。

I'm using only the CLI interface.我只使用 CLI 界面。

This value is a document property that can be passed with --parameters option using executionTimeout key.此值是一个文档属性,可以使用executionTimeout键与--parameters选项一起传递。 You can use aws ssm describe-documents to find this and other document specific parameters.您可以使用aws ssm describe-documents来查找此和其他文档特定参数。

aws ssm describe-document --name "AWS-RunShellScript"

{
    "Document": {
        "Hash": "99749de5e62f71e5ebe9a55c2321e2c394796afe7208cff048696541e6f6771e",
        "HashType": "Sha256",
        "Name": "AWS-RunShellScript",
        "Owner": "Amazon",
        "CreatedDate": "2017-08-21T22:25:02.029000+02:00",
        "Status": "Active",
        "DocumentVersion": "1",
        "Description": "Run a shell script or specify the commands to run.",
        "Parameters": [
            {
                "Name": "commands",
                "Type": "StringList",
                "Description": "(Required) Specify a shell script or a command to run."
            },
            {
                "Name": "workingDirectory",
                "Type": "String",
                "Description": "(Optional) The path to the working directory on your instance.",
                "DefaultValue": ""
            },
            {
                "Name": "executionTimeout",
                "Type": "String",
                "Description": "(Optional) The time in seconds for a command to complete before it is considered to have failed. Default is 3600 (1 hour). Maximum is 172800 (48 hours).",
                "DefaultValue": "3600"
            }
        ],
        "PlatformTypes": [
            "Linux",
            "MacOS"
        ],
        "DocumentType": "Command",
        "SchemaVersion": "1.2",
        "LatestVersion": "1",
        "DefaultVersion": "1",
        "DocumentFormat": "JSON",
        "Tags": []
    }
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM