Skip to main content

stream_processors

Creates, updates, deletes, gets or lists a stream_processors resource.

Overview

Namestream_processors
TypeResource
Idaws.rekognition.stream_processors

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
creation_timestampstring (date-time)Date and time the stream processor was created
data_sharing_preferenceobjectShows whether you are sharing data with Rekognition to improve model performance. You can choose this option at the account level or on a per-stream basis. Note that if you opt out at the account level this setting is ignored on individual streams.
inputobjectKinesis video stream that provides the source streaming video.
kms_key_idstringThe identifier for your AWS Key Management Service key (AWS KMS key). This is an optional parameter for label detection stream processors. (pattern: <code>^[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,2048}$</code>)
last_update_timestampstring (date-time)The time, in Unix format, the stream processor was last updated. For example, when the stream processor moves from a running state to a failed state, or when the user starts or stops the stream processor.
namestringName of the stream processor. (pattern: <code>[a-zA-Z0-9_.-]+</code>)
notification_channelobjectThe Amazon Simple Notification Service topic to which Amazon Rekognition publishes the object detection results and completion status of a video analysis operation. Amazon Rekognition publishes a notification the first time an object of interest or a person is detected in the video stream. For example, if Amazon Rekognition detects a person at second 2, a pet at second 4, and a person again at second 5, Amazon Rekognition sends 2 object class detected notifications, one for a person at second 2 and one for a pet at second 4. Amazon Rekognition also publishes an an end-of-session notification with a summary when the stream processing session is complete.
outputobjectKinesis data stream to which Amazon Rekognition Video puts the analysis results.
regions_of_interestarraySpecifies locations in the frames where Amazon Rekognition checks for objects or people. This is an optional parameter for label detection stream processors.
role_arnstringARN of the IAM role that allows access to the stream processor. (pattern: <code>arn:aws:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@-_/]+</code>)
settingsobjectInput parameters used in a streaming video analyzed by a stream processor. You can use FaceSearch to recognize faces in a streaming video, or you can use ConnectedHome to detect labels.
statusstringCurrent status of the stream processor. (STOPPED, STARTING, RUNNING, FAILED, STOPPING, UPDATING)
status_messagestringDetailed status message about the stream processor.
stream_processor_arnstringARN of the stream processor. (pattern: <code>(^arn:[a-z\d-]+:rekognition:[a-z\d-]+:\d{12}:streamprocessor/.+$)</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_stream_processorselectregionProvides information about a stream processor created by CreateStreamProcessor. You can get information about the input and output streams, the input parameters for the face recognition being performed, and the current status of the stream processor.
create_stream_processorinsertregion, RoleArnCreates an Amazon Rekognition stream processor that you can use to detect and recognize faces or to detect labels in a streaming video. Amazon Rekognition Video is a consumer of live video from Amazon Kinesis Video Streams. There are two different settings for stream processors in Amazon Rekognition: detecting faces and detecting labels. If you are creating a stream processor for detecting faces, you provide as input a Kinesis video stream (Input) and a Kinesis data stream (Output) stream for receiving the output. You must use the FaceSearch option in Settings, specifying the collection that contains the faces you want to recognize. After you have finished analyzing a streaming video, use StopStreamProcessor to stop processing. If you are creating a stream processor to detect labels, you provide as input a Kinesis video stream (Input), Amazon S3 bucket information (Output), and an Amazon SNS topic ARN (NotificationChannel). You can also provide a KMS key ID to encrypt the data sent to your Amazon S3 bucket. You specify what you want to detect by using the ConnectedHome option in settings, and selecting one of the following: PERSON, PET, PACKAGE, ALL You can also specify where in the frame you want Amazon Rekognition to monitor with RegionsOfInterest. When you run the StartStreamProcessor operation on a label detection stream processor, you input start and stop information to determine the length of the processing time. Use Name to assign an identifier for the stream processor. You use Name to manage the stream processor. For example, you can start processing the source video by calling StartStreamProcessor with the Name field. This operation requires permissions to perform the rekognition:CreateStreamProcessor action. If you want to tag your stream processor, you also require permission to perform the rekognition:TagResource operation.
update_stream_processorupdateregionAllows you to update a stream processor. You can change some settings and regions of interest and delete certain parameters.
delete_stream_processordeleteregionDeletes the stream processor identified by Name. You assign the value for Name when you create the stream processor with CreateStreamProcessor. You might not be able to use the same name for a stream processor for a few seconds after calling DeleteStreamProcessor.
list_stream_processorsexecregionGets a list of stream processors that you have created with CreateStreamProcessor.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Provides information about a stream processor created by CreateStreamProcessor. You can get information about the input and output streams, the input parameters for the face recognition being performed, and the current status of the stream processor.

SELECT
creation_timestamp,
data_sharing_preference,
input,
kms_key_id,
last_update_timestamp,
name,
notification_channel,
output,
regions_of_interest,
role_arn,
settings,
status,
status_message,
stream_processor_arn
FROM aws.rekognition.stream_processors
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates an Amazon Rekognition stream processor that you can use to detect and recognize faces or to detect labels in a streaming video. Amazon Rekognition Video is a consumer of live video from Amazon Kinesis Video Streams. There are two different settings for stream processors in Amazon Rekognition: detecting faces and detecting labels. If you are creating a stream processor for detecting faces, you provide as input a Kinesis video stream (Input) and a Kinesis data stream (Output) stream for receiving the output. You must use the FaceSearch option in Settings, specifying the collection that contains the faces you want to recognize. After you have finished analyzing a streaming video, use StopStreamProcessor to stop processing. If you are creating a stream processor to detect labels, you provide as input a Kinesis video stream (Input), Amazon S3 bucket information (Output), and an Amazon SNS topic ARN (NotificationChannel). You can also provide a KMS key ID to encrypt the data sent to your Amazon S3 bucket. You specify what you want to detect by using the ConnectedHome option in settings, and selecting one of the following: PERSON, PET, PACKAGE, ALL You can also specify where in the frame you want Amazon Rekognition to monitor with RegionsOfInterest. When you run the StartStreamProcessor operation on a label detection stream processor, you input start and stop information to determine the length of the processing time. Use Name to assign an identifier for the stream processor. You use Name to manage the stream processor. For example, you can start processing the source video by calling StartStreamProcessor with the Name field. This operation requires permissions to perform the rekognition:CreateStreamProcessor action. If you want to tag your stream processor, you also require permission to perform the rekognition:TagResource operation.

INSERT INTO aws.rekognition.stream_processors (
Input,
Output,
Name,
Settings,
RoleArn,
Tags,
NotificationChannel,
KmsKeyId,
RegionsOfInterest,
DataSharingPreference,
region
)
SELECT
'{{ Input }}',
'{{ Output }}',
'{{ Name }}',
'{{ Settings }}',
'{{ RoleArn }}' /* required */,
'{{ Tags }}',
'{{ NotificationChannel }}',
'{{ KmsKeyId }}',
'{{ RegionsOfInterest }}',
'{{ DataSharingPreference }}',
'{{ region }}'
RETURNING
stream_processor_arn
;

UPDATE examples

Allows you to update a stream processor. You can change some settings and regions of interest and delete certain parameters.

UPDATE aws.rekognition.stream_processors
SET
Name = '{{ Name }}',
SettingsForUpdate = '{{ SettingsForUpdate }}',
RegionsOfInterestForUpdate = '{{ RegionsOfInterestForUpdate }}',
DataSharingPreferenceForUpdate = '{{ DataSharingPreferenceForUpdate }}',
ParametersToDelete = '{{ ParametersToDelete }}'
WHERE
region = '{{ region }}' --required;

DELETE examples

Deletes the stream processor identified by Name. You assign the value for Name when you create the stream processor with CreateStreamProcessor. You might not be able to use the same name for a stream processor for a few seconds after calling DeleteStreamProcessor.

DELETE FROM aws.rekognition.stream_processors
WHERE region = '{{ region }}' --required
;

Lifecycle Methods

Gets a list of stream processors that you have created with CreateStreamProcessor.

EXEC aws.rekognition.stream_processors.list_stream_processors
@region='{{ region }}' --required
@@json=
'{
"NextToken": "{{ NextToken }}",
"MaxResults": {{ MaxResults }}
}'
;