Securityflags: g

AWS Access Key ID

Match AWS access key IDs (both long-term AKIA and temporary ASIA prefixes).

Try it in RegexPro

Pattern

regexJavaScript
/\b(?:AKIA|ASIA)[0-9A-Z]{16}\b/g

Raw 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

AKIAIOSFODNN7EXAMPLE

Matches

  • AKIAIOSFODNN7EXAMPLE

Input

ASIAIOSFODNN7EXAMPLE

Matches

  • ASIAIOSFODNN7EXAMPLE

Input

not a key

No match

Common use cases

  • Secret scanning in git repos
  • Preventing accidental AWS credential commits
  • Log redaction pipelines
  • Security audit tooling