Reads data from the specified AWS Kinesis stream and outputs a FlowFile for every processed Record (raw) or a FlowFile for a batch of processed records if a Record Reader and Record Writer are configured. At-least-once delivery of all Kinesis Records within the Stream while the processor is running. AWS Kinesis Client Library can take several seconds to initialise before starting to fetch data. Uses DynamoDB for check pointing and CloudWatch (optional) for metrics. Ensure that the credentials provided have access to DynamoDB and CloudWatch (optional) along with Kinesis.

Additional Details...


amazon, aws, kinesis, consume, stream


In the list below, the names of required properties appear in bold. Any other properties (not in bold) are considered optional. The table also indicates any default values, and whether a property supports the NiFi Expression Language.

Display NameAPI NameDefault ValueAllowable ValuesDescription
Amazon Kinesis Stream Namekinesis-stream-nameThe name of Kinesis Stream
Application Nameamazon-kinesis-stream-application-nameThe Kinesis stream reader application name.
Record Readeramazon-kinesis-stream-record-readerController Service API:
Implementations: JsonPathReader
The Record Reader to use for reading received messages. The Kinesis Stream name can be referred to by Expression Language '${}' to access a schema. If Record Reader/Writer are not specified, each Kinesis Record will create a FlowFile.
Record Writeramazon-kinesis-stream-record-writerController Service API:
Implementations: ScriptedRecordSetWriter
The Record Writer to use for serializing Records to an output FlowFile. The Kinesis Stream name can be referred to by Expression Language '${}' to access a schema. If Record Reader/Writer are not specified, each Kinesis Record will create a FlowFile.
RegionRegionUS West (Oregon)
  • AWS GovCloud (US) AWS Region Code : us-gov-west-1
  • AWS GovCloud (US-East) AWS Region Code : us-gov-east-1
  • US East (N. Virginia) AWS Region Code : us-east-1
  • US East (Ohio) AWS Region Code : us-east-2
  • US West (N. California) AWS Region Code : us-west-1
  • US West (Oregon) AWS Region Code : us-west-2
  • EU (Ireland) AWS Region Code : eu-west-1
  • EU (London) AWS Region Code : eu-west-2
  • EU (Paris) AWS Region Code : eu-west-3
  • EU (Frankfurt) AWS Region Code : eu-central-1
  • EU (Zurich) AWS Region Code : eu-central-2
  • EU (Stockholm) AWS Region Code : eu-north-1
  • EU (Milan) AWS Region Code : eu-south-1
  • EU (Spain) AWS Region Code : eu-south-2
  • Asia Pacific (Hong Kong) AWS Region Code : ap-east-1
  • Asia Pacific (Mumbai) AWS Region Code : ap-south-1
  • Asia Pacific (Hyderabad) AWS Region Code : ap-south-2
  • Asia Pacific (Singapore) AWS Region Code : ap-southeast-1
  • Asia Pacific (Sydney) AWS Region Code : ap-southeast-2
  • Asia Pacific (Jakarta) AWS Region Code : ap-southeast-3
  • Asia Pacific (Melbourne) AWS Region Code : ap-southeast-4
  • Asia Pacific (Tokyo) AWS Region Code : ap-northeast-1
  • Asia Pacific (Seoul) AWS Region Code : ap-northeast-2
  • Asia Pacific (Osaka) AWS Region Code : ap-northeast-3
  • South America (Sao Paulo) AWS Region Code : sa-east-1
  • China (Beijing) AWS Region Code : cn-north-1
  • China (Ningxia) AWS Region Code : cn-northwest-1
  • Canada (Central) AWS Region Code : ca-central-1
  • Canada West (Calgary) AWS Region Code : ca-west-1
  • Middle East (UAE) AWS Region Code : me-central-1
  • Middle East (Bahrain) AWS Region Code : me-south-1
  • Africa (Cape Town) AWS Region Code : af-south-1
  • US ISO East AWS Region Code : us-iso-east-1
  • US ISOB East (Ohio) AWS Region Code : us-isob-east-1
  • US ISO West AWS Region Code : us-iso-west-1
  • Israel (Tel Aviv) AWS Region Code : il-central-1
The AWS Region to connect to.
Endpoint Override URLEndpoint Override URLEndpoint URL to use instead of the AWS default including scheme, host, port, and path. The AWS libraries select an endpoint URL based on the AWS region, but this property overrides the selected endpoint URL, allowing use with other S3-compatible endpoints.
Supports Expression Language: true (will be evaluated using variable registry only)
DynamoDB Overrideamazon-kinesis-stream-dynamodb-overrideDynamoDB override to use non-AWS deployments
Supports Expression Language: true (will be evaluated using variable registry only)
Initial Stream Positionamazon-kinesis-stream-initial-positionLATEST
  • LATEST Start reading just after the most recent record in the shard, so that you always read the most recent data in the shard.
  • TRIM_HORIZON Start reading at the last untrimmed record in the shard in the system, which is the oldest data record in the shard.
  • AT_TIMESTAMP Start reading from the position denoted by a specific time stamp, provided in the value Timestamp.
Initial position to read Kinesis streams.
Stream Position Timestampamazon-kinesis-stream-position-timestampTimestamp position in stream from which to start reading Kinesis Records. Required if Initial position to read Kinesis streams. is AT_TIMESTAMP. Uses the Timestamp Format to parse value into a Date.

This Property is only considered if the [Initial Stream Position] Property has a value of "AT_TIMESTAMP".
Timestamp Formatamazon-kinesis-stream-timestamp-formatyyyy-MM-dd HH:mm:ssFormat to use for parsing the Stream Position Timestamp into a Date and converting the Kinesis Record's Approximate Arrival Timestamp into a FlowFile attribute.
Supports Expression Language: true (will be evaluated using variable registry only)
Failover Timeoutamazon-kinesis-stream-failover-timeout30 secsKinesis Client Library failover timeout
Graceful Shutdown Timeoutamazon-kinesis-stream-graceful-shutdown-timeout20 secsKinesis Client Library graceful shutdown timeout
Checkpoint Intervalamazon-kinesis-stream-checkpoint-interval3 secsInterval between Kinesis checkpoints
Retry Countamazon-kinesis-stream-retry-count10Number of times to retry a Kinesis operation (process record, checkpoint, shutdown)
Retry Waitamazon-kinesis-stream-retry-wait1 secInterval between Kinesis operation retries (process record, checkpoint, shutdown)
Report Metrics to CloudWatchamazon-kinesis-stream-cloudwatch-flagfalse
  • true
  • false
Whether to report Kinesis usage metrics to CloudWatch.
Communications TimeoutCommunications Timeout30 secsThe amount of time to wait in order to establish a connection to AWS or receive data from AWS before timing out.
AWS Credentials Provider ServiceAWS Credentials Provider serviceController Service API:
Implementation: AWSCredentialsProviderControllerService
The Controller Service that is used to obtain AWS credentials provider
Proxy Configuration Serviceproxy-configuration-serviceController Service API:
Implementation: StandardProxyConfigurationService
Specifies the Proxy Configuration Controller Service to proxy network requests. If set, it supersedes proxy settings configured per component. Supported proxies: HTTP + AuthN

Dynamic Properties:

Supports Sensitive Dynamic Properties: No

Dynamic Properties allow the user to specify both the name and value of a property.

Kinesis Client Library (KCL) Configuration property nameValue to set in the KCL Configuration propertyOverride default KCL Configuration properties with required values. Supports setting of values via the "with" methods on the KCL Configuration class. Specify the property to be set without the leading prefix, e.g. "maxInitialisationAttempts" will call "withMaxInitialisationAttempts" and set the provided value. Only supports setting of simple property values, e.g. String, int, long and boolean. Does not allow override of KCL Configuration settings handled by non-dynamic processor properties.
Supports Expression Language: false


successFlowFiles are routed to success relationship

Reads Attributes:

None specified.

Writes Attributes:

aws.kinesis.partition.keyPartition key of the (last) Kinesis Record read from the Shard
aws.kinesis.shard.idShard ID from which the Kinesis Record was read
aws.kinesis.sequence.numberThe unique identifier of the (last) Kinesis Record within its Shard
aws.kinesis.approximate.arrival.timestampApproximate arrival timestamp of the (last) Kinesis Record read from the stream
mime.typeSets the mime.type attribute to the MIME Type specified by the Record Writer (if configured)
record.countNumber of records written to the FlowFiles by the Record Writer (if configured)
record.error.messageThis attribute provides on failure the error message encountered by the Record Reader or Record Writer (if configured)

State management:

This component does not store state.


This component is not restricted.

Input requirement:

This component does not allow an incoming relationship.

System Resource Considerations:

CPUKinesis Client Library is used to create a Worker thread for consumption of Kinesis Records. The Worker is initialised and started when this Processor has been triggered. It runs continually, spawning Kinesis Record Processors as required to fetch Kinesis Records. The Worker Thread (and any child Record Processor threads) are not controlled by the normal NiFi scheduler as part of the Concurrent Thread pool and are not released until this processor is stopped.
NETWORKKinesis Client Library will continually poll for new Records, requesting up to a maximum number of Records/bytes per call. This can result in sustained network usage.

See Also: