This proposal outlines a comprehensive solution for deploying OpenHands AI assistant in a secure, isolated AWS environment that restricts network access to only approved LLM endpoints while providing secure web-based user authentication. The solution ensures maximum security through multiple layers of network isolation, access controls, and monitoring.
- Deploy OpenHands AI assistant with web interface access
- Restrict all network communications to approved LLM endpoints only
- Implement secure user authentication using standard Linux credentials
- Ensure complete isolation from unauthorized internet resources
- Maintain audit trails and monitoring capabilities
- Network-level isolation using AWS VPC
- Multi-layer security controls (Security Groups, NACLs, host-level firewalls)
- Encrypted web traffic (HTTPS/SSL)
- Password-based authentication with fail2ban protection
- Complete audit logging of user activities
- Zero-trust network access model
Internet → Web Proxy (Public Subnet) → OpenHands Server (Private Subnet) → LLM Endpoint Only
↓
HTTPS + Basic Auth
SSL Termination
Reverse Proxy
- VPC CIDR:
10.0.0.0/16 - Public Subnet:
10.0.0.0/24(Web Proxy/Bastion) - Private Subnet:
10.0.1.0/24(OpenHands Server) - Internet Gateway: Public subnet access only
- NAT Gateway: Controlled outbound access for private subnet
Web Proxy Security Group (openhands-web-proxy-sg)
- Inbound: SSH (22), HTTP (80), HTTPS (443) from authorized IPs
- Outbound: SSH to private subnet, HTTP/HTTPS to OpenHands server
OpenHands Server Security Group (openhands-server-sg)
- Inbound: SSH and port 3000 from web proxy only
- Outbound: HTTPS to LLM endpoints, DNS to VPC resolver, NTP
- Instance Type: t3.small
- OS: Ubuntu 22.04 LTS
- Services: Nginx reverse proxy, SSL termination, Basic Auth
- Security: fail2ban, UFW firewall, SSL certificates
- Instance Type: t3.large
- OS: Ubuntu 22.04 LTS
- Services: OpenHands application, Docker, Python environment
- Security: Strict iptables rules, network isolation, audit logging
- Create VPC with public/private subnets
- Configure Internet Gateway and NAT Gateway
- Set up route tables and network ACLs
- Create and configure Security Groups
- Create EC2 key pairs
- Launch web proxy instance in public subnet
- Launch OpenHands server in private subnet
- Configure initial security settings
- Implement strict firewall rules
- Configure network ACLs for additional security
- Test network isolation
- Validate security group configurations
- Install and configure Nginx reverse proxy
- Set up SSL certificates (self-signed or Let's Encrypt)
- Configure basic authentication
- Implement fail2ban protection
- Install OpenHands and dependencies
- Configure application settings
- Set up systemd service
- Configure LLM API connections
- Test web interface access
- Verify LLM connectivity
- Validate network restrictions
- Performance testing
- Implement strict iptables rules for LLM-only access
- Configure audit logging
- Set up monitoring scripts
- Implement backup procedures
- Create operational documentation
- Develop user guides
- Conduct security review
- Staff training sessions
- Final security validation
- Performance optimization
- Disaster recovery testing
- Production deployment
- VPC Isolation: Complete network segmentation
- Security Groups: Application-level firewall rules
- Network ACLs: Subnet-level access controls
- iptables: Host-level packet filtering for LLM-only access
- Basic Authentication: Username/password for web interface
- SSH Key Authentication: Secure administrative access
- fail2ban: Brute force attack prevention
- User Account Management: Standard Linux user controls
- System Logs: Comprehensive logging of all activities
- Network Monitoring: Connection tracking and analysis
- Security Alerts: Automated alerting for suspicious activities
- Audit Trails: Complete user action logging
| Component | Instance Type | Monthly Cost |
|---|---|---|
| Web Proxy | t3.small | $15.18 |
| OpenHands Server | t3.large | $60.74 |
| NAT Gateway | - | $32.40 |
| Data Transfer | - | $10.00 |
| EBS Storage (100GB) | - | $10.00 |
| Total Monthly | $128.32 |
- Year 1: $1,539.84 (including setup costs)
- Ongoing Annual: $1,539.84
- Reserved Instances: 30-40% savings on compute costs
- Spot Instances: Up to 70% savings (with availability considerations)
- Storage optimization: Lifecycle policies for logs and backups
| Risk | Impact | Probability | Mitigation |
|---|---|---|---|
| Network misconfiguration | High | Low | Automated testing, peer review |
| LLM endpoint changes | Medium | Medium | Monitoring, flexible configuration |
| SSL certificate expiry | Low | Medium | Automated renewal, monitoring |
| Instance failure | Medium | Low | Automated backups, quick recovery |
| Risk | Impact | Probability | Mitigation |
|---|---|---|---|
| Unauthorized access | High | Low | Multi-layer authentication, monitoring |
| Network bypass | High | Very Low | Multiple security layers, testing |
| Credential compromise | Medium | Low | Strong passwords, rotation policy |
| DDoS attacks | Medium | Medium | Rate limiting, fail2ban |
- Monitor system health and performance
- Review security logs and alerts
- Verify LLM connectivity and response times
- Check backup completion status
- Security patch assessment and application
- Performance metrics review
- User access audit
- Capacity planning review
- Full security assessment
- Disaster recovery testing
- Cost optimization review
- Documentation updates
- Follows AWS Well-Architected Security Pillar
- Implements defense-in-depth security model
- Maintains principle of least privilege
- Ensures data encryption in transit and at rest
- Complete logging of all user activities
- Network traffic monitoring and analysis
- Regular security assessments
- Incident response procedures
- Zero unauthorized network connections
- 100% authentication success rate for authorized users
- < 1 minute response time for security alerts
- Zero security incidents
- < 2 second response time for web interface
- 99.9% uptime for OpenHands service
- < 5 second LLM query response time
- 100% successful LLM API connections
- < 4 hours mean time to recovery (MTTR)
- 100% backup success rate
- < 24 hours security patch deployment
- Zero unplanned downtime
This proposal provides a comprehensive, secure solution for deploying OpenHands in an isolated AWS environment. The multi-layered security approach ensures that the AI assistant can only access approved LLM endpoints while providing secure web-based access for authorized users.
The solution balances security requirements with operational efficiency, providing:
- Complete network isolation with LLM-only access
- Secure web interface with authentication
- Comprehensive monitoring and auditing
- Cost-effective AWS implementation
- Scalable architecture for future growth
- Approval: Obtain stakeholder approval for technical approach and budget
- Resource Allocation: Assign technical team and project timeline
- AWS Account Setup: Prepare AWS environment and access credentials
- Implementation: Begin Phase 1 infrastructure deployment
- Testing: Comprehensive security and functionality validation
- Go-Live: Production deployment with monitoring
Document Version: 1.0
Last Updated: 2025-08-13
Author: Technical Architecture Team
Review Date: 2025-09-13