"Key": "string", "Value": "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.
HasMoreTags (p. 33)
If this is true in the response, more tags are available. To list the remaining tags, set ExclusiveStartTagKey to the key of the last tag returned and call ListTagsForDeliveryStream again.
Type: Boolean Tags (p. 33)
A list of tags associated with DeliveryStreamName, starting with the first tag after ExclusiveStartTagKey and up to the specified Limit.
Type: Array of Tag (p. 176) objects
Array Members: Minimum number of 0 items. Maximum number of 50 items.
Errors
For information about the errors that are common to all actions, see Common Errors (p. 181).
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 ResourceNotFoundException
The specified resource could not be found.
HTTP Status Code: 400
Examples
To list the tags for a stream
The following JSON example lists the tags for the specified delivery stream.
See Also
"DeliveryStreamName": "exampleDeliveryStreamName"
}
"HasMoreTags": "false", "Tags" : [
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS Command Line Interface
• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3
PutRecord
PutRecord
Writes a single data record into an Amazon Kinesis Data Firehose delivery stream. To write multiple data records into a delivery stream, use PutRecordBatch (p. 40). Applications using these operations are referred to as producers.
By default, each delivery stream can take in up to 2,000 transactions per second, 5,000 records per second, or 5 MB per second. If you use PutRecord (p. 36) and PutRecordBatch (p. 40), the limits are an aggregate across these two operations for each delivery stream. For more information about limits and how to request an increase, see Amazon Kinesis Data Firehose Limits.
You must specify the name of the delivery stream and the data record when using PutRecord (p. 36).
The data record consists of a data blob that can be up to 1,000 KiB in size, and any kind of data. For example, it can be a segment from a log file, geographic location data, website clickstream data, and so on.
Kinesis Data Firehose buffers records before delivering them to the destination. To disambiguate the data blobs at the destination, a common solution is to use delimiters in the data, such as a newline (\n) or some other character unique within the data. This allows the consumer application to parse individual data items when reading the data from the destination.
The PutRecord operation returns a RecordId, which is a unique string assigned to each record.
Producer applications can use this ID for purposes such as auditability and investigation.
If the PutRecord operation throws a ServiceUnavailableException, back off and retry. If the exception persists, it is possible that the throughput limits have been exceeded for the delivery stream.
Data records sent to Kinesis Data Firehose are stored for 24 hours from the time they are added to a delivery stream as it tries to send the records to the destination. If the destination is unreachable for more than 24 hours, the data is no longer available.
Important
Don't concatenate two or more base64 strings to form the data fields of your records. Instead, concatenate the raw data, then perform base64 encoding.
Request Syntax
{ "DeliveryStreamName": "string", "Record": {
"Data": blob }
}
Request Parameters
The request accepts the following data in JSON format.
DeliveryStreamName (p. 36) The name of the delivery stream.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 64.
Pattern: [a-zA-Z0-9_.-]+
Response Syntax
Required: Yes Record (p. 36)
The record.
Type: Record (p. 148) object Required: Yes
Response Syntax
{
"Encrypted": boolean, "RecordId": "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.
Encrypted (p. 37)
Indicates whether server-side encryption (SSE) was enabled during this operation.
Type: Boolean RecordId (p. 37)
The ID of the record.
Type: String
Length Constraints: Minimum length of 1.
Errors
For information about the errors that are common to all actions, see Common Errors (p. 181).
InvalidArgumentException
The specified input parameter has a value that is not valid.
HTTP Status Code: 400 InvalidKMSResourceException
Kinesis Data Firehose throws this exception when an attempt to put records or to start or stop delivery stream encryption fails. This happens when the KMS service throws one of the following exception types: AccessDeniedException, InvalidStateException, DisabledException, or NotFoundException.
HTTP Status Code: 400 ResourceNotFoundException
The specified resource could not be found.
Examples
HTTP Status Code: 400 ServiceUnavailableException
The service is unavailable. Back off and retry the operation. If you continue to see the exception, throughput limits for the delivery stream may have been exceeded. For more information about limits and how to request an increase, see Amazon Kinesis Data Firehose Limits.
HTTP Status Code: 500
Examples
Example
The following JSON puts a record in the delivery stream named some_delivery_stream:
Sample Request
{ "DeliveryStreamName": "some_delivery_stream", "Record": {{ "RecordId": "CGojNMJq3msHbGoc+1mgSpifCmfFm7lFhuts//4Ft6sFVokyE6t+5ioEAjNm+sgQ6iVf/
YePEXBK6epIW4QeXqJp2xsbfZUNXsfOY1QrYXgRBCKznkjMMTP0BqJGObM3fB//dHgEE0XDTc4wW065i/
tJyYI1Vy8qn8FMhpkZuh5bvG482XkkBxFmMGnhPTQwQ4A1IOP0sE0X99YnBK8RECdeQ2zxynvZ"
}
Example
The following example shows how you can use the AWS CLI to put a record in a delivery stream.
aws firehose put-record --delivery-stream-name mystream --record="{\"Data\":\"1\"}"
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
See Also
• AWS Command Line Interface
• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3
PutRecordBatch
PutRecordBatch
Writes multiple data records into a delivery stream in a single call, which can achieve higher throughput per producer than when writing single records. To write single data records into a delivery stream, use PutRecord (p. 36). Applications using these operations are referred to as producers.
For information about service quota, see Amazon Kinesis Data Firehose Quota.
Each PutRecordBatch (p. 40) request supports up to 500 records. Each record in the request can be as large as 1,000 KB (before base64 encoding), up to a limit of 4 MB for the entire request. These limits cannot be changed.
You must specify the name of the delivery stream and the data record when using PutRecord (p. 36). The data record consists of a data blob that can be up to 1,000 KB in size, and any kind of data. For example, it could be a segment from a log file, geographic location data, website clickstream data, and so on.
Kinesis Data Firehose buffers records before delivering them to the destination. To disambiguate the data blobs at the destination, a common solution is to use delimiters in the data, such as a newline (\n) or some other character unique within the data. This allows the consumer application to parse individual data items when reading the data from the destination.
The PutRecordBatch (p. 40) response includes a count of failed records, FailedPutCount, and an array of responses, RequestResponses. Even if the PutRecordBatch (p. 40) call succeeds, the value of FailedPutCount may be greater than 0, indicating that there are records for which the operation didn't succeed. Each entry in the RequestResponses array provides additional information about the processed record. It directly correlates with a record in the request array using the same ordering, from the top to the bottom. The response array always includes the same number of records as the request array. RequestResponses includes both successfully and unsuccessfully processed records. Kinesis Data Firehose tries to process all records in each PutRecordBatch (p. 40) request. A single record failure does not stop the processing of subsequent records.
A successfully processed record includes a RecordId value, which is unique for the record. An unsuccessfully processed record includes ErrorCode and ErrorMessage values. ErrorCode reflects the type of error, and is one of the following values: ServiceUnavailableException or InternalFailure. ErrorMessage provides more detailed information about the error.
If there is an internal server error or a timeout, the write might have completed or it might have failed.
If FailedPutCount is greater than 0, retry the request, resending only those records that might have failed processing. This minimizes the possible duplicate records and also reduces the total bytes sent (and corresponding charges). We recommend that you handle any duplicates at the destination.
If PutRecordBatch (p. 40) throws ServiceUnavailableException, back off and retry. If the
exception persists, it is possible that the throughput limits have been exceeded for the delivery stream.
Data records sent to Kinesis Data Firehose are stored for 24 hours from the time they are added to a delivery stream as it attempts to send the records to the destination. If the destination is unreachable for more than 24 hours, the data is no longer available.
Important
Don't concatenate two or more base64 strings to form the data fields of your records. Instead, concatenate the raw data, then perform base64 encoding.
Request Syntax
{
"DeliveryStreamName": "string", "Records": [
Request Parameters
{
"Data": blob }
] }
Request Parameters
The request accepts the following data in JSON format.
DeliveryStreamName (p. 40) The name of the delivery stream.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 64.
Pattern: [a-zA-Z0-9_.-]+
Required: Yes Records (p. 40)
One or more records.
Type: Array of Record (p. 148) objects
Array Members: Minimum number of 1 item. Maximum number of 500 items.
Required: Yes
Response Syntax
{ "Encrypted": boolean, "FailedPutCount": number, "RequestResponses": [ {
"ErrorCode": "string", "ErrorMessage": "string", "RecordId": "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.
Encrypted (p. 41)
Indicates whether server-side encryption (SSE) was enabled during this operation.
Type: Boolean
Errors
FailedPutCount (p. 41)
The number of records that might have failed processing. This number might be greater than 0 even if the PutRecordBatch (p. 40) call succeeds. Check FailedPutCount to determine whether there are records that you need to resend.
Type: Integer
Valid Range: Minimum value of 0.
RequestResponses (p. 41)
The results array. For each record, the index of the response element is the same as the index used in the request array.
Type: Array of PutRecordBatchResponseEntry (p. 147) objects
Array Members: Minimum number of 1 item. Maximum number of 500 items.
Errors
For information about the errors that are common to all actions, see Common Errors (p. 181).
InvalidArgumentException
The specified input parameter has a value that is not valid.
HTTP Status Code: 400 InvalidKMSResourceException
Kinesis Data Firehose throws this exception when an attempt to put records or to start or stop delivery stream encryption fails. This happens when the KMS service throws one of the following exception types: AccessDeniedException, InvalidStateException, DisabledException, or NotFoundException.
HTTP Status Code: 400 ResourceNotFoundException
The specified resource could not be found.
HTTP Status Code: 400 ServiceUnavailableException
The service is unavailable. Back off and retry the operation. If you continue to see the exception, throughput limits for the delivery stream may have been exceeded. For more information about limits and how to request an increase, see Amazon Kinesis Data Firehose Limits.
HTTP Status Code: 500
Examples
Example
The following JSON puts two records in the delivery stream named some_delivery_stream:
Sample Request
POST / HTTP/1.1
See Also
"DeliveryStreamName": "some_delivery_stream", "Records": [
"FailedPutCount": 0, "RequestResponses": [ {
"RecordId": "AJJBALlfiFN9HyhPj6Dc+XqcRlTjqyIbr927TsEmWWpN39EK/
JbRTbXDZFNCCrWIs/4YUd3gjYUs6giZn76TuI4vv0ljDOMFJvLzqLuupu93RscZRmpW1CP8DeiFzJJGvqIr1LRE/
MDozYenOz+v1ZIqEjECvfMwIz6silvDaGuYtIhVzwd8yWaDGFCX4ODes6W07W9W7Q5ViMPUKSt6F0nn7OhVkJ3/"
}, {
"RecordId": "goGaFS919Mmv7lYET0oMaw+UL9iFpzi1O0o +csoIc31SmvkqpwzQuT0RPqZ7QqfR1FJ
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS Command Line Interface
• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3
See Also
StartDeliveryStreamEncryption
StartDeliveryStreamEncryption
Enables server-side encryption (SSE) for the delivery stream.
This operation is asynchronous. It returns immediately. When you invoke it, Kinesis Data Firehose first sets the encryption status of the stream to ENABLING, and then to ENABLED. The encryption status of a delivery stream is the Status property in DeliveryStreamEncryptionConfiguration (p. 89). If the operation fails, the encryption status changes to ENABLING_FAILED. You can continue to read and write data to your delivery stream while the encryption status is ENABLING, but the data is not encrypted. It can take up to 5 seconds after the encryption status changes to ENABLED before all records written to the delivery stream are encrypted. To find out whether a record or a batch of records was encrypted, check the response elements PutRecord:Encrypted (p. 37) and PutRecordBatch:Encrypted (p. 41), respectively.
To check the encryption status of a delivery stream, use DescribeDeliveryStream (p. 19).
Even if encryption is currently enabled for a delivery stream, you can still invoke this operation on it to change the ARN of the CMK or both its type and ARN. If you invoke this method to change the CMK, and the old CMK is of type CUSTOMER_MANAGED_CMK, Kinesis Data Firehose schedules the grant it had on the old CMK for retirement. If the new CMK is of type CUSTOMER_MANAGED_CMK, Kinesis Data Firehose creates a grant that enables it to use the new CMK to encrypt and decrypt data and to manage the grant.
If a delivery stream already has encryption enabled and then you invoke this operation to change the ARN of the CMK or both its type and ARN and you get ENABLING_FAILED, this only means that the attempt to change the CMK failed. In this case, encryption remains enabled with the old CMK.
If the encryption status of your delivery stream is ENABLING_FAILED, you can invoke this operation again with a valid CMK. The CMK must be enabled and the key policy mustn't explicitly deny the permission for Kinesis Data Firehose to invoke KMS encrypt and decrypt operations.
You can enable SSE for a delivery stream only if it's a delivery stream that uses DirectPut as its source.
The StartDeliveryStreamEncryption and StopDeliveryStreamEncryption operations have a combined limit of 25 calls per delivery stream per 24 hours. For example, you reach the limit if you call StartDeliveryStreamEncryption 13 times and StopDeliveryStreamEncryption 12 times for the same delivery stream in a 24-hour period.
Request Syntax
{ "DeliveryStreamEncryptionConfigurationInput": { "KeyARN": "string",
"KeyType": "string"
},
"DeliveryStreamName": "string"
}
Request Parameters
The request accepts the following data in JSON format.
DeliveryStreamEncryptionConfigurationInput (p. 45)
Used to specify the type and Amazon Resource Name (ARN) of the KMS key needed for Server-Side Encryption (SSE).
Type: DeliveryStreamEncryptionConfigurationInput (p. 91) object
Response Elements
Required: No
DeliveryStreamName (p. 45)
The name of the delivery stream for which you want to enable server-side encryption (SSE).
Type: String
Length Constraints: Minimum length of 1. Maximum length of 64.
Pattern: [a-zA-Z0-9_.-]+
Required: Yes
Response Elements
If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.
Errors
For information about the errors that are common to all actions, see Common Errors (p. 181).
InvalidArgumentException
The specified input parameter has a value that is not valid.
HTTP Status Code: 400 InvalidKMSResourceException
Kinesis Data Firehose throws this exception when an attempt to put records or to start or stop delivery stream encryption fails. This happens when the KMS service throws one of the following exception types: AccessDeniedException, InvalidStateException, DisabledException, or NotFoundException.
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 ResourceNotFoundException
The specified resource could not be found.
HTTP Status Code: 400