Skip to content

Implement serverless AWS architecture with Lambda functions and Bedrock Agent integration#1

Draft
Copilot wants to merge 7 commits intomainfrom
copilot/add-personalized-lol-insights
Draft

Implement serverless AWS architecture with Lambda functions and Bedrock Agent integration#1
Copilot wants to merge 7 commits intomainfrom
copilot/add-personalized-lol-insights

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Nov 7, 2025

Implements serverless architecture for personalized LoL insights using AWS CDK, 3 Lambda functions, API Gateway, S3 storage, and Amazon Bedrock Agent orchestration.

Infrastructure (AWS CDK)

  • S3 bucket: Versioned storage for match data with encryption and blocked public access
  • API Gateway REST API: 3 endpoints with CORS (/api, /ingest, /tools)
  • Lambda functions: Node.js 20.x runtime with appropriate timeouts (30s API, 60s Ingest, 30s Tools)
  • IAM roles: Least-privilege access to S3 and Bedrock services

Lambda Functions

API Lambda (amplify/functions/api/)

Orchestrates Bedrock Agent invocations with streaming response handling. Falls back gracefully when agent unconfigured.

const command = new InvokeAgentCommand({
  agentId,
  agentAliasId,
  sessionId: sessionId || crypto.randomUUID(),
  inputText: query,
});

Ingest Lambda (amplify/functions/ingest/)

Validates and persists match data to S3 at match-data/{playerId}/{matchId}.json with metadata.

Tools Lambda (amplify/functions/tools/)

Provides 3 actions for Bedrock Agent: getPlayerMatches, getMatchDetails, getPlayerStats. Handles S3 NoSuchKey errors and JSON parsing failures.

Frontend

Interactive Next.js UI with tabbed documentation showcasing architecture components and API examples with request/response payloads.

Configuration

  • bedrock-agent-config.yaml: OpenAPI 3.0 schema for Bedrock Agent action group configuration
  • Backend integration via amplify/backend.ts creates custom CDK stack
  • Deployment guide and architecture documentation included

Post-deployment requires configuring Bedrock Agent and updating Lambda environment variables with Agent ID/Alias.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • fonts.googleapis.com
    • Triggering command: /usr/local/bin/node /home/REDACTED/work/Rift-Rewind-Reviewer/Rift-Rewind-Reviewer/node_modules/next/dist/compiled/jest-worker/processChild.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

 Rift Rewind Reviewer: Track, Reflect, Depart

Goal: Personalized LoL insights via AWS AI agent

Architecture: Serverless (Next.js frontend, AWS CDK for).

Services: S3 (Data), 3x Lambda (API, Ingest, Tools), API Gateway, Amazon Bedrock Agent (Orchestrator).


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Add personalized League of Legends insights via AWS AI agent Implement serverless AWS architecture with Lambda functions and Bedrock Agent integration Nov 7, 2025
Copilot AI requested a review from luke-cheng November 7, 2025 03:40
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