Chatbot AWS Bedrock + Claude
kosi-so/chatbot_aws_anthropic
Chatbot escalável com Claude no AWS Bedrock, React + FastAPI + ECS
Ver no GitHubChatbot full-stack que integra Claude via AWS Bedrock, com frontend React hospedado em S3/CloudFront e backend FastAPI em ECS Fargate. Demonstra deploy escalável e integração segura de IA em arquitetura cloud-native, com CI/CD automatizado via GitHub Actions.
Instalação
npx convez-ai kosi-so/chatbot_aws_anthropic1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.
Métricas
Casos de uso
- Deploy de assistentes IA em produção na AWS
- Integração segura de Bedrock com aplicações web
- Arquitetura full-stack com CI/CD automatizado
Veredito

Exemplo sólido de integração Anthropic em stack AWS enterprise. Bem estruturado para quem precisa de padrão pronto para produção, mas exige conhecimento intermediário de AWS, Docker e infraestrutura. Útil como referência arquitetural mais que como plugin plug-and-play.
README
A tradução para o português deste README ainda está na fila.
AWS Bedrock + Claude Chatbot ☁️🤖
A full-stack chatbot using AWS Bedrock (Anthropic Claude) with a React frontend deployed via S3, and a FastAPI backend hosted on ECS Fargate. CI/CD is managed with GitHub Actions.
⚙️ Features
- React SPA for a sleek chat UI deployed to S3 + CloudFront
- FastAPI backend running on ECS, serving POST
/chatrequests to Claude via Bedrock - Request logging and simple conversation history
- Strict CORS setup between frontend and backend
- Fully automated CI/CD with GitHub Actions for both backend container and frontend build
📁 Project Structure
chatbot_aws_anthropic/
├── .github/workflows/deploy.yml # CI/CD pipeline
│
├── backend/ # FastAPI app
│ ├── main.py # API endpoints + CORS + chat history
│ ├── bedrock_client.py # Claude 3.5 message API handler
│ └── .env # AWS credentials
│
├── frontend/ # React app
│ ├── src/
│ │ └── App.js # Chat UI logic
│ └── package.json
│
└── README.md\
✅ Prerequisites
- AWS account with permissions for: ECS, ECR, S3, CloudFront, IAM, Bedrock
- Bedrock Anthropic Claude access
- GitHub repository secrets:
AWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEYAWS_REGIONECR_BACKEND_REPOECS_CLUSTERECS_SERVICETASK_DEFINITION_FAMILYS3_BUCKET_NAME
🛠️ Setup
1. Backend
cd backend
uvicorn main:app --reload --port 8000
visit: http://localhost:8000/docs to test
2. Frontend
cd frontend
npm install
npm run build
3. AWS Infrastructure
-
Ensure these are created:
- ECR repository
- ECS Fargate cluster + service
- Task definition referencing the image
- S3 bucket for frontend hosting
- IAM task role with bedrock:InvokeModel access
🚀 CI/CD: GitHub Actions
Workflow: .github/workflows/deploy.yml
🔧 Backend Steps:
- Checkout code
- Login to ECR
- Build and push Docker image
- Register and update ECS task definition and service
🎨 Frontend Steps:
- Install dependencies
- Build React app
- Sync to S3 bucket
🔒 IAM Permissions
ECS Task Role must have:
AmazonECSTaskExecutionRolePolicy- Inline policy (e.g.,
BedrockInvokeModelPolicy):
{
"Effect": "Allow",
"Action": "bedrock:InvokeModel",
"Resource": "<Claude-model-ARN>"
}
💡 Usage
- Push to
mainbranch. - GitHub Actions CI/CD pipeline automatically:
- Builds and pushes the backend Docker image to ECR.
- Registers and updates the ECS service with the new task definition.
- Builds the React frontend and syncs it to the S3 bucket.
- Access the chatbot:
- Via the S3/CloudFront URL for the frontend.
- Via
/docson the backend Load Balancer URL for API testing.
🛠️ Troubleshooting
-
500 Internal Server Error
→ Check ECS container logs in the AWS Console. Confirm IAM roles have necessary permissions (especially for Bedrock access). -
CORS Error
→ Ensureallow_originsinCORSMiddlewarematches the deployed S3 frontend URL. -
ELB Health Check Failed
→ Make sure your FastAPI backend listens on port8000and the Docker container exposes that port. -
Pipeline Failures
→ Double-checkTASK_DEFINITION_FAMILY, IAM roles, and GitHub secrets (AWS_ACCESS_KEY_ID,ECR_BACKEND_REPO, etc.).
🧪 Local Development
# Run the backend locally
cd backend
uvicorn main:app --reload
# Run the frontend locally
cd frontend
npm install
npm start
📄 License & Credits
This project is licensed under the MIT License.
Credits
- Built with:
Inspired by deployment patterns for AWS Bedrock and LLM-based chatbots.