The Create Multiple AMI Images action will create AMI images from many EC2 instances.
For example, AMI images can be created every day at 1am from any EC2 instance which matches certain EC2 tags.
By default, EC2 instances will be stopped before the AMI image is created. This is to ensure that the EBS volume is in a consistent state. This can be overridden, but it is not recommended. After the image creation has begun, the instance is restarted.
Please see Common Action Settings for a description of settings common to all action types.
Instance Identification Method
Indicate the method in which the instance is to be identified. Valid options are:
All Instances - AMI images will be created from all EC2 instances.
Instance ID - Identify the instance by it's unique instance ID value.
Instance Name - Identify the instance by it's "Name" tag.
EC2 Tag- Identify the instance by matching EC2 tags.
Indicate the instance IDs of the EC2 instances. This value usually looks like "i-84a3dc7b". This instances must reside in the region specified. Required only if Instance Identification Method is set to "Instance ID".
Indicate the value of the "Name" tag of the EC2 instance. This instance must reside in the region specified. Required only if Instance Identification Method is set to "Instance Name".
EC2 Tag Name
Indicate the name of the EC2 tag used to match EC2 instances.
EC2 Tag Value
Indicate the value comparison of the EC2 tag used to match EC2 instances.
Enable this option if the image should be created without rebooting.
Specify the name of the image. Macros can be used to include run-time data. See below.
Optional. The image can have a description saved with it. Macros can be used to include run-time data. See below.
Set Name Tag Method
After the image is complete, the resulting AMI image can have it's Name tag assigned.. The following values are permitted:
None - do not set the name tag of the image.
Same as image name - Set the name tag of the image the same as the AMI image name.
Custom - Set the name tag of the AMI image using a custom value. See Name Tag below.
When "Set Name Tag Method" is set to "Custom", specify the custom value to set. Macros can be used to include run-time data. See below.
Extra tags can be added to the AMI images and associated EBS snapshots when they are complete. Tags can be added to the image, the snapshots, or both.
Set Snapshot Name Method
After the image is complete, the resulting EBS snapshots can be given names. The following values are permitted:
None - do not name the snapshots.
Same as image name - name the snapshots the same as the AMI image name.
Same as image name tag - name the snapshots the same as the AMI image name tag.
Custom - name the snapshots using a custom value. See Snapshot Name below.
When "Set Snapshot Name Method" is set to "Custom", specify the custom value to set. Macros can be used to include run-time data. See below.
Target Region to Copy AMI
Optional. Once the images are complete, they can be copied to a different region. If the images should be copied, select the target region.
Optional. When copying AMI images, the image can be copied to a different AWS account. Select the alternate AWS account. To copy within the same AWS account, choose "Same".
Target KMS Key Override
Optional. When copying AMI images, the KMS key used to encrypt the AMI image and EBS snapshots can be overridden. Specify the Key ID, ARN, or alias (prefixed with 'alias/') to override the KMS key.
The following macros can be used to include some run-time information.
Date of image in year-month-day format.
Time of image in 24-hour format.
Day of the week, as a short name.
Day of the week, as a long name.
Day of the month.
Week of the month, starting at day 1 of the month.
Day 1 - 7 is week 1
Day 8 - 14 is week 2
Day 15 - 21 is week 3
Day 22 - 28 is week 4
Day 29 - 31 is week 5
Week to the end of the month, ending at the last day of the month. For example, for a 31-day month:
Day 25 - 31 is week 1
Day 18 - 24 is week 2
Day 11 - 17 is week 3
Day 4 - 10 is week 4
Day 1 - 3 is week 5
Month of the year, as a short name.
Month of the year, as a long name.
Image Name, Description: ID of the AMI image used to create the instance
Name Tag, Snapshot Name: ID of the newly created AMI image
Name of the newly created AMI image. Snapshot name field only.
Name of the instance.
ID of the instance.
Volume ID of the volume the snapshot was created from. Snapshot name field only.
Device the volume is attached as. Snapshot name field only.
Macros are case-sensitive. For example, $(Time) is not valid. $(TIME) must be used.
Amazon Commands Used
The following Amazon AWS commands are used. The access key should have permission to execute all of them.