

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](https://docs.amazonaws.cn/AWSCloudFormation/latest/UserGuide/Welcome.html).

# AWS::Forecast::Dataset EncryptionConfig
<a name="aws-properties-forecast-dataset-encryptionconfig"></a>

An Amazon Key Management Service (KMS) key and an Amazon Identity and Access Management (IAM) role that Amazon Forecast can assume to access the key. You can specify this optional object in the [CreateDataset](https://docs.amazonaws.cn/forecast/latest/dg/API_CreateDataset.html) and [CreatePredictor](https://docs.amazonaws.cn/forecast/latest/dg/API_CreatePredictor.html) requests.

## Syntax
<a name="aws-properties-forecast-dataset-encryptionconfig-syntax"></a>

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

### JSON
<a name="aws-properties-forecast-dataset-encryptionconfig-syntax.json"></a>

```
{
  "[KmsKeyArn](#cfn-forecast-dataset-encryptionconfig-kmskeyarn)" : String,
  "[RoleArn](#cfn-forecast-dataset-encryptionconfig-rolearn)" : String
}
```

### YAML
<a name="aws-properties-forecast-dataset-encryptionconfig-syntax.yaml"></a>

```
  [KmsKeyArn](#cfn-forecast-dataset-encryptionconfig-kmskeyarn): String
  [RoleArn](#cfn-forecast-dataset-encryptionconfig-rolearn): String
```

## Properties
<a name="aws-properties-forecast-dataset-encryptionconfig-properties"></a>

`KmsKeyArn`  <a name="cfn-forecast-dataset-encryptionconfig-kmskeyarn"></a>
The Amazon Resource Name (ARN) of the KMS key.  
*Required*: No  
*Type*: String  
*Pattern*: `arn:aws[-a-z]*:kms:.*:key/.*`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.amazonaws.cn/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RoleArn`  <a name="cfn-forecast-dataset-encryptionconfig-rolearn"></a>
The ARN of the IAM role that Amazon Forecast can assume to access the Amazon KMS key.  
Passing a role across Amazon accounts is not allowed. If you pass a role that isn't in your account, you get an `InvalidInputException` error.  
*Required*: No  
*Type*: String  
*Pattern*: `^[a-zA-Z0-9\-\_\.\/\:]+$`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.amazonaws.cn/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)