Skip to content

New serverless pattern - strands-agentcore-lambda#3102

Open
humem001 wants to merge 1 commit into
aws-samples:mainfrom
humem001:humem001-feature-strands-agentcore-lambda
Open

New serverless pattern - strands-agentcore-lambda#3102
humem001 wants to merge 1 commit into
aws-samples:mainfrom
humem001:humem001-feature-strands-agentcore-lambda

Conversation

@humem001
Copy link
Copy Markdown
Contributor

@humem001 humem001 commented May 7, 2026

Serverless AI agent pattern using Strands Agents SDK, AWS Bedrock, and AgentCore Gateway with Lambda interceptors for multi-tenant JWT authentication and tool execution via MCP protocol.

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

@marcojahn
Copy link
Copy Markdown
Contributor

Hello @humem001,
Thanks for the submission — strong pattern overall. Well-architected, good security posture (per-function IAM, least-privilege), and thorough documentation.

Please fix

  1. AWS naming conventions in README.md:
    • "AWS Bedrock" → "Amazon Bedrock" (Amazon-branded, not AWS-branded)
    • "Cognito" → "Amazon Cognito" on first reference

Suggested improvements

  • Folder structure — ~10 loose scripts at root level alongside organized src/, tests/, infrastructure/. Recommend moving to a scripts/ directory.
  • IaC tooling — Raw CFN + 6-script packaging pipeline. Consider SAM (sam build && sam deploy replaces the whole pipeline). If AgentCore resources lack SAM support, a one-liner in the README explaining the choice would help.
  • SecurityCloudWatchLogsFullAccess on the Gateway role is broader than needed. Scope to an inline policy with logs:CreateLogGroup/CreateLogStream/PutLogEvents.
  • Portability — Hardcoded us-east-1 in create_cognito_user.py and test_e2e_flow.py. Read from AWS_REGION env var or stack outputs instead.
  • Performance — Gateway URL is cached at instance level in AgentProcessor, but the class is re-instantiated per invocation. Move cache to module level for cross-invocation benefit.

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.

3 participants