AgentCore Gateway and Policy Engine have opposite naming rules
1 min read
I tried creating an AgentCore Gateway and Policy Engine with the same naming prefix and hit ValidationException on one or the other every time.
Gateway names allow hyphens only — underscores are rejected:
Value 'my_gateway' at 'name' failed to satisfy constraint:
Member must satisfy regular expression pattern: ([0-9a-zA-Z][-]?){1,48}Policy Engine names allow underscores only — hyphens are rejected:
Value at '/name' failed to satisfy constraint:
Member must satisfy regular expression pattern: ^[A-Za-z][A-Za-z0-9_]*$Opposite naming conventions within the same service. Use my-gateway + my_policy_engine. Gateway Target names follow the Gateway convention (hyphens OK).
