.png)
Amazon Rekognition Integration Guide
Connect Amazon Rekognition image and video analysis with enterprise workflows through AWS APIs, S3 media, asynchronous jobs, and SNS or SQS notifications.
Amazon Rekognition integration options at a glance
Amazon Rekognition provides AWS JSON APIs over HTTPS for synchronous image analysis and asynchronous video workflows. Requests use AWS Signature Version 4 with IAM credentials, temporary credentials, or roles rather than OAuth or API keys. Images can be supplied as bytes or Amazon S3 references, while video analysis commonly uses S3 and start/get job operations. Selected asynchronous operations can publish completion notifications through Amazon SNS, with SNS messages routed to Amazon SQS for durable processing. Martini can orchestrate these calls, apply custom signing logic where required, map JSON results, manage polling or notification-driven workflows, and persist analysis outcomes in downstream systems.
| Integration point | Supported by Amazon Rekognition? | Common use cases | How Martini supports it |
|---|---|---|---|
| AWS JSON APIs over HTTPS | Yes | Invoke image operations such as DetectLabels, DetectFaces, CompareFaces, SearchFacesByImage, text detection, moderation, PPE detection, and Custom Labels analysis. | Martini can consume HTTPS APIs, transform JSON payloads, orchestrate calls, and use custom JVM-compatible code when SigV4 signing or SDK behavior is required. |
| Authentication | Yes | Authenticate requests with AWS Signature Version 4, IAM policies, access keys, temporary credentials, or IAM roles. | Martini can store sensitive configuration in secrets and coordinate signed requests, but the implementation must explicitly provide AWS SigV4 behavior because an AWS-specific Martini implementation is not documented. |
| Bulk / async / batch APIs | Yes | Start asynchronous video analysis and retrieve results through operations such as StartLabelDetection and GetLabelDetection; selected batch image operations are also available. | Martini can retain job identifiers, poll with controlled intervals, process paginated responses, enforce timeouts, and route failed jobs for remediation. |
| File / attachment APIs | Limited | Images can be supplied as bytes or Amazon S3 object references, while video workflows commonly use S3 objects or supported streaming sources. | Martini can validate media references and orchestrate file-aware workflows, but Amazon Rekognition is not a general-purpose file repository. |
| Webhooks / outbound callbacks | Limited | Selected asynchronous operations can publish completion notifications through Amazon SNS, but Rekognition does not provide a general webhook facility for every operation. | Martini can consume the resulting notification path through supported messaging or API workflows and then retrieve authoritative results from Rekognition. |
| Messaging | Yes | Amazon SNS can publish selected asynchronous job notifications, and SNS messages can be routed to Amazon SQS for durable delivery. | Martini can orchestrate queue-driven processing, correlate notifications with jobs, handle retries, and prevent duplicate downstream side effects. |
| Streaming video | Limited | Amazon Kinesis Video Streams supports stream-processing scenarios for certain Rekognition Video use cases. | Martini can coordinate supported stream-processing workflows and normalize relevant detections for downstream applications. |
| Monitoring | Yes | Amazon CloudWatch provides AWS-side monitoring and service metrics, although it is not a Rekognition result API. | Martini can add workflow logging, correlation identifiers, error handling, and downstream monitoring around Rekognition operations. |
How Amazon Rekognition exposes data and business events
Amazon Rekognition REST APIs
Amazon Rekognition exposes AWS JSON operations over HTTPS for image and video analysis. Synchronous image operations can return results in the request, while video operations commonly use start and get operation pairs. Requests require AWS Signature Version 4 and IAM authorization.
Martini implementation pattern
Martini implementation pattern: a workflow or Martini API validates the media and operation, constructs the AWS request, applies reusable SigV4 signing logic or supported SDK code, sends the request, maps the JSON response, and routes the result to downstream systems.
Implementation sequence
Asynchronous Video Analysis
Amazon Rekognition supports asynchronous video analysis, commonly using an S3 video reference, a Start operation, and a corresponding Get operation. Results may be available only after processing completes and may be returned over multiple pages.
Martini implementation pattern
Martini implementation pattern: the workflow starts the job, persists the job identifier and correlation data, then polls the appropriate Get operation or waits for a supported notification before retrieving and processing results incrementally.
Implementation sequence
SNS and SQS Notifications
Selected asynchronous Rekognition workflows can publish completion notifications through Amazon SNS. SNS messages can be routed to Amazon SQS for durable, decoupled processing; this is selective event coverage rather than a general Rekognition webhook API.
Martini implementation pattern
Martini implementation pattern: a workflow consumes the notification path, validates the message and job correlation details, retrieves authoritative results from Rekognition, and acknowledges or retries processing according to the queue and workflow outcome.
Implementation sequence
Amazon S3 Media Input
Amazon Rekognition accepts image bytes for applicable operations and Amazon S3 object references for supported image and video workflows. S3 provides media storage and access control but is separate from Rekognition’s analysis results.
Martini implementation pattern
Martini implementation pattern: a workflow receives an S3 location or media event, validates bucket, key, region, and access assumptions, invokes the relevant Rekognition API, and records the source identity with the analysis result.
Implementation sequence
Common Amazon Rekognition integration patterns
Pattern 1: Moderate uploaded images
When to use this pattern
Use this pattern when an application needs automated content screening before publication or downstream processing. Amazon Rekognition returns moderation labels and confidence values, while Martini applies configurable thresholds and routes borderline or disallowed results for review.
Integration direction
Example Mapping
| Amazon Rekognition Field | Canonical Field | Target Field |
|---|---|---|
| Image.S3Object.Name | sourceMediaKey | media_key |
| ModerationLabels[].Name | moderationCategory | moderation_category |
| ModerationLabels[].Confidence | confidenceScore | confidence_score |
| business decision | publicationStatus | publication_status |
Martini implementation pattern
A Martini API receives the media reference and transaction identifier, validates the input, calls the applicable moderation operation using a signed AWS request, and maps labels into a canonical moderation model. Business rules approve high-confidence safe content, route borderline results to a review queue, and reject or quarantine configured categories. Errors, throttling, and duplicate submissions are handled with correlation keys and bounded retries.
Martini capabilities used
- APIs
- workflows
- API consumption
- data mapping
- business rules
- error handling
Pattern 2: Verify faces for identity workflows
When to use this pattern
Use this pattern for onboarding or identity processes that compare a subject image with a reference image or search a face collection. Similarity scores should be treated as decision inputs rather than unconditional proof of identity.
Integration direction
Example Mapping
| Amazon Rekognition Field | Canonical Field | Target Field |
|---|---|---|
| SourceImage | subjectImageReference | subject_image_reference |
| TargetImage | referenceImageReference | reference_image_reference |
| FaceMatches[].Similarity | similarityScore | similarity_score |
| FaceMatches[].Face.FaceId | matchedFaceId | matched_face_id |
Martini implementation pattern
Martini receives image references and a verification transaction, validates regional and collection configuration, invokes CompareFaces or a face-search operation, and applies a configurable similarity threshold. The workflow returns or persists the decision, routes borderline matches for review, and limits retention and visibility of sensitive face data.
Martini capabilities used
- API endpoints
- workflows
- data mapping
- business rules
- secrets management
- error handling
Pattern 3: Process asynchronous video analysis
When to use this pattern
Use this pattern when video processing cannot be completed in a synchronous request. The workflow starts an analysis job for an S3 video, waits for completion through polling or a supported SNS/SQS notification, and writes detections for downstream use.
Integration direction
Example Mapping
| Amazon Rekognition Field | Canonical Field | Target Field |
|---|---|---|
| Video.S3Object | sourceVideo | source_video |
| JobId | analysisJobId | analysis_job_id |
| Labels[].Timestamp | detectionTimestamp | detection_timestamp |
| Labels[].Name | detectedLabel | detected_label |
Martini implementation pattern
Martini starts the appropriate video job and stores the job identifier, source version, and operation parameters before waiting. A scheduled workflow or supported notification path triggers result retrieval. The workflow handles pagination, timeout limits, transient AWS failures, duplicate notifications, and failed jobs before writing normalized detections and final status.
Martini capabilities used
- workflows
- scheduled execution
- messaging orchestration
- API consumption
- pagination handling
- error handling
Pattern 4: Run custom object detection
When to use this pattern
Use this pattern when an organization has a Custom Labels model for domain-specific classification or object detection, such as quality inspection, inventory classification, or document routing.
Integration direction
Example Mapping
| Amazon Rekognition Field | Canonical Field | Target Field |
|---|---|---|
| ProjectVersionArn | modelReference | model_reference |
| Image | sourceImage | source_image |
| CustomLabels[].Name | domainObject | domain_object |
| CustomLabels[].Confidence | confidenceScore | confidence_score |
Martini implementation pattern
A Martini workflow receives the media and model reference, validates that the model and source are available in the configured region, invokes the Custom Labels operation, and maps detections into the organization’s domain model. Rules determine whether to create an alert, update an inventory or quality record, or request manual review. The workflow records the input identity to avoid repeat side effects.
Martini capabilities used
- workflows
- API consumption
- custom code extension
- data mapping
- business rules
- idempotency handling
Applications commonly integrated with Amazon Rekognition
Amazon Rekognition is commonly used alongside AWS storage, messaging, orchestration, and persistence services. Martini can coordinate these services with enterprise applications by validating media, invoking Rekognition operations, handling asynchronous state, and normalizing results for downstream use.
| Application | Scenario | Direction | Martini Pattern |
|---|---|---|---|
| Amazon S3 | Store source images and videos and provide object references for Rekognition analysis, particularly for larger media and asynchronous video jobs. | Amazon S3 → Amazon Rekognition → Martini | Martini receives an object reference or a media event, validates the bucket and key, invokes the appropriate Rekognition operation, and maps the response into an application or persistence workflow. |
| Amazon SNS | Publish completion notifications for selected asynchronous Rekognition video-analysis operations. | Amazon Rekognition → Amazon SNS → Martini | Martini processes the notification metadata, validates the job correlation details, retrieves the relevant result through the Rekognition API, and applies downstream business rules. |
| Amazon SQS | Buffer SNS notifications and provide durable queue-based delivery for asynchronous analysis processing. | Amazon SNS → Amazon SQS → Martini | A Martini workflow consumes queued notifications, handles visibility and retry concerns, retrieves paginated results, and records completion or failure state. |
| Amazon Kinesis Video Streams | Supply live or streamed video for supported Rekognition Video use cases. | Amazon Kinesis Video Streams → Amazon Rekognition → Martini | Martini coordinates stream-related analysis workflows where supported, normalizes detections and timestamps, and sends selected results to operational systems. |
| AWS Lambda | Run event-driven processing, request signing, result normalization, or post-analysis actions within an AWS architecture. | Amazon S3 → AWS Lambda → Amazon Rekognition → Martini | Martini can coordinate Lambda-backed preparation or post-processing with Rekognition API calls, while keeping validation, transformation, persistence, and error handling in reusable workflows. |
| AWS Step Functions | Orchestrate long-running video analysis, polling, retries, timeouts, and downstream actions. | Amazon S3 → AWS Step Functions → Amazon Rekognition → Martini | Martini can participate in or coordinate a stateful analysis process by storing job identifiers, checking completion, applying bounded retries, and publishing normalized outcomes. |
| Amazon CloudWatch | Monitor AWS service activity, metrics, alarms, and operational signals associated with Rekognition workflows. | Amazon Rekognition → Amazon CloudWatch → Martini | Martini records correlation identifiers and workflow outcomes while CloudWatch provides AWS-side observability for service activity and operational monitoring. |
| Amazon DynamoDB | Persist job state, face identifiers, normalized detections, confidence values, or application decisions outside Rekognition. | Amazon Rekognition → Martini → Amazon DynamoDB | Martini maps Rekognition JSON responses into a durable state model, applies idempotency keys, and writes results or job checkpoints to DynamoDB. |
How to build a Amazon Rekognition integration in Martini
Objective
Establish the AWS integration boundary and configure the credentials, region, service name, and permissions required for Amazon Rekognition and any related S3, SNS, SQS, or persistence resources.
Instructions in Martini
- Use Martini secrets or the runtime environment for AWS credentials and session tokens
- Configure the target AWS region and the Rekognition service name
- Implement or reuse SigV4 signing through supported custom JVM-compatible code or SDK behavior
- Apply least-privilege IAM permissions for each operation and related AWS resource
Objective
Select a synchronous API, scheduled workflow, media event, or supported notification path based on whether the operation returns immediately or creates an asynchronous job.
Instructions in Martini
- Use a Martini API for request-driven image analysis
- Use a scheduler or stateful workflow for polling video jobs
- Use a supported SNS/SQS notification path for selected asynchronous operations
- Define a correlation key from the source transaction, object version, or job identifier
Objective
Accept image bytes, S3 references, video references, or model and collection identifiers while validating that the requested operation can use the selected input mode.
Instructions in Martini
- Validate required image, video, S3, collection, or model fields
- Check media metadata and applicable size or format constraints
- Confirm regional and IAM access assumptions before invoking analysis
- Record the source object identity or input hash for idempotency
Objective
Build the Martini workflow that invokes Rekognition, tracks asynchronous state, and coordinates related AWS services or enterprise applications.
Instructions in Martini
- Call the appropriate signed Amazon Rekognition operation
- Persist job identifiers before initiating repeatable downstream actions
- Branch between synchronous response handling and asynchronous completion handling
- Use bounded polling, timeout rules, or queue processing for long-running jobs
Objective
Transform Amazon Rekognition JSON into a stable canonical model that downstream applications can consume without depending on every provider-specific response detail.
Instructions in Martini
- Map labels, faces, timestamps, moderation categories, confidence values, and identifiers
- Process paginated video results incrementally
- Preserve source and job correlation metadata
- Use tolerant mappings for additive response fields where appropriate
Objective
Convert detection results into business outcomes using configurable confidence thresholds, moderation policies, review routing, and privacy controls.
Instructions in Martini
- Separate automated decisions from borderline results requiring review
- Apply operation-specific confidence thresholds
- Restrict sensitive face and image metadata to authorized workflows
- Define retention and deletion behavior for source media and derived results
Common Amazon Rekognition data objects used in integrations
| Object | Typical Use | Common target systems | Martini handling |
|---|---|---|---|
| Images | Image bytes or Amazon S3 references supplied for label, face, text, moderation, PPE, comparison, or Custom Labels analysis. | Amazon S3, content platforms, commerce applications, identity workflows, databases | Martini validates the input mode and media metadata, invokes the selected operation, applies confidence or moderation rules, and maps the JSON response. |
| Videos | Video objects, generally stored in Amazon S3, submitted for asynchronous detection and analysis. | Amazon S3, Amazon SNS, Amazon SQS, media platforms, analytics systems | Martini starts the analysis job, stores the job identifier, polls or processes supported notifications, retrieves paginated results, and records completion state. |
| Faces | Detected face metadata including bounding boxes, confidence values, landmarks, attributes, and identifiers. | Identity applications, onboarding systems, access workflows, databases | Martini maps face metadata into a controlled business schema, applies configured thresholds, and restricts sensitive data according to retention and access policies. |
| Face collections | Searchable Amazon Rekognition resources containing indexed face vectors and related metadata. | Identity verification applications, access-management systems, audit stores | Martini passes collection identifiers to indexing or search operations, validates IAM and regional configuration, and returns normalized match results. |
| Labels | Objects, scenes, activities, or concepts detected in images and videos with names, categories, confidence values, and sometimes timestamps. | Content management systems, moderation queues, inventory systems, analytics platforms | Martini transforms labels into domain-specific classifications, applies confidence thresholds, and persists or routes the results. |
| Custom Labels projects and models | Domain-specific image classification or object-detection resources used for specialized analysis. | Quality systems, inventory applications, document-routing workflows, operational alerting | Martini receives the project or model reference, invokes the applicable operation, maps detected objects and confidence values, and applies business decisions. |
Authentication and security considerations
AWS authentication
Amazon Rekognition uses AWS Signature Version 4 rather than OAuth or a conventional API key. Requests include the AWS region, service name, timestamp, canonical request, payload hash, and authorization signature.
Credentials and permissions
Store access keys, secret keys, and session tokens in Martini secrets or the runtime environment. Prefer temporary credentials and IAM roles where available, and grant only the Rekognition actions and related S3, SNS, SQS, Kinesis, persistence, or monitoring permissions required by the workflow.
Data protection
- Restrict access to images, videos, face data, face collections, and derived results.
- Use regional controls and resource-level policies where supported.
- Define retention and deletion rules for source media and sensitive analysis outputs.
- Protect request credentials and avoid hard-coding secrets in workflows.
Operational considerations for Amazon Rekognition integrations
Asynchronous processing
Video analysis may require a start/get workflow, controlled polling, or a supported SNS/SQS notification path. Store job identifiers and impose maximum processing windows.
Pagination and idempotency
Process large result sets incrementally and preserve pagination state. Use source object versions, job identifiers, transaction IDs, or input hashes to avoid duplicate downstream actions.
Reliability and schema changes
- Use bounded exponential-backoff retries for throttling and temporary AWS failures.
- Do not retry permanent validation, authorization, or unsupported-media errors without correction.
- Validate regions, media characteristics, IAM access, and model or collection availability.
- Make mappings tolerant of additive response fields and test representative synchronous and asynchronous responses.
- Record correlation identifiers and workflow outcomes for troubleshooting.
Why use Martini instead of scripts or point-to-point integrations?
Orchestration beyond a script
Martini provides a maintainable workflow boundary around SigV4-authenticated API calls, media validation, asynchronous job state, messaging, transformations, and downstream persistence. This avoids scattering Rekognition-specific logic across individual applications.
Reusable integration assets
Teams can expose a normalized Martini API for consuming applications, reuse signing and validation logic, and apply consistent confidence, moderation, privacy, retry, and idempotency rules across image and video workflows.
Operational control
- Centralize error handling, logging, correlation, and retry behavior.
- Separate vendor-specific JSON from stable enterprise data models.
- Coordinate Amazon S3, SNS, SQS, databases, and enterprise applications in one workflow.
- Extend the implementation with JVM-compatible custom code when AWS signing or SDK behavior requires it.
Frequently asked questions
Amazon Rekognition can be integrated through its AWS JSON APIs over HTTPS, using SigV4 authentication and IAM authorization. Images can be supplied as bytes or S3 references, while video analysis commonly uses asynchronous start/get operations. Selected asynchronous workflows can publish notifications through SNS, with SQS providing durable delivery. Results can then be mapped into applications, queues, databases, or review workflows.
Yes. Martini can integrate with Amazon Rekognition through its HTTPS APIs, S3 media references, and supported SNS or SQS notification patterns. Because a native Martini AWS authentication implementation is not documented in the supplied sources, the solution must explicitly provide SigV4 signing or AWS SDK behavior through supported custom JVM-compatible code.
No dedicated Amazon Rekognition connector is required. Martini can use Amazon Rekognition’s native AWS APIs, S3 references, supported SNS or SQS notification paths, IAM authentication, and custom JVM-compatible code where request signing or SDK behavior is needed.
Lonti does not charge an additional per-connector or per-vendor fee to integrate Amazon Rekognition with Martini. Integrations are subject to the provisioned capacity of the Martini environment. Separate costs may apply from AWS, infrastructure providers, or other third-party systems based on subscriptions, usage, storage, messaging, and deployment choices.
Use the AWS JSON APIs over HTTPS for direct analysis requests. Use S3 references for larger images and videos where supported, asynchronous start/get operations for video, and SNS or SQS notifications for selected completion workflows. Amazon Rekognition does not document GraphQL or SOAP APIs, and it does not provide a general webhook API for all analysis events.
Selected asynchronous video-analysis operations can publish completion notifications through Amazon SNS, which can be routed to Amazon SQS. This is a selective AWS messaging pattern rather than a general outbound webhook facility. Synchronous image operations generally return results directly, so Martini should use direct responses, polling, or supported SNS/SQS flows according to the operation.
A Martini workflow starts the Rekognition job, stores the job identifier and source correlation data, and then either polls the corresponding Get operation or processes a supported notification. It should retrieve paginated results, enforce timeout and retry limits, distinguish failed jobs from incomplete jobs, and persist processing state before downstream side effects.
Martini can map Rekognition JSON into a canonical model, apply confidence and moderation rules, and write results to downstream systems. Workflows should distinguish authentication, authorization, validation, throttling, and temporary AWS failures. Correlation keys based on an object version, job identifier, transaction ID, or input hash support idempotency and reduce duplicate downstream actions.
Related Martini documentation
Data
Integrate Amazon Rekognition with Martini
Use Martini to connect Amazon Rekognition analysis with enterprise APIs, AWS services, databases, and operational workflows through secure, reusable integration logic.