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

Python 3.10 AWS Lambda incompatibility - Amazon Linux 2 #1964

Closed
christian-repos opened this issue Sep 14, 2023 · 4 comments
Closed

Python 3.10 AWS Lambda incompatibility - Amazon Linux 2 #1964

christian-repos opened this issue Sep 14, 2023 · 4 comments

Comments

@christian-repos
Copy link

Hello everyone!

I tried to build and package the latest version of the WeasyPrint library (59.0) and its native dependencies into an AWS Lambda layer for the Python 3.10 runtime. I am using the image "public.ecr.aws/sam/build-python3.10", which offers Pango 1.42.3 via the yum package manager. As the library requires Pango ≥ 1.44.0, it doesn't work.

I tried to follow the instructions to build from source for Pango-1.50.14 and all the dependencies from https://www.linuxfromscratch.org/blfs/view/svn/x/pango.html, but I am not able to get Pango working.
 
Following #1003, I managed to get WeasyPrint 52.5 to work with python 3.10. However, I would really need the latest version.

Can somebody provide a solution for this, please?

@liZe
Copy link
Member

liZe commented Sep 14, 2023

Hi!

Can somebody provide a solution for this, please?

It should be possible to compile Pango and its dependencies, but that’s probably not easy, and I don’t know AWS enough to help you for that 😢.

But… Amazon Linux 2023 has been released, and it includes Pango 1.48. Is it possible for you to use Amazon Linux 2023 instead of Amazon Linux 2?

@liZe
Copy link
Member

liZe commented Sep 14, 2023

Otherwise, Kotify updated their layer to use Docker with more recent packages.

@christian-repos
Copy link
Author

Hi!

Can somebody provide a solution for this, please?

It should be possible to compile Pango and its dependencies, but that’s probably not easy, and I don’t know AWS enough to help you for that 😢.

But… Amazon Linux 2023 has been released, and it includes Pango 1.48. Is it possible for you to use Amazon Linux 2023 instead of Amazon Linux 2?

I tried actually using the Amazon Linux 2023 image, where I manually installed Python 3.10 from source and used the yum provided Pango 1.48, but I failed to get a compatible layer for the Python 3.10 AWS Lambda runtime. Most likely, I did something wrong.

Anyway, thank you for your response!

@liZe
Copy link
Member

liZe commented Sep 25, 2023

Feel free to add a comment if there’s something more we can do for you!

@liZe liZe closed this as not planned Won't fix, can't repro, duplicate, stale Sep 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants