1-Click Launch Recipes for Amazon Web Services (AWS EC2 AI)
Docker & SSHCopy-paste deployment recipes for ComfyUI, vLLM, Ollama, and PyTorch
1-Click Docker & SSH Recipes for Amazon Web Services (AWS EC2 AI)
Tested terminal commands for immediate deployment on NVIDIA L4 24GB instances.
# 1. SSH into your Amazon Web Services (AWS EC2 AI) instance: # ssh root@<instance_ip> -p <ssh_port> # 2. Launch ComfyUI with FLUX.1 & SDXL model cache: docker run -d --gpus all --name comfyui \ --restart unless-stopped \ -p 8188:8188 \ -v /workspace/ComfyUI/models:/root/ComfyUI/models \ -v /workspace/ComfyUI/output:/root/ComfyUI/output \ yanwk/comfyui-boot:cu124 # Access ComfyUI in your browser at: http://<instance_ip>:8188
1. ComfyUI + FLUX.1 Persistent Cache
Port 8188Always mount your models directory to a persistent volume (e.g., /workspace/ComfyUI/models). This ensures that heavy 24GB checkpoint weights (FLUX.1 [dev], SDXL, SD 1.5) remain saved when you stop your instance, preventing hours of repetitive downloads.
# Mount models volume into container:
-v /workspace/ComfyUI/models:/root/ComfyUI/models \
-v /workspace/ComfyUI/output:/root/ComfyUI/output2. High-Throughput vLLM Server
Port 8000Deploy Meta-Llama-3.3-70B or DeepSeek-R1 with OpenAI-compatible API drop-in replacement. Set --tensor-parallel-size equal to your allocated GPU count (e.g., 2 or 4 GPUs for 70B models).
vllm/vllm-openai:latest \
--model meta-llama/Llama-3.3-70B-Instruct \
--tensor-parallel-size 2 \
--gpu-memory-utilization 0.953. Port Forwarding & Networking
SSH TunnelingIf Amazon Web Services (AWS EC2 AI) uses NAT without direct public IP mapping, use an SSH local port forward to access web UIs securely on your local browser:
# Forward remote ComfyUI (8188) to local localhost:8188:
ssh -L 8188:localhost:8188 root@<host_ip> -p <ssh_port>4. Zero-Egress Cloud Backup (R2 / S3)
rcloneAvoid 24/7 idle stopped storage fees on Amazon Web Services (AWS EC2 AI) by syncing your fine-tuned weights and model checkpoints directly to Cloudflare R2:
# Fast multi-threaded sync with rclone:
rclone copy /workspace/output r2:my-bucket/checkpoints --transfers 8