Skip to content

feat: add optional REST API wrapper (Part 4) - #20

Open
charliejllewellyn wants to merge 2 commits into
aws-samples:mainfrom
charliejllewellyn:api-support
Open

feat: add optional REST API wrapper (Part 4)#20
charliejllewellyn wants to merge 2 commits into
aws-samples:mainfrom
charliejllewellyn:api-support

Conversation

@charliejllewellyn

Copy link
Copy Markdown

Adds an async REST API (API Gateway + Lambda + DynamoDB) that wraps the AgentCore geospatial agent behind a stable contract boundary.

  • POST /analyze: submit analysis job, returns job ID immediately
  • GET /jobs/{jobId}: poll for status and results
  • GET /capabilities: list available analysis types
  • API key authentication, no timeout constraints
  • Worker Lambda invokes AgentCore async (up to 5 min)
  • DynamoDB job table with 24h TTL
  • One-command deploy via deploy.sh
  • Updated README with Part 4 deployment guide and API contract

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Charlie Llewellyn added 2 commits April 14, 2026 15:12
Adds an async REST API (API Gateway + Lambda + DynamoDB) that wraps
the AgentCore geospatial agent behind a stable contract boundary.

- POST /analyze: submit analysis job, returns job ID immediately
- GET /jobs/{jobId}: poll for status and results
- GET /capabilities: list available analysis types
- API key authentication, no timeout constraints
- Worker Lambda invokes AgentCore async (up to 5 min)
- DynamoDB job table with 24h TTL
- One-command deploy via deploy.sh
- Updated README with Part 4 deployment guide and API contract
- Add POST /mcp route with MCP JSON-RPC handler (initialize, tools/list, tools/call)
- Create separate API Gateway API key for MCP, auto-stored in SSM via CDK custom resource
- Worker Lambda handles MCP tool calls via agent invocation
- Update deploy.sh to print MCP endpoint URL, key ID, and SSM path
- Update README with MCP endpoint docs, test commands, and mesh registration guide
- CloudFormation outputs: McpEndpointUrl, McpApiKeyId, McpApiKeySsmPath
@bishesh16

Copy link
Copy Markdown
Contributor

Thank you @charliejllewellyn for this Pull request. Overall great feature.
I have only a few minor comments:

  • Please don't change default region or model ID — keep us-east-1 and the current model default.
  • Please scope changes to api-cdk/ and README.md only — avoid modifying shared files like config.py, deploy.sh, and geospatial_agent_on_aws.py unless strictly necessary for the API feature.
  • this is to avoid having merge conflicts on the core parts.

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants