Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any luck deploying on AWS Lambda? #60

Open
liechtym opened this issue Jul 20, 2023 · 1 comment
Open

Any luck deploying on AWS Lambda? #60

liechtym opened this issue Jul 20, 2023 · 1 comment
Labels
question Further information is requested

Comments

@liechtym
Copy link

liechtym commented Jul 20, 2023

Love the library! Thanks for all your great work.

I'm wondering if anyone has used this library in AWS Lambda successfully? I have tried and it seems to have trouble because of Chromium.

Thanks in advance for any suggestions.

@liechtym liechtym added the question Further information is requested label Jul 20, 2023
@Russell-Newton
Copy link
Owner

I'm not really familiar with AWS Lambda, but after a little bit of digging around, it looks like Chromium tries to spawn some additional processes, which Lambda really doesn't like. This is something you can disable in the launch args, which are passed through the API constructor.

It's worth trying to construct the api with the extra kwarg args=["--disable-gpu", "--single-process"], something like:

with TikTokAPI(args=["--disable-gpu", "--single-process"]) as api:
    ...

or

async with AsyncTikTokAPI(args=["--disable-gpu", "--single-process"]) as api:
    ...

depending on which version of the API you're using.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants