Anybody has deployed self hosted livekit on AWS EC...
# ask-ai
h
Anybody has deployed self hosted livekit on AWS ECS yet ?
t
Thanks for reaching out, aditi. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I'd love to help you with your deployment! Could you share a bit more about what you're looking for? For example: • Are you hoping for some guidance on setting up LiveKit specifically on AWS ECS? • Do you need a hand with configuration, scaling, or networking? • Are there any particular challenges or goals you're aiming to tackle?
h
• Are you hoping for some guidance on setting up LiveKit specifically on AWS ECS? - Yes • Do you need a hand with configuration, scaling, or networking? - Yes I also want to get resources where people have shared experience about a similar set up
t
Setting up LiveKit on AWS ECS can feel a bit overwhelming, but I’m here to guide you through it step-by-step: 1. Initial Setup: Start by using AWS Secrets Manager to securely create secrets for your LiveKit URL, API key, and API secret. This keeps your sensitive information safe. 2. Infrastructure: Next, use CloudFormation to set up all the necessary infrastructure. This includes creating a VPC with both public and private subnets, an ECS cluster, an ECR repository, IAM roles, and security groups. Remember, your ECS task definition should use the Fargate launch type for easier management. 3. Deployment: Then, build and push your LiveKit Docker image to ECR. Initially, set the service DesiredCount to 0. After updating the CloudFormation stack with your image details, you can scale the service by updating DesiredCount to the number you need. 4. Networking: Make sure your service runs in a private subnet with a NAT Gateway. Also, configure your security group to allow these ports: TCP 22, TCP 443, TCP 7880, TCP 7881, and UDP 7882. This will ensure proper connectivity. 5. Updates: When it’s time to update, simply build a new Docker image version, push it to ECR, update the CloudFormation template with the new version, and run the update-stack command. This keeps your deployment smooth and current. I understand that finding shared experiences with this exact setup can be tricky. While I couldn’t locate specific resources, community forums and developer groups might have some helpful discussions. Please don’t hesitate to reach out if you’d like me to help you explore those or if you have any other questions—I’m here to help! Sources: aws-ecs/cloudformation.yaml