Usage — identifiers-only 0.2.0 release
Version 0.2.0. The SageMaker package is certified for Marketplace and the owner approved publication and commercial terms. Consult the Marketplace offer for subscription availability. PERSON/ADDRESS detection is not available in this release. The image locks its identifiers-only profile; non-off NER overrides are rejected, and no neural weights or runtime are included.
Marketplace deployment and first invocation
Use the LatAm Identifier Redaction 0.2.0 Marketplace offer when available. Review its current availability and terms before subscribing; do not substitute a private image or an unrelated product.
- Review the offer's version, supported region/instance types, usage terms and software/infrastructure charges, then subscribe through AWS Marketplace.
- Use the offer's SageMaker deployment workflow to create an endpoint in your AWS account, following your organization's IAM, network and execution-role policies. Wait until it is InService. Endpoint provisioning and charges are controlled by you; the example below does not create or delete resources.
- In a Python environment with
boto3 installed, use an existing approved AWS session/role authorized for sagemaker:InvokeEndpoint on that endpoint. Replace the region and endpoint placeholders. Do not paste credentials into this example.
import json
import boto3
runtime = boto3.Session(region_name="YOUR_AWS_REGION").client("sagemaker-runtime")
response = runtime.invoke_endpoint(
EndpointName="YOUR_EXISTING_ENDPOINT_NAME",
ContentType="application/json",
Accept="application/json",
Body=json.dumps({
"text": "RFC LUNA910210AB1; RUT 12.345.678-5",
"mode": "replace",
"country_hint": "auto",
}).encode("utf-8"),
)
try:
result = json.loads(response["Body"].read())
finally:
response["Body"].close()
assert result["version"] == "0.2.0"
assert result["capabilities"]["person_address_ner"] is False
assert "[MX_RFC]" in result["redacted_text"]
assert "[CL_RUT]" in result["redacted_text"]
All example values are synthetic, not claimed assigned identities. Failed checksums do not prevent redaction. Start with synthetic inputs and inspect capabilities, validation fields and warnings before assessing your own permitted workload. The notebook invokes an existing endpoint only; it does not subscribe, deploy, delete resources or retrieve secrets. You do not need access to this product's private source repository or private container registry.
Types and modes
The eight primary country-specific candidate types are AR_CUIT, AR_DNI, CL_RUT, CO_CEDULA, CO_NIT, DO_CEDULA, MX_CURP and MX_RFC, plus EMAIL. CUIT/CUIL share AR_CUIT; RUT/RUN share CL_RUT. Protective AMBIGUOUS_ID emissions may also appear and remain unverified. Do not interpret them as a verified nationality or a ninth national identifier scheme.
| Mode |
Result |
mask — default |
Replaces every detected code point with U+2588 (█). |
replace |
Replaces detected spans with type tags such as [MX_RFC]. |
hash |
Uses server-managed, type-scoped HMAC-SHA256 pseudonyms truncated to 128 bits. |
detect_only |
Returns span/validation metadata and omits redacted_text; it does not echo source text. |
Unmatched text remains unchanged in redaction modes. In particular, names, postal addresses, phones, bank/card details and unsupported identifiers are not comprehensively detected. The application does not log request bodies or include raw entity values in metadata; operators must also control their own SDK, proxy, storage and platform logging.
Hash-key management
Hash mode requires LATAM_PII_HASH_KEY configured on the server, at least 32 UTF-8 bytes and high entropy. Provision it through your approved secret-management and injection process. Never put a key in a notebook, request, source file, shell history or command-line argument. Requests cannot set or override the key; an unconfigured hash request fails rather than silently changing mode.
The same exact matched text and entity type share a pseudonym under the same key. Spacing/case changes or key rotation change it. Pseudonyms are linkable and are not anonymization; access to the key permits guessing low-entropy identifiers. Keep caller identities and service permissions within your approved authenticated boundary. The notebook does not create identities, retrieve shared secrets or deploy AWS resources.
Validation limits
syntax_valid describes only implemented structure checks. valid_checksum: true is limited to supported arithmetic; false indicates a checked failure and null means unknown/unverified. Identifier issuer_verified remains false. None of these fields establishes assignment, identity or compliance.
- CL RUT/RUN and supported AR CUIT/CUIL have implemented arithmetic; supported CO NIT arithmetic is limited to a nine-digit body.
- MX RFC arithmetic is partial. Ambiguous remainder cases and documented generic RFCs remain unknown; there is no homoclave assignment or issuer lookup.
- MX CURP and DO cédula checksums remain unverified. AR DNI and CO cédula have no universal checksum claimed by this implementation.
- Failed, unsupported-prefix, partially masked and unverified candidates recognized by the detector still undergo the selected redaction mode. Recognition of every spelling or mask is not promised.
See identifier sources for supported arithmetic, lengths, remainder rules and provenance limits. Detection is broader than validation. Email syntax matching does not verify ownership or deliverability.
Country hints are auto, MX, CL, AR, DO or CO. auto uses supported structures/labels and can miss bare numbers. Hints enable some bare numeric candidates and disambiguate cédula labels; they can also redact ordinary numbers and do not suppress explicit foreign identifiers. Use them only with justified context. OCR errors, arbitrary inserted whitespace/zero-width characters, historical variants and some partially masked spellings remain limitations.
Realtime and batch contract
GET /ping: 200 when ready, 503 when loading fails.
POST /invocations: a JSON record, JSON array, {"instances":[...]}, JSON Lines, plain text, or strict one-column CSV with exactly a text header.
- Record fields:
text, optional mode, optional country_hint. Unknown fields are rejected.
- JSON arrays/envelopes and CSV return
{"predictions":[...]}. JSON Lines returns one result per nonempty input line. A single JSON/text record returns one result.
- Maximum request body: 256 KiB of UTF-8 bytes. Maximum 16 records, 16,000 Unicode code points per record, 64,000 total. These are separate limits.
- Every record is validated before prediction; errors return no partial batch output. Invalid input is rejected with generic errors. Unsupported content type returns 415; body/framing failures can return 413/400.
- Eight accepted handlers, one active inference and a five-second read timeout. Run behind an authenticated service boundary, not as an unauthenticated public web server.
SageMaker's execution-parameter scheduling hints do not increase the 256 KiB application limit. Realtime and Batch Transform inputs must respect the same content and payload contract.
Offsets are zero-based, start-inclusive/end-exclusive Unicode code points in original input. Use text[start:end] in Python and Array.from(text).slice(start,end).join('') in JavaScript. They are not UTF-8 bytes or JavaScript UTF-16 indices. No OCR correction or rewriting of the input text is performed. Intersecting detections are unioned to preserve covered suffixes; merged_types retains overlap evidence, and validation_scope can indicate that validation applied before that union.
Software price and release status
The owner-approved software rates configured in the Marketplace offer are:
| SageMaker instance |
USD per software instance-hour |
ml.m5.large |
$0.50 |
ml.c5.xlarge |
$0.50 |
The approved offer includes a 14-day software trial. AWS infrastructure and other AWS charges are separate, including during a software trial. These are software rates, not per-request/token prices or an all-inclusive infrastructure quote. The current Marketplace offer controls subscription availability and final purchase terms.
The exact release image has local HTTP and private AWS measurements, summarized with their limits in the model card. The independent V4 synthetic set passed; prior exposed or failed sets remain development evidence. None establishes real-population accuracy. The owner approved the documented source/license boundaries, limitations and software terms. The model package is certified and public buyer assets are available; consult the Marketplace offer for subscription availability. Human review and representative permitted workload evaluation are still needed to substantiate broader accuracy claims. Older neural-image timing or scan results do not describe this release.