

This is the new *CloudFormation Template Reference Guide*. Please update your bookmarks and links. For help getting started with CloudFormation, see the [AWS CloudFormation User Guide](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html).

# AWS::ImageBuilder::Image DeletionSettings
<a name="aws-properties-imagebuilder-image-deletionsettings"></a>

Contains deletion settings of underlying resources of an image when it is replaced or deleted, including its Amazon Machine Images (AMIs), snapshots, or containers.

**Note**  
If you specify the `Retain` option in the [DeletionPolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-attribute-updatereplacepolicy.html) or [UpdateReplacePolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-attribute-deletionpolicy.html), the deletion of underlying resources will not be executed.

## Syntax
<a name="aws-properties-imagebuilder-image-deletionsettings-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-imagebuilder-image-deletionsettings-syntax.json"></a>

```
{
  "[ExecutionRole](#cfn-imagebuilder-image-deletionsettings-executionrole)" : String
}
```

### YAML
<a name="aws-properties-imagebuilder-image-deletionsettings-syntax.yaml"></a>

```
  [ExecutionRole](#cfn-imagebuilder-image-deletionsettings-executionrole): String
```

## Properties
<a name="aws-properties-imagebuilder-image-deletionsettings-properties"></a>

`ExecutionRole`  <a name="cfn-imagebuilder-image-deletionsettings-executionrole"></a>
The name or Amazon Resource Name (ARN) for the IAM role you create that grants Image Builder access to delete the image and its underlying resources.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)