Hosting LibreTranslate Container on AWS Lambda

I’m having problems . . . test bombs out after a few seconds (I’ve set timeout to 15 minutes). I’m thinking it could be because LibreTranslate tries to download all the translation files every time Lambda spins up. Also, I think the Lambda file system is read only so it won’t allow downloading anyway. Any pointers would be very welcome!

1 Like

I don’t think Lambda is the proper tool to deploy LibreTranslate.

I’d really appreciate it if you could explain why AWS Lambda is not the proper tool to deploy LibreTranslate. I’ve already deployed it on AWS EC2, but it requires a powerful instance costing over US$ 100 per month, and I only use it a few times per day. So Lambda seem like the ideal choice since it would be perhaps 100 times cheaper?

Because it was not designed to run on Lambda and I suspect you’ll have a lot of issues trying to run it there.

1 Like

Thanks a mill for that. Here’s another question: is there any good documentation of environmental variables, for example: LT_THREADS. The default is 4 but I need 8 EC2 vCPUs to stop it falling over with even 750 word translations. I set LT_THREADS to 32 on the basis that the default is 4 per vCPU and I can’t find any documentation anywhere about sensible values. Thanks.

I’ll create a new post for that last question, Thanks for help with Lambda.

1 Like