All articles

Comparisons

Migrate IndexFaces and SearchFacesByImage from AWS Rekognition

Swap one endpoint (or keep your boto3 calls via the shim). Here's the migration that survives production.

By SightRadar EngineeringUpdated 9 min read Markdown

TL;DR

SightRadar accepts the same CreateCollection, IndexFaces, and SearchFacesByImage request/response shapes as AWS Rekognition, so most migrations are an endpoint + credentials change plus a re-index of existing faces (embeddings are not portable between engines). This guide covers the exact code change, a field-level compatibility matrix, a zero-downtime dual-write backfill, and rollback. It does not make your app GDPR-compliant on its own — you still own consent, storage, and deletion.

If you run face search on AWS Rekognition, the friction usually isn't the API — it's everything around it: raising per-operation TPS quotas by support ticket, no console to browse a collection, JPEG/PNG-only ingestion, and a per-image price that adds up. SightRadar is a dedicated face recognition API that mirrors Rekognition's face operations, so you can move without rewriting your integration.

What actually transfers (and what doesn't)

Your code transfers: the request and response shapes for the face-collection operations match. Your face vectors do not — embeddings are engine-specific, so you re-index the source images against the new engine. Plan the migration around re-indexing from your own image store, not exporting vectors from AWS.

Rekognition operationSightRadarNotes
CreateCollection✅ SupportedSame collection-id semantics
IndexFaces✅ SupportedSame detected/failed face records; per-photo billing
SearchFacesByImage✅ SupportedSelfie → ranked matches; set your own threshold
SearchFaces✅ SupportedSearch by an existing face id
CompareFaces✅ Supported1:1 similarity you threshold
DetectFaces✅ SupportedQuality-gate without storing
ListFaces / DeleteFaces✅ SupportedManage a collection's faces
ListCollections / DeleteCollection✅ SupportedLifecycle management
Compatibility matrix — verified 2026-07-17. Scope 'drop-in' to this list.

Note: Verify the matrix against your own calls before cutting over. 'Drop-in compatible' means these operations share request/response shapes — not that every field of every AWS SDK call is identical. Test the specific fields your code reads.

Step 1 — Point your existing client at the new endpoint

SightRadar exposes a native REST API at https://api.sightradar.com with Authorization: Bearer <key>. Keys are created in the console and shown once. Here's the smallest possible index-then-search against the native API:

import os, requests

BASE = "https://api.sightradar.com"
H = {"Authorization": f"Bearer {os.environ['SR_API_KEY']}"}

# Create a collection (free — only face ops are billable)
requests.post(f"{BASE}/v1/collections", headers=H,
              json={"collection_id": "event-2026"})

# Index a photo. Pass your own photoId so you can map matches back later.
requests.post(f"{BASE}/v1/collections/event-2026/index", headers=H,
              json={"url": "https://cdn.example.com/img/001.jpg",
                    "photoId": "img-001"})

# Search with a selfie. Returns photo_ids ranked by similarity.
r = requests.post(f"{BASE}/v1/collections/event-2026/search", headers=H,
                  json={"url": "https://cdn.example.com/selfie.jpg", "limit": 10})
print(r.json())                              # ranked matches (JSON body)
print(r.headers["X-Credits-Remaining"])      # remaining credits (response header)
Index a photo, then search with a selfie — native SightRadar API.

If you prefer to keep your AWS SDK call sites unchanged, use the open-source sightradar-rekognition-shim, which maps IndexFaces/SearchFacesByImage/CompareFaces onto the SightRadar endpoint so your boto3-style code keeps working. See the migration page for the side-by-side.

Step 2 — Map face ids back to your records

A production integration is mostly bookkeeping. Store the mapping between the API's face/photo identifiers and your own domain records so a search result becomes a person, image, and tenant:

create table face_index (
  tenant_id   text not null,
  photo_id    text not null,   -- your id, passed as photoId at index time
  source_url  text not null,
  face_count  int  not null,
  indexed_at  timestamptz not null default now(),
  primary key (tenant_id, photo_id)
);
-- one collection per tenant (or per event) keeps searches isolated

Step 3 — Zero-downtime backfill with dual writes

  1. Dual-write new index calls to both Rekognition and SightRadar while you backfill. Reads still serve from Rekognition.
  2. Backfill historical images by re-indexing from your object store into SightRadar collections. This is the bulk of the work; use batch indexing for the lower per-photo rate.
  3. Validate by running a fixed set of known selfies against both engines and comparing the ranked results — not raw scores, which aren't comparable across engines.
  4. Cut reads over to SightRadar once parity holds, keeping dual writes for a grace period.
  5. Decommission the Rekognition path after the grace window.

Tip: Billing is per photo processed, not per face — a photo with zero faces is a valid, charged result. Budget the backfill by counting source photos, and use an Idempotency-Key so a retried batch never double-charges.

Step 4 — Rollback plan

Because you kept dual writes and never deleted the Rekognition collection during the grace period, rollback is a read-path flip back to AWS. Keep the identifier mapping stable across both engines so no re-mapping is needed if you revert.

What this migration does not do

  • It does not make your product legally compliant. You still capture consent, isolate tenants, and honor deletion — see Trust & responsible use.
  • It does not provide liveness / anti-spoofing. Face matching alone does not stop a printed-photo or replay attack; add liveness if your use case needs it.
  • It does not migrate vectors. You re-index source images; plan storage and time for the backfill.

Estimate the credits to re-index your existing photo library.

Open the pricing calculator

Frequently asked questions

Can I keep my existing AWS SDK / boto3 code?

Largely yes. SightRadar mirrors the request and response shapes for the face-collection operations (CreateCollection, IndexFaces, SearchFacesByImage, SearchFaces, CompareFaces, DetectFaces, ListFaces/DeleteFaces, ListCollections/DeleteCollection). You change the endpoint to https://api.sightradar.com and use a SightRadar API key; an optional shim maps Rekognition method names. Verify the specific fields your code reads against the compatibility matrix before cutover.

Do my indexed faces transfer from AWS Rekognition?

No. Face embeddings are engine-specific and are not portable between providers. You re-index your source images from your own object store into SightRadar collections. Plan the migration as a backfill with dual writes, not a vector export.

How is SightRadar priced compared to Rekognition?

SightRadar bills per photo processed in USD: real-time index $0.00093, batch index $0.00062, and search-by-id $0.00062, with storage at $6 per million stored faces per month. It is pegged below AWS Rekognition's Group-1 reference of $0.00125 per image. Check the pricing page for current rates before quoting numbers.

Is the migration reversible?

Yes, if you keep dual writes and retain the Rekognition collection through a grace period. Rollback is a read-path flip back to AWS. Keep the identifier mapping stable across both engines so no re-mapping is required.

Keep reading