

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).

# Amazon Kinesis
<a name="AWS_Kinesis"></a>

**Resource types**
+ [AWS::Kinesis::ResourcePolicy](aws-resource-kinesis-resourcepolicy.md)
+ [AWS::Kinesis::Stream](aws-resource-kinesis-stream.md)
+ [AWS::Kinesis::StreamConsumer](aws-resource-kinesis-streamconsumer.md)

# AWS::Kinesis::ResourcePolicy
<a name="aws-resource-kinesis-resourcepolicy"></a>

Attaches a resource-based policy to a data stream or registered consumer. If you are using an identity other than the root user of the AWS account that owns the resource, the calling identity must have the `PutResourcePolicy` permissions on the specified Kinesis Data Streams resource and belong to the owner's account in order to use this operation. If you don't have `PutResourcePolicy` permissions, Amazon Kinesis Data Streams returns a `403 Access Denied error`. If you receive a `ResourceNotFoundException`, check to see if you passed a valid stream or consumer resource. 

 Request patterns can be one of the following:
+ Data stream pattern: `arn:aws.*:kinesis:.*:\d{12}:.*stream/\S+`
+ Consumer pattern: `^(arn):aws.*:kinesis:.*:\d{12}:.*stream\/[a-zA-Z0-9_.-]+\/consumer\/[a-zA-Z0-9_.-]+:[0-9]+`

For more information, see [Controlling Access to Amazon Kinesis Data Streams Resources Using IAM](https://docs.aws.amazon.com/streams/latest/dev/controlling-access.html).

## Syntax
<a name="aws-resource-kinesis-resourcepolicy-syntax"></a>

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

### JSON
<a name="aws-resource-kinesis-resourcepolicy-syntax.json"></a>

```
{
  "Type" : "AWS::Kinesis::ResourcePolicy",
  "Properties" : {
      "[ResourceArn](#cfn-kinesis-resourcepolicy-resourcearn)" : String,
      "[ResourcePolicy](#cfn-kinesis-resourcepolicy-resourcepolicy)" : Json
    }
}
```

### YAML
<a name="aws-resource-kinesis-resourcepolicy-syntax.yaml"></a>

```
Type: AWS::Kinesis::ResourcePolicy
Properties:
  [ResourceArn](#cfn-kinesis-resourcepolicy-resourcearn): String
  [ResourcePolicy](#cfn-kinesis-resourcepolicy-resourcepolicy): Json
```

## Properties
<a name="aws-resource-kinesis-resourcepolicy-properties"></a>

`ResourceArn`  <a name="cfn-kinesis-resourcepolicy-resourcearn"></a>
Returns the Amazon Resource Name (ARN) of the resource-based policy.  
*Required*: Yes  
*Type*: String  
*Pattern*: `arn:aws.*:kinesis:.*:\d{12}:stream/\S+`  
*Minimum*: `1`  
*Maximum*: `2048`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ResourcePolicy`  <a name="cfn-kinesis-resourcepolicy-resourcepolicy"></a>
This is the description for the resource policy.  
*Required*: Yes  
*Type*: Json  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-kinesis-resourcepolicy-return-values"></a>

### Ref
<a name="aws-resource-kinesis-resourcepolicy-return-values-ref"></a>

## Examples
<a name="aws-resource-kinesis-resourcepolicy--examples"></a>



### Resource policy that gives write access to a specific data stream
<a name="aws-resource-kinesis-resourcepolicy--examples--Resource_policy_that_gives_write_access_to_a_specific_data_stream"></a>

This policy allows Account12345 to perform the `DescribeStreamSummary`, `ListShards`, `PutRecord`, and `PutRecords` operations on the specified stream `datastreamABC`.

#### JSON
<a name="aws-resource-kinesis-resourcepolicy--examples--Resource_policy_that_gives_write_access_to_a_specific_data_stream--json"></a>

```
{
  "AWSTemplateFormatVersion": "2010-09-09",
  "Description": "Kinesis Data Streams resource policy example",
  "Resources": {
    "SampleStreamPolicy": {
      "Type": "AWS::Kinesis::ResourcePolicy",
      "Properties": {
        "ResourceArn": "arn:aws:kinesis:us-east-2:123456789012:stream/datastreamABC",
        "ResourcePolicy": {
          "Version": "2012-10-17", 		 	 	 
          "Statement": [
            {
              "Sid": "WriteStatement",
              "Effect": "Allow",
              "Principal": {
                "AWS": "arn:aws:iam::123456789012:root"
              },
              "Action": [
                "kinesis:DescribeStreamSummary",
                "kinesis:ListShards",
                "kinesis:PutRecord",
                "kinesis:PutRecords"
              ],
              "Resource": "arn:aws:kinesis:us-east-2:123456789012:stream/datastreamABC"
            }
          ]
        }
      }
    }
  }
}
```

#### YAML
<a name="aws-resource-kinesis-resourcepolicy--examples--Resource_policy_that_gives_write_access_to_a_specific_data_stream--yaml"></a>

```
SampleResourcePolicy:
  Type: AWS::Kinesis::ResourcePolicy
  Properties:
    ResourceArn: arn:aws:kinesis:us-east-2:123456789012:stream/datastreamABC
    ResourcePolicy:
      Version: 2012-10-17
      Statement:
        - Action:
            - 'kinesis:DescribeStreamSummary'
            - 'kinesis:ListShards'
            - 'kinesis:PutRecord'
            - 'kinesis:PutRecords'
          Effect: Allow
          Resource: 
            - 'arn:aws:kinesis:us-east-2:123456789012:stream/datastreamABC'
          Principal: 
            AWS: 'arn:aws:iam::123456789012:root'
```

# AWS::Kinesis::Stream
<a name="aws-resource-kinesis-stream"></a>

Creates a Kinesis stream that captures and transports data records that are emitted from data sources. For information about creating streams, see [CreateStream](https://docs.aws.amazon.com/kinesis/latest/APIReference/API_CreateStream.html) in the Amazon Kinesis API Reference. 

## Syntax
<a name="aws-resource-kinesis-stream-syntax"></a>

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

### JSON
<a name="aws-resource-kinesis-stream-syntax.json"></a>

```
{
  "Type" : "AWS::Kinesis::Stream",
  "Properties" : {
      "[DesiredShardLevelMetrics](#cfn-kinesis-stream-desiredshardlevelmetrics)" : [ String, ... ],
      "[MaxRecordSizeInKiB](#cfn-kinesis-stream-maxrecordsizeinkib)" : Integer,
      "[Name](#cfn-kinesis-stream-name)" : String,
      "[RetentionPeriodHours](#cfn-kinesis-stream-retentionperiodhours)" : Integer,
      "[ShardCount](#cfn-kinesis-stream-shardcount)" : Integer,
      "[StreamEncryption](#cfn-kinesis-stream-streamencryption)" : StreamEncryption,
      "[StreamModeDetails](#cfn-kinesis-stream-streammodedetails)" : StreamModeDetails,
      "[Tags](#cfn-kinesis-stream-tags)" : [ Tag, ... ],
      "[WarmThroughputMiBps](#cfn-kinesis-stream-warmthroughputmibps)" : Integer
    }
}
```

### YAML
<a name="aws-resource-kinesis-stream-syntax.yaml"></a>

```
Type: AWS::Kinesis::Stream
Properties:
  [DesiredShardLevelMetrics](#cfn-kinesis-stream-desiredshardlevelmetrics): 
    - String
  [MaxRecordSizeInKiB](#cfn-kinesis-stream-maxrecordsizeinkib): Integer
  [Name](#cfn-kinesis-stream-name): String
  [RetentionPeriodHours](#cfn-kinesis-stream-retentionperiodhours): Integer
  [ShardCount](#cfn-kinesis-stream-shardcount): Integer
  [StreamEncryption](#cfn-kinesis-stream-streamencryption): 
    StreamEncryption
  [StreamModeDetails](#cfn-kinesis-stream-streammodedetails): 
    StreamModeDetails
  [Tags](#cfn-kinesis-stream-tags): 
    - Tag
  [WarmThroughputMiBps](#cfn-kinesis-stream-warmthroughputmibps): Integer
```

## Properties
<a name="aws-resource-kinesis-stream-properties"></a>

`DesiredShardLevelMetrics`  <a name="cfn-kinesis-stream-desiredshardlevelmetrics"></a>
A list of shard-level metrics in properties to enable enhanced monitoring mode.  
*Required*: No  
*Type*: Array of String  
*Maximum*: `7`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MaxRecordSizeInKiB`  <a name="cfn-kinesis-stream-maxrecordsizeinkib"></a>
The maximum record size of a single record in kibibyte (KiB) that you can write to, and read from a stream.  
*Required*: No  
*Type*: Integer  
*Minimum*: `1024`  
*Maximum*: `10240`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Name`  <a name="cfn-kinesis-stream-name"></a>
The name of the Kinesis stream. If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the stream name. For more information, see [Name Type](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-name.html).   
If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.   
*Required*: No  
*Type*: String  
*Pattern*: `^[a-zA-Z0-9_.-]+$`  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`RetentionPeriodHours`  <a name="cfn-kinesis-stream-retentionperiodhours"></a>
The number of hours for the data records that are stored in shards to remain accessible. The default value is 24. For more information about the stream retention period, see [Changing the Data Retention Period](https://docs.aws.amazon.com/streams/latest/dev/kinesis-extended-retention.html) in the Amazon Kinesis Developer Guide.   
*Required*: No  
*Type*: Integer  
*Minimum*: `24`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ShardCount`  <a name="cfn-kinesis-stream-shardcount"></a>
The number of shards that the stream uses. For greater provisioned throughput, increase the number of shards.   
*Required*: No  
*Type*: Integer  
*Minimum*: `1`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`StreamEncryption`  <a name="cfn-kinesis-stream-streamencryption"></a>
When specified, enables or updates server-side encryption using an AWS KMS key for a specified stream. Removing this property from your stack template and updating your stack disables encryption.  
*Required*: No  
*Type*: [StreamEncryption](aws-properties-kinesis-stream-streamencryption.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`StreamModeDetails`  <a name="cfn-kinesis-stream-streammodedetails"></a>
 Specifies the capacity mode to which you want to set your data stream. Currently, in Kinesis Data Streams, you can choose between an **on-demand** capacity mode and a **provisioned** capacity mode for your data streams.   
*Required*: No  
*Type*: [StreamModeDetails](aws-properties-kinesis-stream-streammodedetails.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Tags`  <a name="cfn-kinesis-stream-tags"></a>
An arbitrary set of tags (key–value pairs) to associate with the Kinesis stream. For information about constraints for this property, see [Tag Restrictions](https://docs.aws.amazon.com/streams/latest/dev/tagging.html#tagging-restrictions) in the *Amazon Kinesis Developer Guide*.   
*Required*: No  
*Type*: Array of [Tag](aws-properties-kinesis-stream-tag.md)  
*Maximum*: `50`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`WarmThroughputMiBps`  <a name="cfn-kinesis-stream-warmthroughputmibps"></a>
The target warm throughput in MB/s that the stream should be scaled to handle. This represents the throughput capacity that will be immediately available for write operations.  
*Required*: No  
*Type*: Integer  
*Minimum*: `0`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-kinesis-stream-return-values"></a>

### Ref
<a name="aws-resource-kinesis-stream-return-values-ref"></a>

 When you specify an AWS::Kinesis::Stream resource as an argument to the `Ref` function, AWS CloudFormation returns the stream name (physical ID).

For more information about using the Ref function, see [Ref](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-ref.html). 

### Fn::GetAtt
<a name="aws-resource-kinesis-stream-return-values-fn--getatt"></a>

`Fn::GetAtt` returns a value for the `Arn` attribute.

For more information about using Fn::GetAtt, see [Fn::GetAtt](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-getatt.html). 

#### 
<a name="aws-resource-kinesis-stream-return-values-fn--getatt-fn--getatt"></a>

`Arn`  <a name="Arn-fn::getatt"></a>
The Amazon resource name (ARN) of the Kinesis stream, such as `arn:aws:kinesis:us-east-2:123456789012:stream/mystream`.

## Examples
<a name="aws-resource-kinesis-stream--examples"></a>



### Create a Stream
<a name="aws-resource-kinesis-stream--examples--Create_a_Stream"></a>

The following example creates a `Stream` resource that uses three shards, sets a seven-day retention period, and specifies the KMS key for server-side encryption.

#### JSON
<a name="aws-resource-kinesis-stream--examples--Create_a_Stream--json"></a>

```
"MyStream": { 
    "Type": "AWS::Kinesis::Stream", 
    "Properties": {
        "Name": "MyKinesisStream", 
        "RetentionPeriodHours" : 168, 
        "ShardCount": 3,
        "StreamEncryption": { 
            "EncryptionType": "KMS", 
            "KeyId": "!Ref myKey" 
            }, 
        "Tags": [ {
            "Key": "Environment", 
            "Value": "Production" } ] 
        } 
}
```

#### YAML
<a name="aws-resource-kinesis-stream--examples--Create_a_Stream--yaml"></a>

```
MyStream: 
    Type: AWS::Kinesis::Stream 
    Properties: 
        Name: MyKinesisStream 
        RetentionPeriodHours: 168 
        ShardCount: 3 
        StreamEncryption:
            EncryptionType: KMS 
            KeyId: !Ref myKey 
        Tags: 
            -
                Key: Environment Value:
                Production
```

# AWS::Kinesis::Stream StreamEncryption
<a name="aws-properties-kinesis-stream-streamencryption"></a>

Enables or updates server-side encryption using an AWS KMS key for a specified stream. 

**Note**  
When invoking this API, you must use either the `StreamARN` or the `StreamName` parameter, or both. It is recommended that you use the `StreamARN` input parameter when you invoke this API.

Starting encryption is an asynchronous operation. Upon receiving the request, Kinesis Data Streams returns immediately and sets the status of the stream to `UPDATING`. After the update is complete, Kinesis Data Streams sets the status of the stream back to `ACTIVE`. Updating or applying encryption normally takes a few seconds to complete, but it can take minutes. You can continue to read and write data to your stream while its status is `UPDATING`. Once the status of the stream is `ACTIVE`, encryption begins for records written to the stream. 

API Limits: You can successfully apply a new AWS KMS key for server-side encryption 25 times in a rolling 24-hour period.

Note: It can take up to 5 seconds after the stream is in an `ACTIVE` status before all records written to the stream are encrypted. After you enable encryption, you can verify that encryption is applied by inspecting the API response from `PutRecord` or `PutRecords`.

## Syntax
<a name="aws-properties-kinesis-stream-streamencryption-syntax"></a>

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

### JSON
<a name="aws-properties-kinesis-stream-streamencryption-syntax.json"></a>

```
{
  "[EncryptionType](#cfn-kinesis-stream-streamencryption-encryptiontype)" : String,
  "[KeyId](#cfn-kinesis-stream-streamencryption-keyid)" : String
}
```

### YAML
<a name="aws-properties-kinesis-stream-streamencryption-syntax.yaml"></a>

```
  [EncryptionType](#cfn-kinesis-stream-streamencryption-encryptiontype): String
  [KeyId](#cfn-kinesis-stream-streamencryption-keyid): String
```

## Properties
<a name="aws-properties-kinesis-stream-streamencryption-properties"></a>

`EncryptionType`  <a name="cfn-kinesis-stream-streamencryption-encryptiontype"></a>
The encryption type to use. The only valid value is `KMS`.   
*Required*: Yes  
*Type*: String  
*Allowed values*: `KMS`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`KeyId`  <a name="cfn-kinesis-stream-streamencryption-keyid"></a>
The GUID for the customer-managed AWS KMS key to use for encryption. This value can be a globally unique identifier, a fully specified Amazon Resource Name (ARN) to either an alias or a key, or an alias name prefixed by "alias/".You can also use a master key owned by Kinesis Data Streams by specifying the alias `aws/kinesis`.  
+ Key ARN example: `arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012`
+ Alias ARN example: `arn:aws:kms:us-east-1:123456789012:alias/MyAliasName`
+ Globally unique key ID example: `12345678-1234-1234-1234-123456789012`
+ Alias name example: `alias/MyAliasName`
+ Master key owned by Kinesis Data Streams: `alias/aws/kinesis`
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `2048`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Kinesis::Stream StreamModeDetails
<a name="aws-properties-kinesis-stream-streammodedetails"></a>

 Specifies the capacity mode to which you want to set your data stream. Currently, in Kinesis Data Streams, you can choose between an **on-demand** capacity mode and a **provisioned** capacity mode for your data streams. 

## Syntax
<a name="aws-properties-kinesis-stream-streammodedetails-syntax"></a>

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

### JSON
<a name="aws-properties-kinesis-stream-streammodedetails-syntax.json"></a>

```
{
  "[StreamMode](#cfn-kinesis-stream-streammodedetails-streammode)" : String
}
```

### YAML
<a name="aws-properties-kinesis-stream-streammodedetails-syntax.yaml"></a>

```
  [StreamMode](#cfn-kinesis-stream-streammodedetails-streammode): String
```

## Properties
<a name="aws-properties-kinesis-stream-streammodedetails-properties"></a>

`StreamMode`  <a name="cfn-kinesis-stream-streammodedetails-streammode"></a>
 Specifies the capacity mode to which you want to set your data stream. Currently, in Kinesis Data Streams, you can choose between an **on-demand** capacity mode and a **provisioned** capacity mode for your data streams.   
*Required*: Yes  
*Type*: String  
*Allowed values*: `ON_DEMAND | PROVISIONED`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Kinesis::Stream Tag
<a name="aws-properties-kinesis-stream-tag"></a>

Metadata assigned to the stream or consumer, consisting of a key-value pair.

## Syntax
<a name="aws-properties-kinesis-stream-tag-syntax"></a>

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

### JSON
<a name="aws-properties-kinesis-stream-tag-syntax.json"></a>

```
{
  "[Key](#cfn-kinesis-stream-tag-key)" : String,
  "[Value](#cfn-kinesis-stream-tag-value)" : String
}
```

### YAML
<a name="aws-properties-kinesis-stream-tag-syntax.yaml"></a>

```
  [Key](#cfn-kinesis-stream-tag-key): String
  [Value](#cfn-kinesis-stream-tag-value): String
```

## Properties
<a name="aws-properties-kinesis-stream-tag-properties"></a>

`Key`  <a name="cfn-kinesis-stream-tag-key"></a>
A unique identifier for the tag. Maximum length: 128 characters. Valid characters: Unicode letters, digits, white space, \$1 . / = \$1 - % @  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-kinesis-stream-tag-value"></a>
An optional string, typically used to describe or define the tag. Maximum length: 256 characters. Valid characters: Unicode letters, digits, white space, \$1 . / = \$1 - % @  
*Required*: Yes  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `255`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Kinesis::Stream WarmThroughputObject
<a name="aws-properties-kinesis-stream-warmthroughputobject"></a>

Represents the warm throughput configuration on the stream. This is only present for On-Demand Kinesis Data Streams in accounts that have `MinimumThroughputBillingCommitment` enabled.

## Syntax
<a name="aws-properties-kinesis-stream-warmthroughputobject-syntax"></a>

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

### JSON
<a name="aws-properties-kinesis-stream-warmthroughputobject-syntax.json"></a>

```
{
  "[CurrentMiBps](#cfn-kinesis-stream-warmthroughputobject-currentmibps)" : Integer,
  "[TargetMiBps](#cfn-kinesis-stream-warmthroughputobject-targetmibps)" : Integer
}
```

### YAML
<a name="aws-properties-kinesis-stream-warmthroughputobject-syntax.yaml"></a>

```
  [CurrentMiBps](#cfn-kinesis-stream-warmthroughputobject-currentmibps): Integer
  [TargetMiBps](#cfn-kinesis-stream-warmthroughputobject-targetmibps): Integer
```

## Properties
<a name="aws-properties-kinesis-stream-warmthroughputobject-properties"></a>

`CurrentMiBps`  <a name="cfn-kinesis-stream-warmthroughputobject-currentmibps"></a>
The current warm throughput value on the stream. This is the write throughput in MiBps that the stream is currently scaled to handle.  
*Required*: No  
*Type*: Integer  
*Minimum*: `0`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TargetMiBps`  <a name="cfn-kinesis-stream-warmthroughputobject-targetmibps"></a>
The target warm throughput value on the stream. This indicates that the stream is currently scaling towards this target value.  
*Required*: No  
*Type*: Integer  
*Minimum*: `0`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Kinesis::StreamConsumer
<a name="aws-resource-kinesis-streamconsumer"></a>

Use the AWS CloudFormation `AWS::Kinesis::StreamConsumer` resource to register a consumer with a Kinesis data stream. The consumer you register can then call [SubscribeToShard](https://docs.aws.amazon.com/kinesis/latest/APIReference/API_SubscribeToShard.html) to receive data from the stream using enhanced fan-out, at a rate of up to 2 MiB per second for every shard you subscribe to. This rate is unaffected by the total number of consumers that read from the same stream. 

You can register up to 20 consumers per stream. However, you can request a limit increase using the [Kinesis Data Streams limits form](https://console.aws.amazon.com/support/v1?#/). A given consumer can only be registered with one stream at a time. 

For more information, see [Using Consumers with Enhanced Fan-Out](https://docs.aws.amazon.com/streams/latest/dev/introduction-to-enhanced-consumers.html). 

## Syntax
<a name="aws-resource-kinesis-streamconsumer-syntax"></a>

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

### JSON
<a name="aws-resource-kinesis-streamconsumer-syntax.json"></a>

```
{
  "Type" : "AWS::Kinesis::StreamConsumer",
  "Properties" : {
      "[ConsumerName](#cfn-kinesis-streamconsumer-consumername)" : String,
      "[StreamARN](#cfn-kinesis-streamconsumer-streamarn)" : String,
      "[Tags](#cfn-kinesis-streamconsumer-tags)" : [ Tag, ... ]
    }
}
```

### YAML
<a name="aws-resource-kinesis-streamconsumer-syntax.yaml"></a>

```
Type: AWS::Kinesis::StreamConsumer
Properties:
  [ConsumerName](#cfn-kinesis-streamconsumer-consumername): String
  [StreamARN](#cfn-kinesis-streamconsumer-streamarn): String
  [Tags](#cfn-kinesis-streamconsumer-tags): 
    - Tag
```

## Properties
<a name="aws-resource-kinesis-streamconsumer-properties"></a>

`ConsumerName`  <a name="cfn-kinesis-streamconsumer-consumername"></a>
The name of the consumer is something you choose when you register the consumer.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^[a-zA-Z0-9_.-]+$`  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`StreamARN`  <a name="cfn-kinesis-streamconsumer-streamarn"></a>
The ARN of the stream with which you registered the consumer.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^arn:aws.*:kinesis:.*:\d{12}:stream/\S+`  
*Minimum*: `1`  
*Maximum*: `2048`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Tags`  <a name="cfn-kinesis-streamconsumer-tags"></a>
An array of tags to be added to a specified Kinesis resource. A tag consists of a required key and an optional value. You can specify up to 50 tag key-value pairs.  
*Required*: No  
*Type*: Array of [Tag](aws-properties-kinesis-streamconsumer-tag.md)  
*Maximum*: `50`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Return values
<a name="aws-resource-kinesis-streamconsumer-return-values"></a>

### Ref
<a name="aws-resource-kinesis-streamconsumer-return-values-ref"></a>

When you pass the logical ID of an `AWS::Kinesis::StreamConsumer` resource to the intrinsic Ref function, the function returns the consumer ARN. For example ARN formats, see [Example ARNs](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arns-syntax). 

For more information about using the Ref function, see [Ref](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-ref.html). 

### Fn::GetAtt
<a name="aws-resource-kinesis-streamconsumer-return-values-fn--getatt"></a>

`Fn::GetAtt` 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 Fn::GetAtt, see [Fn::GetAtt](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-getatt.html). 

#### 
<a name="aws-resource-kinesis-streamconsumer-return-values-fn--getatt-fn--getatt"></a>

`ConsumerARN`  <a name="ConsumerARN-fn::getatt"></a>
When you register a consumer, Kinesis Data Streams generates an ARN for it. You need this ARN to be able to call [SubscribeToShard](https://docs.aws.amazon.com/kinesis/latest/APIReference/API_SubscribeToShard.html).   
If you delete a consumer and then create a new one with the same name, it won't have the same ARN. That's because consumer ARNs contain the creation timestamp. This is important to keep in mind if you have IAM policies that reference consumer ARNs. 

`ConsumerCreationTimestamp`  <a name="ConsumerCreationTimestamp-fn::getatt"></a>
The time at which the consumer was created.

`ConsumerName`  <a name="ConsumerName-fn::getatt"></a>
The name you gave the consumer when you registered it.

`ConsumerStatus`  <a name="ConsumerStatus-fn::getatt"></a>
A consumer can't read data while in the `CREATING` or `DELETING` states.

`StreamARN`  <a name="StreamARN-fn::getatt"></a>
The ARN of the data stream with which the consumer is registered.

## Examples
<a name="aws-resource-kinesis-streamconsumer--examples"></a>



### Register a Consumer with a Kinesis Data Stream
<a name="aws-resource-kinesis-streamconsumer--examples--Register_a_Consumer_with_a_Kinesis_Data_Stream"></a>



#### JSON
<a name="aws-resource-kinesis-streamconsumer--examples--Register_a_Consumer_with_a_Kinesis_Data_Stream--json"></a>

```
{ 
    "Parameters": { 
        "TestStreamARN": { 
            "Type": "String" },
        "TestConsumerName": { 
            "Type": "String" } }, 
    "Resources": { 
        "StreamConsumer": {
            "Type": "AWS::Kinesis::StreamConsumer", 
            "Properties": { 
                "StreamARN": { "Ref" : TestStreamARN }, 
                "ConsumerName": { "Ref" : TestConsumerName } 
                } 
        } 
   } 
}
```

#### YAML
<a name="aws-resource-kinesis-streamconsumer--examples--Register_a_Consumer_with_a_Kinesis_Data_Stream--yaml"></a>

```
    Parameters: 
        TestStreamARN: 
            Type: String 
        TestConsumerName:
            Type: String 
            
    Resources: StreamConsumer: 
        Type: "AWS::Kinesis::StreamConsumer"
        Properties: 
            StreamARN: !Ref TestStreamARN 
            ConsumerName: !Ref TestConsumerName
```

# AWS::Kinesis::StreamConsumer Tag
<a name="aws-properties-kinesis-streamconsumer-tag"></a>

Metadata assigned to the stream or consumer, consisting of a key-value pair.

## Syntax
<a name="aws-properties-kinesis-streamconsumer-tag-syntax"></a>

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

### JSON
<a name="aws-properties-kinesis-streamconsumer-tag-syntax.json"></a>

```
{
  "[Key](#cfn-kinesis-streamconsumer-tag-key)" : String,
  "[Value](#cfn-kinesis-streamconsumer-tag-value)" : String
}
```

### YAML
<a name="aws-properties-kinesis-streamconsumer-tag-syntax.yaml"></a>

```
  [Key](#cfn-kinesis-streamconsumer-tag-key): String
  [Value](#cfn-kinesis-streamconsumer-tag-value): String
```

## Properties
<a name="aws-properties-kinesis-streamconsumer-tag-properties"></a>

`Key`  <a name="cfn-kinesis-streamconsumer-tag-key"></a>
A unique identifier for the tag. The maximum length for a tag key is 128 characters.  
A tag key can only contain the following:  
+ Unicode letters
+ Digits
+ White space
+ One or more of these symbols: `_`, `.`, `/`, `=`, `+`, `-`, `%`, `@`
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Value`  <a name="cfn-kinesis-streamconsumer-tag-value"></a>
An optional string, typically used to describe or define the tag. The maximum length for a tag value is 256 characters.  
A tag value can only contain the following:  
+ Unicode letters
+ Digits
+ White space
+ One or more of these symbols: `_`, `.`, `/`, `=`, `+`, `-`, `%`, `@`
*Required*: Yes  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `255`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)