2015-05-27 21:17:26 +02:00
---
layout: "aws"
page_title: "AWS: aws_kinesis_stream"
sidebar_current: "docs-aws-resource-kinesis-stream"
description: |-
Provides a AWS Kinesis Stream
---
# aws\_kinesis\_stream
2017-02-18 23:48:50 +01:00
Provides a Kinesis Stream resource. Amazon Kinesis is a managed service that
2015-05-27 21:17:26 +02:00
scales elastically for real-time processing of streaming big data.
For more details, see the [Amazon Kinesis Documentation][1].
## Example Usage
2017-04-17 12:17:54 +02:00
```hcl
2015-05-27 21:17:26 +02:00
resource "aws_kinesis_stream" "test_stream" {
2017-02-18 23:48:50 +01:00
name = "terraform-kinesis-test"
shard_count = 1
retention_period = 48
shard_level_metrics = [
"IncomingBytes",
"OutgoingBytes",
]
tags {
Environment = "test"
}
2015-05-27 21:17:26 +02:00
}
```
## Argument Reference
The following arguments are supported:
2017-02-18 23:48:50 +01:00
* `name` - (Required) A name to identify the stream. This is unique to the
2015-05-27 21:17:26 +02:00
AWS account and region the Stream is created in.
* `shard_count` – (Required) The number of shards that the stream will use.
2017-02-18 23:48:50 +01:00
Amazon has guidlines for specifying the Stream size that should be referenced
2015-05-27 21:17:26 +02:00
when creating a Kinesis stream. See [Amazon Kinesis Streams][2] for more.
2016-02-19 23:10:55 +01:00
* `retention_period` - (Optional) Length of time data records are accessible after they are added to the stream. The maximum value of a stream's retention period is 168 hours. Minimum value is 24. Default is 24.
2016-07-22 00:37:58 +02:00
* `shard_level_metrics` - (Optional) A list of shard-level CloudWatch metrics which can be enabled for the stream. See [Monitoring with CloudWatch][3] for more. Note that the value ALL should not be used; instead you should provide an explicit list of metrics you wish to enable.
2015-10-03 01:11:49 +02:00
* `tags` - (Optional) A mapping of tags to assign to the resource.
2015-05-27 21:17:26 +02:00
## Attributes Reference
* `id` - The unique Stream id
* `name` - The unique Stream name (same as `id` )
* `shard_count` - The count of Shards for this Stream
* `arn` - The Amazon Resource Name (ARN) specifying the Stream
2017-05-08 13:11:23 +02:00
## Import
Kinesis Streams can be imported using the `name` , e.g.
```
$ terraform import aws_kinesis_stream.test_stream terraform-kinesis-test
```
2016-01-14 21:55:39 +01:00
[1]: https://aws.amazon.com/documentation/kinesis/
[2]: https://docs.aws.amazon.com/kinesis/latest/dev/amazon-kinesis-streams.html
2016-07-22 00:37:58 +02:00
[3]: https://docs.aws.amazon.com/streams/latest/dev/monitoring-with-cloudwatch.html
2017-05-08 13:11:23 +02:00