2025/04/29 - Amazon Kinesis - 3 new1 updated api methods
Changes Amazon KDS now supports tagging and attribute-based access control (ABAC) for enhanced fan-out consumers.
Adds or updates tags for the specified Kinesis resource. Each tag is a label consisting of a user-defined key and value. Tags can help you manage, identify, organize, search for, and filter resources. You can assign up to 50 tags to a Kinesis resource.
See also: AWS API Documentation
Request Syntax
client.tag_resource( Tags={ 'string': 'string' }, ResourceARN='string' )
dict
[REQUIRED]
An array of tags to be added to the Kinesis resource. A tag consists of a required key and an optional value. You can add up to 50 tags per resource.
Tags may only contain Unicode letters, digits, white space, or these symbols: _ . : / = + - @.
(string) --
(string) --
string
The Amazon Resource Name (ARN) of the Kinesis resource to which to add tags.
None
Removes tags from the specified Kinesis resource. Removed tags are deleted and can't be recovered after this operation completes successfully.
See also: AWS API Documentation
Request Syntax
client.untag_resource( TagKeys=[ 'string', ], ResourceARN='string' )
list
[REQUIRED]
A list of tag key-value pairs. Existing tags of the resource whose keys are members of this list will be removed from the Kinesis resource.
(string) --
string
The Amazon Resource Name (ARN) of the Kinesis resource from which to remove tags.
None
List all tags added to the specified Kinesis resource. Each tag is a label consisting of a user-defined key and value. Tags can help you manage, identify, organize, search for, and filter resources.
For more information about tagging Kinesis resources, see Tag your Amazon Kinesis Data Streams resources.
See also: AWS API Documentation
Request Syntax
client.list_tags_for_resource( ResourceARN='string' )
string
The Amazon Resource Name (ARN) of the Kinesis resource for which to list tags.
dict
Response Syntax
{ 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ] }
Response Structure
(dict) --
Tags (list) --
An array of tags associated with the specified Kinesis resource.
(dict) --
Metadata assigned to the stream or consumer, consisting of a key-value pair.
Key (string) --
A unique identifier for the tag. Maximum length: 128 characters. Valid characters: Unicode letters, digits, white space, _ . / = + - % @
Value (string) --
An optional string, typically used to describe or define the tag. Maximum length: 256 characters. Valid characters: Unicode letters, digits, white space, _ . / = + - % @
{'Tags': {'string': 'string'}}
Registers a consumer with a Kinesis data stream. When you use this operation, the consumer you register can then call SubscribeToShard to receive data from the stream using enhanced fan-out, at a rate of up to 2 MiB per second for every shard you subscribe to. This rate is unaffected by the total number of consumers that read from the same stream.
You can add tags to the registered consumer when making a RegisterStreamConsumer request by setting the Tags parameter. If you pass the Tags parameter, in addition to having the kinesis:RegisterStreamConsumer permission, you must also have the kinesis:TagResource permission for the consumer that will be registered. Tags will take effect from the CREATING status of the consumer.
You can register up to 20 consumers per stream. A given consumer can only be registered with one stream at a time.
For an example of how to use this operation, see Enhanced Fan-Out Using the Kinesis Data Streams API.
The use of this operation has a limit of five transactions per second per account. Also, only 5 consumers can be created simultaneously. In other words, you cannot have more than 5 consumers in a CREATING status at the same time. Registering a 6th consumer while there are 5 in a CREATING status results in a LimitExceededException.
See also: AWS API Documentation
Request Syntax
client.register_stream_consumer( StreamARN='string', ConsumerName='string', Tags={ 'string': 'string' } )
string
[REQUIRED]
The ARN of the Kinesis data stream that you want to register the consumer with. For more info, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces.
string
[REQUIRED]
For a given Kinesis data stream, each consumer must have a unique name. However, consumer names don't have to be unique across data streams.
dict
A set of up to 50 key-value pairs. A tag consists of a required key and an optional value.
(string) --
(string) --
dict
Response Syntax
{ 'Consumer': { 'ConsumerName': 'string', 'ConsumerARN': 'string', 'ConsumerStatus': 'CREATING'|'DELETING'|'ACTIVE', 'ConsumerCreationTimestamp': datetime(2015, 1, 1) } }
Response Structure
(dict) --
Consumer (dict) --
An object that represents the details of the consumer you registered. When you register a consumer, it gets an ARN that is generated by Kinesis Data Streams.
ConsumerName (string) --
The name of the consumer is something you choose when you register the consumer.
ConsumerARN (string) --
When you register a consumer, Kinesis Data Streams generates an ARN for it. You need this ARN to be able to call SubscribeToShard.
If you delete a consumer and then create a new one with the same name, it won't have the same ARN. That's because consumer ARNs contain the creation timestamp. This is important to keep in mind if you have IAM policies that reference consumer ARNs.
ConsumerStatus (string) --
A consumer can't read data while in the CREATING or DELETING states.
ConsumerCreationTimestamp (datetime) --