A complete AWS EventBridge-powered system for automated MVP development using containerized workflows.
This system provides an automated pipeline that:
- Receives MVP development requests via AWS EventBridge events
- Triggers containerized development workflows using AWS Batch
- Stores job status and metadata in DynamoDB
- Sends completion notifications via SNS
- Manages the entire MVP lifecycle from request to deployment
- AWS CLI configured with appropriate permissions
- Docker Desktop installed and running
- Terraform >= 1.0
- Node.js >= 18 (for testing)
cd infrastructure
cp terraform.tfvars.example terraform.tfvars
# Edit terraform.tfvars with your settings
terraform init
terraform plan
terraform apply
cd docker
# Login to ECR
aws ecr get-login-password --region us-east-2 | docker login --username AWS --password-stdin YOUR_ACCOUNT_ID.dkr.ecr.us-east-2.amazonaws.com
# Build and push container
docker build -t mvp-pipeline:latest .
docker tag mvp-pipeline:latest YOUR_ACCOUNT_ID.dkr.ecr.us-east-2.amazonaws.com/founderdash/mvp-pipeline:latest
docker push YOUR_ACCOUNT_ID.dkr.ecr.us-east-2.amazonaws.com/founderdash/mvp-pipeline:latest
cd scripts
chmod +x test-event-debug.sh
./test-event-debug.sh
mvp-eventbridge-system/
βββ infrastructure/ # Terraform infrastructure code
β βββ main.tf # Main configuration
β βββ eventbridge.tf # EventBridge resources
β βββ batch.tf # AWS Batch configuration
β βββ dynamodb.tf # DynamoDB tables
β βββ iam.tf # IAM roles and policies
β βββ sns.tf # SNS topics
β βββ variables.tf # Variable definitions
βββ docker/ # Container configuration
β βββ Dockerfile # Multi-stage Docker build
β βββ pipeline.sh # Main pipeline script
β βββ scripts/ # Development scripts
β βββ develop-mvp.sh # MVP development workflow
β βββ create-repository.sh
β βββ deploy-vercel.sh
β βββ ...
βββ lambda/ # Lambda functions
β βββ update-mvp-status.py
β βββ index.py
βββ scripts/ # Utility and test scripts
β βββ test-event-debug.sh # Comprehensive system test
β βββ eventbridge-test-cli.sh # CLI testing tool
β βββ eventbridge-policy.json # IAM policy template
βββ docs/ # Documentation
β βββ mvp-automation-design.md
β βββ EVENTBRIDGE_*.md
βββ README.md
- Event Bus:
mvp-development
- Event Source:
founderdash.web
- Event Type:
MVP Development Request
- Job Queue:
founderdash-mvp-job-queue
- Job Definition:
founderdash-mvp-job-definition
- Container: Ubuntu 22.04 with Node.js, Python, AWS CLI, GitHub CLI
- DynamoDB Table:
founderdash-mvp-development-jobs
- Job Status Tracking: Real-time status updates
- Metadata Storage: Complete job history and parameters
Send events to trigger MVP development:
{
"Source": "founderdash.web",
"DetailType": "MVP Development Request",
"Detail": "{\"jobId\": \"unique_job_id\", \"userId\": \"user_123\", \"businessName\": \"My Startup\", \"requirements\": \"Build a SaaS platform\", \"priority\": \"normal\"}",
"EventBusName": "mvp-development"
}
The system uses these environment variables:
# AWS Configuration
AWS_REGION=us-east-2
AWS_ACCOUNT_ID=your-account-id
# EventBridge
EVENTBRIDGE_BUS_NAME=mvp-development
# DynamoDB
DYNAMODB_TABLE_NAME=founderdash-mvp-development-jobs
# Container Registry
ECR_REPOSITORY=founderdash/mvp-pipeline
# Notifications
SNS_COMPLETION_TOPIC=founderdash-mvp-completion
Key variables in terraform.tfvars
:
project_name = "founderdash-mvp"
environment = "production"
aws_region = "us-east-2"
# Batch Configuration
batch_compute_environment_type = "FARGATE"
batch_max_vcpus = 256
batch_desired_vcpus = 0
# EventBridge Configuration
eventbridge_bus_name = "mvp-development"
cd scripts
./test-event-debug.sh
cd scripts
./eventbridge-test-cli.sh send
aws batch list-jobs --job-queue founderdash-mvp-job-queue --region us-east-2
aws dynamodb scan --table-name founderdash-mvp-development-jobs --region us-east-2
- EventBridge Logs: Rule invocations and failures
- Batch Logs: Container execution logs at
/aws/batch/mvp-pipeline
- Lambda Logs: Status update function logs
- EventBridge rule matches and invocations
- Batch job submissions and completions
- DynamoDB read/write operations
- Job completion notifications
- Error alerts and failures
- Status change updates
- EventBridge Role: Permissions to submit Batch jobs
- Batch Execution Role: Container execution permissions
- Batch Task Role: Application-level AWS permissions
- Lambda Role: DynamoDB and SNS permissions
- VPC Configuration: Batch runs in default VPC with public subnets
- Security Groups: Minimal required access
- Encryption: All data encrypted at rest and in transit
- Request Reception: EventBridge receives MVP development request
- Job Submission: Batch job submitted with parsed parameters
- Container Execution: Development container processes the request
- Status Updates: DynamoDB tracking throughout process
- Completion Notification: SNS notification on success/failure
- Environment Setup: Prepare development environment
- Source Code Analysis: Parse existing codebase structure
- MVP Development: Execute development using available tools
- Quality Assurance: Run tests and validation
- Output Generation: Create deployable MVP package
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"jobId": {"type": "string"},
"userId": {"type": "string"},
"businessName": {"type": "string"},
"requirements": {"type": "string"},
"priority": {"type": "string", "enum": ["low", "normal", "high"]},
"timestamp": {"type": "string", "format": "date-time"}
},
"required": ["jobId", "userId", "businessName"]
}
{
"jobId": "string (Primary Key)",
"userId": "string",
"businessName": "string",
"status": "string",
"createdAt": "string (ISO 8601)",
"updatedAt": "string (ISO 8601)",
"batchJobId": "string",
"requirements": "string",
"priority": "string",
"metadata": "map"
}
- Fork the repository
- Create a feature branch
- Make changes with proper tests
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
- Check the documentation in
/docs
- Review CloudWatch logs for debugging
- Test with the provided scripts
- Monitor AWS resource usage and costs
- v1.0.0: Initial release with complete EventBridge β Batch β DynamoDB pipeline
- v1.1.0: Added comprehensive testing and monitoring
- v1.2.0: Enhanced container with development tools
- v1.3.0: Added SNS notifications and status tracking
./scripts/update-eventbridge-target.sh
make deploy-all
make update-eventbridge
./scripts/eventbridge-test-cli.sh send