This is the new Amazon CloudFormation Template Reference Guide. Please update your bookmarks and links. For help getting started with CloudFormation, see the Amazon CloudFormation User Guide.
AWS::ImageBuilder::Image
Creates a new image. This request will create a new image along with all of the configured output resources defined in the distribution configuration. You must specify exactly one recipe for your image, using either a ContainerRecipeArn or an ImageRecipeArn.
Syntax
To declare this entity in your Amazon CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::ImageBuilder::Image", "Properties" : { "ContainerRecipeArn" :String, "DeletionSettings" :DeletionSettings, "DistributionConfigurationArn" :String, "EnhancedImageMetadataEnabled" :Boolean, "ExecutionRole" :String, "ImagePipelineExecutionSettings" :ImagePipelineExecutionSettings, "ImageRecipeArn" :String, "ImageScanningConfiguration" :ImageScanningConfiguration, "ImageTestsConfiguration" :ImageTestsConfiguration, "InfrastructureConfigurationArn" :String, "LoggingConfiguration" :ImageLoggingConfiguration, "Tags" :{, "Workflows" :Key:Value, ...}[ WorkflowConfiguration, ... ]} }
YAML
Type: AWS::ImageBuilder::Image Properties: ContainerRecipeArn:StringDeletionSettings:DeletionSettingsDistributionConfigurationArn:StringEnhancedImageMetadataEnabled:BooleanExecutionRole:StringImagePipelineExecutionSettings:ImagePipelineExecutionSettingsImageRecipeArn:StringImageScanningConfiguration:ImageScanningConfigurationImageTestsConfiguration:ImageTestsConfigurationInfrastructureConfigurationArn:StringLoggingConfiguration:ImageLoggingConfigurationTags:Workflows:Key:Value- WorkflowConfiguration
Properties
- ContainerRecipeArn
- 
                    The Amazon Resource Name (ARN) of the container recipe that defines how images are configured and tested. Required: No Type: String Update requires: Replacement 
- DeletionSettings
- Property description not available. - Required: No - Type: DeletionSettings - Update requires: No interruption 
- DistributionConfigurationArn
- 
                    The Amazon Resource Name (ARN) of the distribution configuration that defines and configures the outputs of your pipeline. Required: No Type: String Update requires: Replacement 
- EnhancedImageMetadataEnabled
- 
                    Collects additional information about the image being created, including the operating system (OS) version and package list. This information is used to enhance the overall experience of using EC2 Image Builder. Enabled by default. Required: No Type: Boolean Update requires: Replacement 
- ExecutionRole
- 
                    The name or Amazon Resource Name (ARN) for the IAM role you create that grants Image Builder access to perform workflow actions. Required: No Type: String Pattern: ^(?:arn:aws(?:-[a-z]+)*:iam::[0-9]{12}:role/)?[a-zA-Z_0-9+=,.@\-_/]+$Minimum: 1Maximum: 2048Update requires: No interruption 
- ImagePipelineExecutionSettings
- Property description not available. - Required: No - Type: ImagePipelineExecutionSettings - Update requires: Some interruptions 
- ImageRecipeArn
- 
                    The Amazon Resource Name (ARN) of the image recipe that defines how images are configured, tested, and assessed. Required: No Type: String Update requires: Replacement 
- ImageScanningConfiguration
- 
                    Contains settings for vulnerability scans. Required: No Type: ImageScanningConfiguration Update requires: Replacement 
- ImageTestsConfiguration
- 
                    The image tests configuration of the image. Required: No Type: ImageTestsConfiguration Update requires: Replacement 
- InfrastructureConfigurationArn
- 
                    The Amazon Resource Name (ARN) of the infrastructure configuration that defines the environment in which your image will be built and tested. Required: No Type: String Update requires: Replacement 
- LoggingConfiguration
- 
                    The logging configuration that's defined for the image. Image Builder uses the defined settings to direct execution log output during image creation. Required: No Type: ImageLoggingConfiguration Update requires: No interruption 
- 
                    The tags of the image. Required: No Type: Object of String Pattern: .{1,}Update requires: No interruption 
- Workflows
- 
                    Contains an array of workflow configuration objects. Required: No Type: Array of WorkflowConfiguration Update requires: Replacement 
Return values
Ref
When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the resource ARN, such as
			arn:aws:imagebuilder:us-west-2:123456789012:image/my-example-image.
For more information about using the Ref function, see Ref.
Fn::GetAtt
The Fn::GetAtt intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.
For more information about using the Fn::GetAtt intrinsic function, see Fn::GetAtt.
- Arn
- 
                            Returns the Amazon Resource Name (ARN) of the image. For example, arn:aws:imagebuilder:us-west-2:123456789012:image/mybasicrecipe/2019.12.03/1.
- ImageId
- 
                            Returns the AMI ID of the Amazon EC2 AMI in the Region in which you are using Image Builder. Values are returned only for AMIs, and not for container images. 
- ImageUri
- 
                            Returns the URI for a container image created in the context Region. Values are returned only for container images, and not for AMIs. 
- LatestVersion.Arn
- 
                            The Amazon Resource Name (ARN) of the image. NoteSemantic versioning is included in each object's Amazon Resource Name (ARN), at the level that applies to that object as follows: - 
                                        Versionless ARNs and Name ARNs do not include specific values in any of the nodes. The nodes are either left off entirely, or they are specified as wildcards, for example: x.x.x. 
- 
                                        Version ARNs have only the first three nodes: <major>.<minor>.<patch> 
- 
                                        Build version ARNs have all four nodes, and point to a specific build for a specific version of an object. 
 
- 
                                        
- LatestVersion.Major
- Property description not available. 
- LatestVersion.Minor
- Property description not available. 
- LatestVersion.Patch
- Property description not available. 
- Name
- 
                            Returns the name of the image. 
Examples
Create an image
The following example shows the schema for all of the parameters of the Image resource document in both YAML and JSON format.
YAML
Resources: ImageAllParameters: Type: 'AWS::ImageBuilder::Image' Properties: ImageRecipeArn: !Ref ImageRecipeArn InfrastructureConfigurationArn: !Ref InfrastructureConfigurationArn DistributionConfigurationArn: !Ref DistributionConfigurationArn ImageTestsConfiguration: ImageTestsEnabled: false TimeoutMinutes: 60 Tags: CustomerImageTagKey1: 'CustomerImageTagValue1' CustomerImageTagKey2: 'CustomerImageTagValue2'
JSON
{ "Resources": { "ImageAllParameters": { "Type": "AWS::ImageBuilder::Image", "Properties": { "ImageRecipeArn": { "Ref": "ImageRecipeArn" }, "InfrastructureConfigurationArn": { "Ref": "InfrastructureConfigurationArn" }, "DistributionConfigurationArn": { "Ref": "DistributionConfigurationArn" }, "ImageTestsConfiguration": { "ImageTestsEnabled": false, "TimeoutMinutes": 60 }, "Tags": { "CustomerImageTagKey1": "CustomerImageTagValue1", "CustomerImageTagKey2": "CustomerImageTagValue2" } } } } }