Amazon Rekognition · Arazzo Workflow

Amazon Rekognition Reuse or Create Collection then Enroll

Version 1.0.0

List collections, branch to create the collection only if missing, then index a face into it.

1 workflow 1 source API 1 provider
View Spec View on GitHub Celebrity RecognitionComputer-VisionContent ModerationCustom LabelsDeep LearningFace LivenessFacial RecognitionImage AnalysisMachine-LearningObject DetectionText DetectionVideo AnalysisArazzoWorkflows

Provider

amazon-rekognition

Workflows

reuse-or-create-collection-enroll
Reuse an existing collection or create it, then index an enrollment image.
Lists collections, branches to create the collection when it is not already present, and indexes the enrollment image into the resulting collection.
3 steps inputs: collectionId, enrollBucket, enrollName, externalImageId outputs: collectionIds, faceRecords
1
listCollections
List the collection ids that already exist in the account.
2
createCollection
Create the collection because it was not found in the listing.
3
indexFaces
Index the enrollment image faces into the reused or newly created collection.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Amazon Rekognition Reuse or Create Collection then Enroll
  summary: List collections, branch to create the collection only if missing, then index a face into it.
  description: >-
    An idempotent enrollment flow for Amazon Rekognition face collections. The
    workflow lists the existing collections, branches based on whether the
    target collection id is already present — creating it only when missing —
    and then indexes the faces from an enrollment image into the collection.
    Each step spells out its AWS JSON 1.1 request inline, including the
    protocol-required X-Amz-Target header.
  version: 1.0.0
sourceDescriptions:
- name: faceCollectionsApi
  url: ../openapi/amazon-rekognition-face-collections-api-openapi.yml
  type: openapi
workflows:
- workflowId: reuse-or-create-collection-enroll
  summary: Reuse an existing collection or create it, then index an enrollment image.
  description: >-
    Lists collections, branches to create the collection when it is not already
    present, and indexes the enrollment image into the resulting collection.
  inputs:
    type: object
    required:
    - collectionId
    - enrollBucket
    - enrollName
    properties:
      collectionId:
        type: string
        description: ID of the collection to reuse or create.
      enrollBucket:
        type: string
        description: S3 bucket holding the enrollment image.
      enrollName:
        type: string
        description: S3 object key of the enrollment image to index.
      externalImageId:
        type: string
        description: External identifier to assign to the indexed faces.
  steps:
  - stepId: listCollections
    description: List the collection ids that already exist in the account.
    operationId: listCollections
    parameters:
    - name: X-Amz-Target
      in: header
      value: RekognitionService.ListCollections
    requestBody:
      contentType: application/x-amz-json-1.1
      payload:
        MaxResults: 100
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      collectionIds: $response.body#/CollectionIds
    onSuccess:
    - name: collectionMissing
      type: goto
      stepId: createCollection
      criteria:
      - context: $response.body
        condition: $.CollectionIds[?(@ == '$inputs.collectionId')] empty true
        type: jsonpath
    - name: collectionExists
      type: goto
      stepId: indexFaces
      criteria:
      - context: $response.body
        condition: $.CollectionIds[?(@ == '$inputs.collectionId')] empty false
        type: jsonpath
  - stepId: createCollection
    description: Create the collection because it was not found in the listing.
    operationId: createCollection
    parameters:
    - name: X-Amz-Target
      in: header
      value: RekognitionService.CreateCollection
    requestBody:
      contentType: application/x-amz-json-1.1
      payload:
        CollectionId: $inputs.collectionId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      collectionArn: $response.body#/CollectionArn
  - stepId: indexFaces
    description: Index the enrollment image faces into the reused or newly created collection.
    operationId: indexFaces
    parameters:
    - name: X-Amz-Target
      in: header
      value: RekognitionService.IndexFaces
    requestBody:
      contentType: application/x-amz-json-1.1
      payload:
        CollectionId: $inputs.collectionId
        Image:
          S3Object:
            Bucket: $inputs.enrollBucket
            Name: $inputs.enrollName
        ExternalImageId: $inputs.externalImageId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      faceRecords: $response.body#/FaceRecords
      unindexedFaces: $response.body#/UnindexedFaces
  outputs:
    collectionIds: $steps.listCollections.outputs.collectionIds
    faceRecords: $steps.indexFaces.outputs.faceRecords

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/amazon-rekognition-reuse-or-create-collection-enroll-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.