Skip to content

HTTP runtime gateway targets cannot configure schema for policy guardrails #1985

Description

@nborges-aws

Description

AgentCore Gateway HTTP runtime targets support an optional API schema. However, AWS documentation states that HTTP runtime agents are required provide this schema when using guardrails.

The CLI exposes --schema for gateway targets, but currently rejects it for --type http-runtime. Consequently, users cannot configure policy guardrails correctly for HTTP runtime targets.

Steps to Reproduce

Reproduce --schema validation rejection

  1. create HTTP runtime with a policy engine
  2. Add an HTTP runtime target while passing --schema flag

Reproduce deploy failure

  1. create HTTP runtime with a policy engine
  2. Add an HTTP runtime target without passing --schema flag
  3. Deploy the target and apply guardrail policies
  4. Attempt to invoke the target

Expected Behavior

  • The CLI should accept a schema for HTTP runtime targets
  • benign requests permitted by policy should succeed

Actual Behavior

  • CLI rejects --schema for HTTP runtime targets
  • benign requests permitted by policy are rejected due to missing schema

CLI Version

No response

Operating System

macOS

Additional Context

  • Accept and validate --schema for http-runtime in CLI
  • persist schema source in agentcore.json
  • persist schema through deploy

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions