UUID / GUID Generator

UUID v4, v7, ULID y NanoID — 100% client-side, ningún ID se almacena

122 bits aleatorios — uso general

AWS External ID (STS AssumeRole)

External ID generado

IAM Trust Policy
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Principal": {
        "AWS": "arn:aws:iam::ACCOUNT_ID:root"
      },
      "Action": "sts:AssumeRole",
      "Condition": {
        "StringEquals": {
          "sts:ExternalId": ""
        }
      }
    }
  ]
}
Python / Boto3
import boto3

sts = boto3.client('sts')
response = sts.assume_role(
    RoleArn='arn:aws:iam::ACCOUNT_ID:role/ROLE_NAME',
    RoleSessionName='my-session',
    ExternalId='',
)
credentials = response['Credentials']

El External ID protege contra el confused deputy problem. Generá uno único por cliente/integración y almacenalo en Secrets Manager o Parameter Store.

RFC 9562

UUID v4

122 bits aleatorios — uso general

Sortable

UUID v7

Timestamp + random — ideal para DB keys

26 chars

ULID

Lexicográficamente ordenable, Crockford Base32

21 chars

NanoID

URL-safe, compacto, 126 bits efectivos