Skip to content

DheerajShrivastav/aws-deploy-ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

30 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

AWS Deploy AI - AI-Powered AWS Deployment Platform (Monorepo)

AWS Deploy AI TypeScript Next.js AWS Bedrock Monorepo

πŸ—οΈ Monorepo Architecture

This monorepo contains two main packages:

  • @aws-deploy-ai/mcp-server: Model Context Protocol server with AWS Bedrock integration
  • @aws-deploy-ai/frontend: Next.js web interface for the deployment platform

πŸš€ Quick Start

1. Environment Setup

# Copy environment variables
cd packages/frontend
cp .env.local.example .env.local

2. GitHub OAuth Setup

  1. Go to GitHub Settings > Developer Settings > OAuth Apps
  2. Create a new OAuth App with:
    • Application name: AWS Deploy AI
    • Homepage URL: http://localhost:3000
    • Authorization callback URL: http://localhost:3000/api/auth/github/callback
  3. Copy the Client ID and Client Secret to your .env.local file

3. Start Development

# Install all dependencies and build MCP server
npm run install-all

# Start development environment (both packages)
npm run dev

# Access the web interface at http://localhost:3000

4. Connect GitHub

  1. Click "Connect GitHub" on the main page
  2. Authorize the application
  3. Your repositories will be automatically loaded

πŸš€ Deploy websites and applications to AWS using simple, natural language prompts

No cloud expertise required. Just describe what you want, and watch your infrastructure come to life.


🌟 Features

πŸ€– AI-Powered Deployment

  • Natural Language Processing: Describe your deployment in plain English
  • Intelligent Infrastructure Recommendations: AI analyzes your needs and suggests optimal AWS services
  • Cost Optimization: Automatic selection of cost-effective resources
  • Smart Defaults: Production-ready configurations out of the box

☁️ Comprehensive AWS Integration

  • Static Websites: S3 + CloudFront for lightning-fast static sites
  • Single Page Applications: Optimized SPA deployment with proper routing
  • Serverless APIs: Lambda functions with API Gateway integration
  • Full-Stack Applications: Complete infrastructure orchestration
  • Custom Domains: Automatic SSL certificate provisioning and DNS setup

πŸ“Š Real-Time Monitoring

  • Live Deployment Progress: Watch your infrastructure being created in real-time
  • Cost Tracking: Transparent cost estimates and monitoring
  • Resource Management: View and manage all deployed resources
  • Health Monitoring: Automatic health checks and alerts

🎯 Developer-Friendly

  • Model Context Protocol (MCP): Extensible architecture for easy integration
  • TypeScript: Full type safety throughout the codebase
  • Modern Stack: Next.js frontend with Tailwind CSS
  • Comprehensive Logging: Detailed deployment logs and error tracking

πŸš€ Quick Start

Prerequisites

# Node.js 18+ required
node --version  # Should be 18.0.0 or higher

# AWS CLI configured
aws configure
# OR set environment variables:
# AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION

# Ensure AWS Bedrock access is enabled in your region

Installation

  1. Clone the repository
git clone https://github.com/DheerajShrivastav/aws-deploy-ai.git
cd aws-deploy-ai
  1. Set up the MCP Server
cd mcp-server
npm install
cp .env.example .env
# Edit .env with your AWS credentials
npm run build
  1. Set up the Frontend (Optional)
cd ../frontend
npm install
npm run dev  # Runs on http://localhost:3000
  1. Start the MCP Server
cd ../mcp-server
npm run dev  # For development
# OR
npm start    # For production

πŸ’» Usage Examples

Basic Static Website

"Deploy my portfolio website with my resume and projects"

React Application

"Deploy my React app with custom domain myportfolio.com and SSL certificate"

Blog Site

"Create a blog website with fast loading and SEO optimization"

E-commerce Store

"Deploy my online store with product catalog and payment processing"

API Backend

"Set up a serverless API for my mobile app with database integration"

πŸ—οΈ Architecture

System Overview

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Frontend      β”‚    β”‚   MCP Server    β”‚    β”‚   AWS Services  β”‚
β”‚   (Next.js)     │────│   (TypeScript)  │────│   (Auto-Deploy) β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚                        β”‚                        β”‚
         β”‚              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                β”‚
         └──────────────│  AI Interpreter β”‚β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                        β”‚ (AWS Bedrock)   β”‚
                        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Core Components

🧠 AI Interpreter Service

  • Parses natural language deployment requests
  • Generates infrastructure requirements
  • Provides cost estimates and recommendations
  • Powered by AWS Bedrock (Claude 3) for intelligent analysis

βš™οΈ AWS Service Orchestration

  • S3 Service: Static website hosting and asset storage
  • CloudFront Service: Global CDN distribution
  • Lambda Service: Serverless function deployment
  • IAM Service: Automated security policy creation
  • Route53 Service: DNS and domain management

πŸ”„ Deployment Workflow Engine

  • State machine for deployment orchestration
  • Real-time progress tracking
  • Error handling and rollback capabilities
  • Resource lifecycle management

πŸ› οΈ Configuration

Environment Variables

Create a .env file in the mcp-server directory:

# AWS Configuration
AWS_REGION=us-east-1
AWS_ACCESS_KEY_ID=your_access_key_here
AWS_SECRET_ACCESS_KEY=your_secret_key_here

# AWS Bedrock Configuration
BEDROCK_MODEL_ID=anthropic.claude-3-sonnet-20240229-v1:0
BEDROCK_REGION=us-east-1

# Deployment Configuration
DEFAULT_BUCKET_PREFIX=aws-deploy-ai
DEFAULT_CLOUDFRONT_PRICE_CLASS=PriceClass_100

# Logging Configuration
LOG_LEVEL=info
LOG_FILE=./logs/aws-deploy-ai.log

# Security Configuration
ENCRYPTION_KEY=your_encryption_key_here

AWS IAM Permissions

Your AWS user/role needs the following permissions:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "s3:*",
        "cloudfront:*",
        "lambda:*",
        "iam:CreateRole",
        "iam:AttachRolePolicy",
        "iam:PassRole",
        "route53:*",
        "acm:*",
        "apigateway:*",
        "logs:*"
      ],
      "Resource": "*"
    }
  ]
}

πŸ“‘ API Reference

MCP Tools

deploy-website

Deploy a website or application to AWS.

Parameters:

  • prompt (string): Natural language description of what to deploy
  • projectName (string, optional): Name of the project
  • customDomain (string, optional): Custom domain name
  • environment (string, optional): deployment environment (development/staging/production)

Example:

await mcpClient.callTool('deploy-website', {
  prompt: 'Deploy my React portfolio with contact form',
  projectName: 'my-portfolio',
  customDomain: 'johnsmith.dev',
  environment: 'production',
})

get-deployment-status

Check the status of a deployment.

Parameters:

  • deploymentId (string): The deployment ID to check

analyze-deployment

Analyze deployment requirements without deploying.

Parameters:

  • prompt (string): Deployment requirements to analyze

get-cost-estimate

Get detailed cost estimates for a deployment.

Parameters:

  • prompt (string): Deployment requirements for cost estimation

🎯 Supported Project Types

Project Type Description AWS Services Used
Static Website HTML, CSS, JS files S3, CloudFront, Route53
Single Page App React, Vue, Angular apps S3, CloudFront, Route53
Blog Content-focused websites S3, CloudFront, Lambda
E-commerce Online stores S3, CloudFront, Lambda, DynamoDB
API Backend RESTful APIs Lambda, API Gateway, DynamoDB
Full-Stack App Complete web applications All services
Documentation Documentation sites S3, CloudFront
Portfolio Personal/professional portfolios S3, CloudFront, Route53

πŸ’° Cost Estimation

Typical Monthly Costs

Project Type Small Traffic Medium Traffic High Traffic
Static Website $2-5 $10-25 $50-100
SPA $3-8 $15-35 $75-150
API Backend $5-15 $25-75 $100-300
Full-Stack App $10-30 $50-150 $200-500

Costs include S3 storage, CloudFront distribution, Lambda execution, and data transfer. Actual costs may vary based on usage patterns.

Cost Optimization Features

  • Intelligent Resource Sizing: AI selects optimal resource configurations
  • Free Tier Utilization: Maximizes use of AWS free tier benefits
  • Caching Optimization: CloudFront caching reduces data transfer costs
  • Serverless-First: Uses cost-effective serverless services when possible

πŸ”§ Development

Project Structure

aws-deploy-ai/
β”œβ”€β”€ mcp-server/                 # MCP Server (TypeScript)
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ main.ts            # Server entry point
β”‚   β”‚   β”œβ”€β”€ services/          # AWS service integrations
β”‚   β”‚   β”œβ”€β”€ tools/             # MCP tool implementations
β”‚   β”‚   β”œβ”€β”€ types/             # TypeScript type definitions
β”‚   β”‚   └── utils/             # Utility functions
β”‚   β”œβ”€β”€ package.json
β”‚   └── tsconfig.json
β”‚
β”œβ”€β”€ frontend/                   # Next.js Frontend (Optional)
β”‚   β”œβ”€β”€ src/app/               # Next.js App Router
β”‚   β”œβ”€β”€ components/            # React components
β”‚   β”œβ”€β”€ package.json
β”‚   └── tailwind.config.js
β”‚
└── docs/                      # Documentation
    β”œβ”€β”€ api.md                 # API documentation
    β”œβ”€β”€ deployment-guide.md    # Deployment guide
    └── examples/              # Usage examples

Running Tests

# MCP Server tests
cd mcp-server
npm test

# Frontend tests
cd frontend
npm test

Building for Production

# Build MCP Server
cd mcp-server
npm run build

# Build Frontend
cd frontend
npm run build

🀝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

Development Setup

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes
  4. Add tests for new functionality
  5. Run tests: npm test
  6. Commit changes: git commit -m 'Add amazing feature'
  7. Push to branch: git push origin feature/amazing-feature
  8. Open a Pull Request

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ™ Acknowledgments

  • Model Context Protocol (MCP): For providing the extensible server framework
  • AWS Bedrock: For powering the intelligent deployment analysis with Claude 3
  • AWS: For providing the robust cloud infrastructure platform
  • Next.js & Tailwind CSS: For the beautiful and responsive frontend

πŸ“ž Support


Made with ❀️ for developers who want to focus on building, not configuring infrastructure.

Deploy with AI. Scale with AWS. Build without limits.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages