

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# `AWS-CreateImage`
<a name="automation-aws-createimage"></a>

**Description**

從 Amazon Elastic Compute Cloud Amazon Machine Image(Amazon EC2AMI) 執行個體建立新的 ()。

[執行此自動化 （主控台）](https://console.aws.amazon.com/systems-manager/automation/execute/AWS-CreateImage)

**文件類型**

 自動化

**擁有者**

Amazon

**平台**

Linux、macOS、 Windows

**參數**
+ AutomationAssumeRole

  類型：字串

  描述：（選用） 允許 Systems Manager Automation 代表您執行動作的 (IAM) 角色的 AWS Identity and Access Management Amazon Resource Name (ARN)。如果未指定角色，Systems Manager Automation 會使用啟動此 Runbook 之使用者的許可。
+ InstanceId

  類型：字串

  描述：(必要) EC2 執行個體的 ID。
+ NoReboot

  類型：布林值

  描述：(選用) 在建立映像之前不要重新開機執行個體。

**必要的 IAM 許可**

`AutomationAssumeRole` 參數需要下列動作才能成功使用 Runbook。

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "ec2:CreateImage",
                "ec2:DescribeImages"
            ],
            "Resource": [
                "*"
            ]
        }
    ]
}
```

------