Securityflags: g
AWS Access Key ID
Match AWS access key IDs (both long-term AKIA and temporary ASIA prefixes).
Try it in RegexProPattern
regexJavaScript
/\b(?:AKIA|ASIA)[0-9A-Z]{16}\b/gRaw source: \b(?:AKIA|ASIA)[0-9A-Z]{16}\b
How it works
Starts with AKIA (long-term user key) or ASIA (short-term STS session key), followed by exactly 16 uppercase alphanumeric characters. Word boundaries prevent partial matches.
Examples
Input
AKIAIOSFODNN7EXAMPLEMatches
AKIAIOSFODNN7EXAMPLE
Input
ASIAIOSFODNN7EXAMPLEMatches
ASIAIOSFODNN7EXAMPLE
Input
not a keyNo match
—Common use cases
- Secret scanning in git repos
- Preventing accidental AWS credential commits
- Log redaction pipelines
- Security audit tooling