@shinyaz

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).

Share this post

Shinya Tahara

Shinya Tahara

Solutions Architect @ AWS

I'm a Solutions Architect at AWS, providing technical guidance primarily to financial industry customers. I share learnings about cloud architecture and AI/ML on this site.The views and opinions expressed on this site are my own and do not represent the official positions of my employer.