CreateDeliveryStream
Creates a Kinesis Data Firehose delivery stream.
By default, you can create up to 50 delivery streams per AWS Region.
This is an asynchronous operation that immediately returns.
The initial status of the delivery stream is CREATING. After the
delivery stream is created, its status is ACTIVE and it now accepts data.
Attempts to send data to a delivery stream that is not in the ACTIVE state
cause an exception. To check the state of a delivery stream, use DescribeDeliveryStream.
A Kinesis Data Firehose delivery stream can be configured to receive records directly
from providers using PutRecord or PutRecordBatch, or it
can be configured to use an existing Kinesis stream as its source. To specify a Kinesis
data stream as input, set the DeliveryStreamType parameter to
KinesisStreamAsSource, and provide the Kinesis stream Amazon Resource Name
(ARN) and role ARN in the KinesisStreamSourceConfiguration
parameter.
A delivery stream is configured with a single destination: Amazon S3, Amazon ES,
Amazon Redshift, or Splunk. You must specify only one of the following destination
configuration parameters: ExtendedS3DestinationConfiguration,
S3DestinationConfiguration,
ElasticsearchDestinationConfiguration,
RedshiftDestinationConfiguration, or
SplunkDestinationConfiguration.
When you specify S3DestinationConfiguration, you can also provide the
following optional values: BufferingHints, EncryptionConfiguration, and
CompressionFormat. By default, if no BufferingHints value is
provided, Kinesis Data Firehose buffers data up to 5 MB or for 5 minutes, whichever
condition is satisfied first. BufferingHints is a hint, so there are some
cases where the service cannot adhere to these conditions strictly. For example, record
boundaries might be such that the size is a little over or under the configured buffering
size. By default, no encryption is performed. We strongly recommend that you enable
encryption to ensure secure data storage in Amazon S3.
A few notes about Amazon Redshift as a destination:
-
An Amazon Redshift destination requires an S3 bucket as intermediate location. Kinesis Data Firehose first delivers data to Amazon S3 and then uses
COPYsyntax to load data into an Amazon Redshift table. This is specified in theRedshiftDestinationConfiguration.S3Configurationparameter. -
The compression formats
SNAPPYorZIPcannot be specified inRedshiftDestinationConfiguration.S3Configurationbecause the Amazon RedshiftCOPYoperation that reads from the S3 bucket doesn't support these compression formats. -
We strongly recommend that you use the user name and password you provide exclusively with Kinesis Data Firehose, and that the permissions for the account are restricted for Amazon Redshift
INSERTpermissions.
Kinesis Data Firehose assumes the IAM role that is configured as part of the destination. The role should allow the Kinesis Data Firehose principal to assume the role, and the role should have permissions that allow the service to deliver the data. For more information, see Grant Kinesis Data Firehose Access to an Amazon S3 Destination in the Amazon Kinesis Data Firehose Developer Guide.
Request Syntax
{ "DeliveryStreamName": "string", "DeliveryStreamType": "string", "ElasticsearchDestinationConfiguration": { "BufferingHints": { "IntervalInSeconds":number, "SizeInMBs":number}, "CloudWatchLoggingOptions": { "Enabled":boolean, "LogGroupName": "string", "LogStreamName": "string" }, "ClusterEndpoint": "string", "DomainARN": "string", "IndexName": "string", "IndexRotationPeriod": "string", "ProcessingConfiguration": { "Enabled":boolean, "Processors": [ { "Parameters": [ { "ParameterName": "string", "ParameterValue": "string" } ], "Type": "string" } ] }, "RetryOptions": { "DurationInSeconds":number}, "RoleARN": "string", "S3BackupMode": "string", "S3Configuration": { "BucketARN": "string", "BufferingHints": { "IntervalInSeconds":number, "SizeInMBs":number}, "CloudWatchLoggingOptions": { "Enabled":boolean, "LogGroupName": "string", "LogStreamName": "string" }, "CompressionFormat": "string", "EncryptionConfiguration": { "KMSEncryptionConfig": { "AWSKMSKeyARN": "string" }, "NoEncryptionConfig": "string" }, "ErrorOutputPrefix": "string", "Prefix": "string", "RoleARN": "string" }, "TypeName": "string" }, "ExtendedS3DestinationConfiguration": { "BucketARN": "string", "BufferingHints": { "IntervalInSeconds":number, "SizeInMBs":number}, "CloudWatchLoggingOptions": { "Enabled":boolean, "LogGroupName": "string", "LogStreamName": "string" }, "CompressionFormat": "string", "DataFormatConversionConfiguration": { "Enabled":boolean, "InputFormatConfiguration": { "Deserializer": { "HiveJsonSerDe": { "TimestampFormats": [ "string" ] }, "OpenXJsonSerDe": { "CaseInsensitive":boolean, "ColumnToJsonKeyMappings": { "string" : "string" }, "ConvertDotsInJsonKeysToUnderscores":boolean} } }, "OutputFormatConfiguration": { "Serializer": { "OrcSerDe": { "BlockSizeBytes":number, "BloomFilterColumns": [ "string" ], "BloomFilterFalsePositiveProbability":number, "Compression": "string", "DictionaryKeyThreshold":number, "EnablePadding":boolean, "FormatVersion": "string", "PaddingTolerance":number, "RowIndexStride":number, "StripeSizeBytes":number}, "ParquetSerDe": { "BlockSizeBytes":number, "Compression": "string", "EnableDictionaryCompression":boolean, "MaxPaddingBytes":number, "PageSizeBytes":number, "WriterVersion": "string" } } }, "SchemaConfiguration": { "CatalogId": "string", "DatabaseName": "string", "Region": "string", "RoleARN": "string", "TableName": "string", "VersionId": "string" } }, "EncryptionConfiguration": { "KMSEncryptionConfig": { "AWSKMSKeyARN": "string" }, "NoEncryptionConfig": "string" }, "ErrorOutputPrefix": "string", "Prefix": "string", "ProcessingConfiguration": { "Enabled":boolean, "Processors": [ { "Parameters": [ { "ParameterName": "string", "ParameterValue": "string" } ], "Type": "string" } ] }, "RoleARN": "string", "S3BackupConfiguration": { "BucketARN": "string", "BufferingHints": { "IntervalInSeconds":number, "SizeInMBs":number}, "CloudWatchLoggingOptions": { "Enabled":boolean, "LogGroupName": "string", "LogStreamName": "string" }, "CompressionFormat": "string", "EncryptionConfiguration": { "KMSEncryptionConfig": { "AWSKMSKeyARN": "string" }, "NoEncryptionConfig": "string" }, "ErrorOutputPrefix": "string", "Prefix": "string", "RoleARN": "string" }, "S3BackupMode": "string" }, "KinesisStreamSourceConfiguration": { "KinesisStreamARN": "string", "RoleARN": "string" }, "RedshiftDestinationConfiguration": { "CloudWatchLoggingOptions": { "Enabled":boolean, "LogGroupName": "string", "LogStreamName": "string" }, "ClusterJDBCURL": "string", "CopyCommand": { "CopyOptions": "string", "DataTableColumns": "string", "DataTableName": "string" }, "Password": "string", "ProcessingConfiguration": { "Enabled":boolean, "Processors": [ { "Parameters": [ { "ParameterName": "string", "ParameterValue": "string" } ], "Type": "string" } ] }, "RetryOptions": { "DurationInSeconds":number}, "RoleARN": "string", "S3BackupConfiguration": { "BucketARN": "string", "BufferingHints": { "IntervalInSeconds":number, "SizeInMBs":number}, "CloudWatchLoggingOptions": { "Enabled":boolean, "LogGroupName": "string", "LogStreamName": "string" }, "CompressionFormat": "string", "EncryptionConfiguration": { "KMSEncryptionConfig": { "AWSKMSKeyARN": "string" }, "NoEncryptionConfig": "string" }, "ErrorOutputPrefix": "string", "Prefix": "string", "RoleARN": "string" }, "S3BackupMode": "string", "S3Configuration": { "BucketARN": "string", "BufferingHints": { "IntervalInSeconds":number, "SizeInMBs":number}, "CloudWatchLoggingOptions": { "Enabled":boolean, "LogGroupName": "string", "LogStreamName": "string" }, "CompressionFormat": "string", "EncryptionConfiguration": { "KMSEncryptionConfig": { "AWSKMSKeyARN": "string" }, "NoEncryptionConfig": "string" }, "ErrorOutputPrefix": "string", "Prefix": "string", "RoleARN": "string" }, "Username": "string" }, "S3DestinationConfiguration": { "BucketARN": "string", "BufferingHints": { "IntervalInSeconds":number, "SizeInMBs":number}, "CloudWatchLoggingOptions": { "Enabled":boolean, "LogGroupName": "string", "LogStreamName": "string" }, "CompressionFormat": "string", "EncryptionConfiguration": { "KMSEncryptionConfig": { "AWSKMSKeyARN": "string" }, "NoEncryptionConfig": "string" }, "ErrorOutputPrefix": "string", "Prefix": "string", "RoleARN": "string" }, "SplunkDestinationConfiguration": { "CloudWatchLoggingOptions": { "Enabled":boolean, "LogGroupName": "string", "LogStreamName": "string" }, "HECAcknowledgmentTimeoutInSeconds":number, "HECEndpoint": "string", "HECEndpointType": "string", "HECToken": "string", "ProcessingConfiguration": { "Enabled":boolean, "Processors": [ { "Parameters": [ { "ParameterName": "string", "ParameterValue": "string" } ], "Type": "string" } ] }, "RetryOptions": { "DurationInSeconds":number}, "S3BackupMode": "string", "S3Configuration": { "BucketARN": "string", "BufferingHints": { "IntervalInSeconds":number, "SizeInMBs":number}, "CloudWatchLoggingOptions": { "Enabled":boolean, "LogGroupName": "string", "LogStreamName": "string" }, "CompressionFormat": "string", "EncryptionConfiguration": { "KMSEncryptionConfig": { "AWSKMSKeyARN": "string" }, "NoEncryptionConfig": "string" }, "ErrorOutputPrefix": "string", "Prefix": "string", "RoleARN": "string" } }, "Tags": [ { "Key": "string", "Value": "string" } ] }
Request Parameters
The request accepts the following data in JSON format.
- DeliveryStreamName
-
The name of the delivery stream. This name must be unique per AWS account in the same AWS Region. If the delivery streams are in different accounts or different Regions, you can have multiple delivery streams with the same name.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 64.
Pattern:
[a-zA-Z0-9_.-]+Required: Yes
- DeliveryStreamType
-
The delivery stream type. This parameter can be one of the following values:
-
DirectPut: Provider applications access the delivery stream directly. -
KinesisStreamAsSource: The delivery stream uses a Kinesis data stream as a source.
Type: String
Valid Values:
DirectPut | KinesisStreamAsSourceRequired: No
-
- ElasticsearchDestinationConfiguration
-
The destination in Amazon ES. You can specify only one destination.
Type: ElasticsearchDestinationConfiguration object
Required: No
- ExtendedS3DestinationConfiguration
-
The destination in Amazon S3. You can specify only one destination.
Type: ExtendedS3DestinationConfiguration object
Required: No
- KinesisStreamSourceConfiguration
-
When a Kinesis data stream is used as the source for the delivery stream, a KinesisStreamSourceConfiguration containing the Kinesis data stream Amazon Resource Name (ARN) and the role ARN for the source stream.
Type: KinesisStreamSourceConfiguration object
Required: No
- RedshiftDestinationConfiguration
-
The destination in Amazon Redshift. You can specify only one destination.
Type: RedshiftDestinationConfiguration object
Required: No
- S3DestinationConfiguration
-
[Deprecated] The destination in Amazon S3. You can specify only one destination.
Type: S3DestinationConfiguration object
Required: No
- SplunkDestinationConfiguration
-
The destination in Splunk. You can specify only one destination.
Type: SplunkDestinationConfiguration object
Required: No
- Tags
-
A set of tags to assign to the delivery stream. A tag is a key-value pair that you can define and assign to AWS resources. Tags are metadata. For example, you can add friendly names and descriptions or other types of information that can help you distinguish the delivery stream. For more information about tags, see Using Cost Allocation Tags in the AWS Billing and Cost Management User Guide.
You can specify up to 50 tags when creating a delivery stream.
Type: Array of Tag objects
Array Members: Minimum number of 1 item. Maximum number of 50 items.
Required: No
Response Syntax
{ "DeliveryStreamARN": "string" }
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- DeliveryStreamARN
-
The ARN of the delivery stream.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 512.
Pattern:
arn:.*
Errors
For information about the errors that are common to all actions, see Common Errors.
- InvalidArgumentException
-
The specified input parameter has a value that is not valid.
HTTP Status Code: 400
- LimitExceededException
-
You have already reached the limit for a requested resource.
HTTP Status Code: 400
- ResourceInUseException
-
The resource is already in use and not available for this operation.
HTTP Status Code: 400
Example
The following JSON example creates a delivery stream named
exampleStreamName with an Amazon S3 destination. To use this example,
first replace the placeholders for the RoleARN and
BucketARN keys with valid strings. For more information, see Amazon Resource Names (ARNs) and AWS Service Namespaces.
Sample Request
POST / HTTP/1.1 Host: firehose.<region>.<domain> Content-Length: <PayloadSizeBytes> User-Agent: <UserAgentString> Content-Type: application/x-amz-json-1.1 Authorization: <AuthParams> Connection: Keep-Alive X-Amz-Date: <Date> X-Amz-Target: Firehose_20150804.CreateDeliveryStream { "DeliveryStreamName": "exampleStreamName", "S3DestinationConfiguration": { "RoleARN": "insert-role-ARN", "BucketARN": "insert-bucket-ARN", "BufferingHints": { "SizeInMBs": 3, "IntervalInSeconds": 60 }, "CompressionFormat": "ZIP" } }
Sample Response
HTTP/1.1 200 OK x-amzn-RequestId: <RequestId> Content-Type: application/x-amz-json-1.1 Content-Length: <PayloadSizeBytes> Date: <Date> { "DeliveryStreamARN": "arn:aws:firehose:us-east-1:814985986679:deliverystream/exampleStreamName" }
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:


