aws_kinesis
Receive messages from one or more Kinesis streams.
- Common
- Advanced
# Common config fields, showing default values
input:
label: ""
aws_kinesis:
streams: [] # No default (required)
dynamodb:
table: ""
create: false
checkpoint_limit: 1024
auto_replay_nacks: true
commit_period: 5s
start_from_oldest: true
batching:
count: 0
byte_size: 0
period: ""
jitter: 0
check: ""
# All config fields, showing default values
input:
label: ""
aws_kinesis:
streams: [] # No default (required)
dynamodb:
table: ""
create: false
billing_mode: PAY_PER_REQUEST
read_capacity_units: 0
write_capacity_units: 0
checkpoint_limit: 1024
auto_replay_nacks: true
commit_period: 5s
rebalance_period: 30s
lease_period: 30s
start_from_oldest: true
enhanced_fan_out:
enabled: false
consumer_name: ""
consumer_arn: ""
region: ""
endpoint: ""
credentials:
profile: ""
id: ""
secret: ""
token: ""
from_ec2_role: false
role: ""
role_external_id: ""
expiry_window: ""
batching:
count: 0
byte_size: 0
period: ""
jitter: 0
check: ""
processors: [] # No default (optional)
Consumes messages from one or more Kinesis streams either by automatically balancing shards across other instances of this input, or by consuming shards listed explicitly. The latest message sequence consumed by this input is stored within a DynamoDB table, which allows it to resume at the correct sequence of the shard during restarts. This table is also used for coordination across distributed inputs when shard balancing.
Bento will not store a consumed sequence unless it is acknowledged at the output level, which ensures at-least-once delivery guarantees.
Ordering
By default messages of a shard can be processed in parallel, up to a limit determined by the field checkpoint_limit. However, if strict ordered processing is required then this value must be set to 1 in order to process shard messages in lock-step. When doing so it is recommended that you perform batching at this component for performance as it will not be possible to batch lock-stepped messages at the output level.
Table Schema
It's possible to configure Bento to create the DynamoDB table required for coordination if it does not already exist. However, if you wish to create this yourself (recommended) then create a table with a string HASH key StreamID and a string RANGE key ShardID.
Batching
Use the batching fields to configure an optional batching policy. Each stream shard will be batched separately in order to ensure that acknowledgements aren't contaminated.
Fields
streams
One or more Kinesis data streams to consume from. Streams can either be specified by their name or full ARN. Shards of a stream are automatically balanced across consumers by coordinating through the provided DynamoDB table. Multiple comma separated streams can be listed in a single element. Shards are automatically distributed across consumers of a stream by coordinating through the provided DynamoDB table. Alternatively, it's possible to specify an explicit shard to consume from with a colon after the stream name, e.g. foo:0 would consume the shard 0 of the stream foo.
Type: array
# Examples
streams:
- foo
- arn:aws:kinesis:*:111122223333:stream/my-stream
dynamodb
Determines the table used for storing and accessing the latest consumed sequence for shards, and for coordinating balanced consumers of streams.
Type: object
dynamodb.table
The name of the table to access.
Type: string
Default: ""
dynamodb.create
Whether, if the table does not exist, it should be created.
Type: bool
Default: false
dynamodb.billing_mode
When creating the table determines the billing mode.
Type: string
Default: "PAY_PER_REQUEST"
Options: PROVISIONED, PAY_PER_REQUEST.
dynamodb.read_capacity_units
Set the provisioned read capacity when creating the table with a billing_mode of PROVISIONED.
Type: int
Default: 0
dynamodb.write_capacity_units
Set the provisioned write capacity when creating the table with a billing_mode of PROVISIONED.
Type: int
Default: 0
checkpoint_limit
The maximum gap between the in flight sequence versus the latest acknowledged sequence at a given time. Increasing this limit enables parallel processing and batching at the output level to work on individual shards. Any given sequence will not be committed unless all messages under that offset are delivered in order to preserve at least once delivery guarantees.
Type: int
Default: 1024
auto_replay_nacks
Whether messages that are rejected (nacked) at the output level should be automatically replayed indefinitely, eventually resulting in back pressure if the cause of the rejections is persistent. If set to false these messages will instead be deleted. Disabling auto replays can greatly improve memory efficiency of high throughput streams as the original shape of the data can be discarded immediately upon consumption and mutation.
Type: bool
Default: true
commit_period
The period of time between each update to the checkpoint table.
Type: string
Default: "5s"
rebalance_period
The period of time between each attempt to rebalance shards across clients.
Type: string
Default: "30s"
lease_period
The period of time after which a client that has failed to update a shard checkpoint is assumed to be inactive.
Type: string
Default: "30s"
start_from_oldest
Whether to consume from the oldest message when a sequence does not yet exist for the stream.
Type: bool
Default: true
enhanced_fan_out
Enhanced Fan Out configuration for push-based streaming. Provides dedicated 2 MB/sec throughput per consumer per shard and lower latency (~70ms). Note: EFO incurs per shard-hour charges.
Type: object
Requires version 1.16.0 or newer
enhanced_fan_out.enabled
Enable Enhanced Fan Out mode for push-based streaming with dedicated throughput.
Type: bool
Default: false
enhanced_fan_out.consumer_name
Consumer name for EFO registration. Auto-generated if empty: bento-clientID.
Type: string
Default: ""
enhanced_fan_out.consumer_arn
Existing consumer ARN to use. If provided, skips registration.
Type: string
Default: ""
region
The AWS region to target.
Type: string
Default: ""
endpoint
Allows you to specify a custom endpoint for the AWS API.
Type: string
Default: ""
credentials
Optional manual configuration of AWS credentials to use. More information can be found in this document.
Type: object
credentials.profile
A profile from ~/.aws/credentials to use.
Type: string
Default: ""
credentials.id
The ID of credentials to use.
Type: string
Default: ""
credentials.secret
The secret for the credentials being used.
This field contains sensitive information that usually shouldn't be added to a config directly, read our secrets page for more info.
Type: string
Default: ""
credentials.token
The token for the credentials being used, required when using short term credentials.
Type: string
Default: ""