aws / aws/agentcore-cli

HTTP runtime gateway targets cannot configure schema for policy guardrails

Open
#1,985 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
283
Forks
95
Avg merge
1d 2h
Merged PRs (30d)
183

Description

### 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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.