Oveview
The "EC2: Create AMI" action allows you to create an Amazon Machine Image (hereinafter "AMI") from an Amazon EC2 instance (hereinafter "EC2 instance").
The AMI contains a disk image of the EC2 instance and information required to launch it, so that it can be used as a backup of your EC2 instance. As with other actions, you can specify the EC2 instance, from which the AMI is created, with a 、resource ID or a tag attached to the EC2 instance.
Configuration options
No | Option | Explanation |
---|---|---|
1 | Region |
Specify the region where the EC2 instance, which you want to retrieve an AMI, is located |
2 | Instance |
Specify the EC2 instance, which you want to retrive the AMI, by resource ID |
Instance with specified tag | Specify the EC2 instance, which you want to retrive the AMI, by tag | |
3 | AMI name |
|
4 | Explanation |
|
5 | Number of generations to be created |
|
6 | Instance restart |
|
7 | Tags to be added to the created image |
|
8 | Check the completion status of the resource |
|
9 | Re-create an image when AMI status is "Failed" |
|
Configuration example
Create a job in Cloud Automator using the "EC2: Create AMI" action.
- Click the "Add Job" button on the Job screen of Cloud Automator
- Select the group to add the job at Select Group
- Select an intended trigger in the trigger selection (example: On-demand trigger)
- In the action selection, select the "EC2: Create AMI" action
- At AWS account selection, select designated AWS account
- Setting parameter of the action
No. Option Example of setting value 1 Region Asia pacific (Tokyo) 2 Instances tagged with key: environment
value: production3 Image name production-backup 4 Description %Y%m%d%H%M 5 Generation for create resource 5 6 Reboot instance No 7 Additional tag for created image key: environment
value: production8 Add same tag to image snapshot. Check 9 Watch resource exit status Check 10 Re-create AMI when AMI creation has been failed. Check - Setting post-process when succeeded or failed
- Enter Job name and click "Confirm"
Operation check
- Click log button for created Job
- Click the details of the execution log from the execution log list
- Check the result in the log details.
If it is "success", you can confirm that the Job is executed successfully.
If it is "Running", the Job is being executed, so check it back after a while. - The operation result of each resource can be confirmed by clicking "Show detail".
Now you can confirm the operation of the Job using the "EC2: Create AMI" action. The "EC2: Create AMI" action is used by a large number of customers to back up EC2 instances. Please use it for your own benefits.
Status condition of the log
Execution result
Status | Explanation |
---|---|
Success | It is successful in any of the following cases.
|
Failed | It is failed in any of the following cases.
|
Resource operation history status conditions
The operational status is displayed for each AMI that you created.
Status | Explanation |
---|---|
completed |
It is completed in any of the following cases.
|
failed | It is failed in any of the following cases.
|
About tags attached to AMI
The following tags are attached to the AMI generated by this action.
Key | Value |
---|---|
Cloud Automator AMI Generation | Generation management number of AMI managed by Cloud Automator (only when generation management is enabled) |
Cloud Automator Job ID | Job ID which is executed by Cloud Automator |
Cloud Automator Source Instance Name |
Name tag value of the EC2 instance, which created the AMI |
Cloud Automator Organization ID |
Cloud Automator Organization ID for the job |
Cloud Automator Organization Name |
Cloud Automator Organization Name for the job |
Cloud Automator Group ID |
Cloud Automator Group ID for the job |
Cloud Automator Group Name |
Cloud Automator Group Name for the job |
If an EC2 instance already has more than 30 tags, its original tags will not be carried over to the AMI. This is to avoid exceeding the maximum tag limit when combined with Cloud Automator's administrative tags.
However, even when an EC2 instance has over 30 tags, its "Name" tag and any tags specified during the Cloud Automator job registration will be applied to the AMI.
AWS API to be used in this action
The following AWS APIs were used for execution of the action.
Please note that the AWS account under which you run the action must have an IAM policy, which enables to run these APIs, attached.