Skip to content
Back to skills

rekognition-migration

BSecurity

Migrate face recognition code from AWS Rekognition to the SightRadar API. Use when the user wants an AWS Rekognition alternative, wants to cut Rekognition face search costs, or needs to port IndexFaces, SearchFacesByImage, SearchFaces, CompareFaces, DetectFaces, CreateCollection, DeleteFaces or DeleteCollection calls (boto3, AWS SDK for JavaScript, or CLI) to SightRadar, re-index a face collection, or recalibrate similarity thresholds.

  • 0 votes
  • 0 copies
  • 1 view
  • Added December 5, 2026
ai-agentsjavascriptpythongojavaawsapi

Works with

  • cli
  • api

Security analysis

B84/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned December 5, 2026

npx -y skills add sightradar-hq/sightradar-skills --skill rekognition-migration --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of rekognition-migration?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for rekognition-migration
[![Security: B — Skills Directory](https://www.skillsdirectory.com/api/skills/sightradar-hq-rekognition-migration/badge)](https://www.skillsdirectory.com/skills/sightradar-hq-rekognition-migration)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: rekognition-migration
description: Migrate face recognition code from AWS Rekognition to the SightRadar API. Use when the user wants an AWS Rekognition alternative, wants to cut Rekognition face search costs, or needs to port IndexFaces, SearchFacesByImage, SearchFaces, CompareFaces, DetectFaces, CreateCollection, DeleteFaces or DeleteCollection calls (boto3, AWS SDK for JavaScript, or CLI) to SightRadar, re-index a face collection, or recalibrate similarity thresholds.
license: MIT
compatibility: Needs network access to api.sightradar.com and a SightRadar API key in SIGHTRADAR_API_KEY. Works on any codebase; examples use Python and curl.
metadata:
  author: SightRadar team
  version: "1.0.0"
  homepage: https://sightradar.com
---

# Migrating from AWS Rekognition to SightRadar

SightRadar covers the face collection part of Rekognition: index, search, compare, detect and delete. It does **not** do labels, text, moderation, celebrity recognition, video analysis, face attributes (age, emotion) or Face Liveness. If the user's code uses those, keep Rekognition for them and say so up front.

## Route mapping

| Rekognition | SightRadar |
| --- | --- |
| `CreateCollection` | `POST /v1/collections` `{"collection_id": "..."}` (also created on first index) |
| `ListCollections` / `DescribeCollection` | `GET /v1/collections` / `GET /v1/collections/{id}` |
| `DeleteCollection` | `DELETE /v1/collections/{id}` (soft by default; `?immediate=true` to erase now) |
| `IndexFaces` | `POST /v1/collections/{id}/index` |
| `IndexFaces` with `MaxFaces=1` (a user's reference face) | `POST /v1/collections/{id}/selfies` |
| `SearchFacesByImage` | `POST /v1/collections/{id}/search` |
| `SearchFaces` (by `FaceId`) | `POST /v1/collections/{id}/search-by-id` |
| `CompareFaces` | `POST /v1/compare` |
| `DetectFaces` | `POST /v1/detect` |
| `DeleteFaces` | `DELETE /v1/collections/{id}/photos/{photoId}` (per photo, not per face) |
| `DeleteUser` | `DELETE /v1/collections/{id}/users/{userId}` |

Base URL `https://api.sightradar.com`. Spec: https://api.sightradar.com/openapi.json

## What changes in the code

- **Auth.** One header, `Authorization: Bearer $SIGHTRADAR_API_KEY`. No SigV4, IAM roles or regions. The boto3 client cannot be pointed at SightRadar with `endpoint_url`; replace the calls with the SDK (`pip install sightradar`, `npm install sightradar`) or plain HTTP.
- **Images.** `Image.Bytes` becomes a multipart `file` upload. `Image.S3Object` becomes a URL the API can fetch: generate a presigned S3 URL.
- **Scores.** Similarity is cosine similarity from **0 to 1**, not 0 to 100. `FaceMatchThreshold=80` does not become `0.80`; see the threshold step below.
- **Results are photos, not faces.** Search returns `matches[{photo_id, score}]`, one row per photo. `ExternalImageId` becomes `photoId`. `FaceId` becomes `point_id`.
- **Bounding boxes** stay ratios of the image size: `left`, `top`, `width`, `height` in lower case.
- **Deletes** work per photo, selfie, user or collection. There is no delete of a single face inside a group photo.
- **Billing** is per photo, not per face or per API call: 93 credits real-time, 62 in batch and for search by id (1 credit = $0.00001). Compare is 93 per image.

## Before and after

```python
# Before: boto3
rek = boto3.client("rekognition")
rek.index_faces(CollectionId="event-2026", ExternalImageId="img-42",
                Image={"S3Object": {"Bucket": "photos", "Name": "img-42.jpg"}})
res = rek.search_faces_by_image(CollectionId="event-2026", FaceMatchThreshold=80, MaxFaces=50,
                                Image={"Bytes": selfie_bytes})
photo_ids = {m["Face"]["ExternalImageId"] for m in res["FaceMatches"]}
```

```python
# After: pip install sightradar
from sightradar import SightRadar
sr = SightRadar()                                   # reads SIGHTRADAR_API_KEY
url = s3.generate_presigned_url("get_object", Params={"Bucket": "photos", "Key": "img-42.jpg"}, ExpiresIn=3600)
sr.index("event-2026", url=url, photo_id="img-42")
res = sr.search("event-2026", file="selfie.jpg", limit=50)
photo_ids = [m.photo_id for m in res.matches]       # already one entry per photo, ranked
```

## Runbook

Work in this order and keep Rekognition running until the last step.

1. **Inventory.** Search the codebase for `rekognition`, `index_faces`, `search_faces`, `compare_faces`, `detect_faces`, `IndexFacesCommand` and similar. List each call site, what it feeds, and any Rekognition feature SightRadar lacks.
2. **Smoke test.** With the user's key, index one photo into a scratch collection and search it. This proves the key, the network path and image access.
3. **Port behind a switch.** Put the face calls behind one interface with two implementations, chosen by a config flag. Do not delete the Rekognition code yet.
4. **Re-index from the source images.** This step cannot be skipped: faceprints only work with the model that made them, so nothing can be exported from Rekognition and imported. Use the batch route for large sets (62 credits per photo, 1,000 URLs per call; see the `face-batch-indexing` skill). **Tell the user the photo count and the cost, and get a yes before starting.**
5. **Compare results side by side.** Run the same searches on both systems and compare the ranked photo ids, not the raw scores.
6. **Recalibrate the threshold.** Score a few hundred known same-person and different-person pairs from the user's data on SightRadar and set the cut-off where they separate. Never reuse the Rekognition number.
7. **Switch reads**, keep the old collection for a rollback window, then delete it.

## Rules for the agent

- Refer to the key only as `$SIGHTRADAR_API_KEY`. Never print or commit it.
- Do not run the re-index or delete the Rekognition collection without the user's explicit go-ahead: the first costs money, the second cannot be undone.
- Do not promise identical results. A different model ranks borderline faces differently; step 5 is how the user sees the difference.

Migration guide: https://sightradar.com/docs/guides/migrate-from-rekognition and full docs at https://sightradar.com/llms.txt

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.