wkhtmltopdf / packaging

Packaging of wkhtmltopdf releases
https://wkhtmltopdf.org/downloads.html#stable
311 stars 142 forks source link

Lambda release #81

Closed lnmunhoz closed 2 years ago

lnmunhoz commented 3 years ago

I tried to use the lambda binary that was released, but for some reason it doesn't give me any errors but the pdfs are not generated. However, using the binary from here https://github.com/SebastiaanKlippert/go-wkhtmltopdf-lambda/releases worked.

erutherford commented 3 years ago

You should check the version of Amazon linux your lambda is running. The provided archive will only work for lambdas running Amazon Linux 2. https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html

@ashkulz Would you be open to a PR that also generates an archive for Amazon Linux 1? Amazon Linux 2 isn't always an option and I was able to modify the build pipeline locally to build an Amazon Linux 1 archive relatively easily.

ashkulz commented 3 years ago

The zip file has amazonlinux2_lambda in the name, so I thought it was implied :slightly_smiling_face:

I'm not sure that it makes sense to support AmazonLinux 1, as it'll be effectively EOL by year-end. Not sure what the "maintenance support" means, as the earlier EOL was June 30.

erutherford commented 3 years ago

I don't think I said anything about a lack of clarity about what version of Amazon Linux it was for, I was only pointing out that Amazon Linux 2 isn't available for all lambda runtimes and based off the fact that he's referencing a go lambda example he's likely running Amazon Linux 1.

Beyond December 31, 2020, the Amazon Linux AMI will enter a new maintenance support period that extends to June 30, 2023.

During this maintenance support period:

The Amazon Linux AMI will only receive critical and important security updates for a reduced set of packages. It will no longer be guaranteed to support new EC2 platform capabilities, or new AWS features. Supported packages will include:

The Linux kernel, Low-level system libraries such as glibc and openssl, Popular packages that are still in a supported state in their upstream sources, such as MySQL and PHP.

The article you reference seems to indicate what they mean by maintenance support. There are quite a few AWS lambda runtimes that are still running Amazon Linux 1 with no indication that they'll be deprecated any time soon. It also looks like they're intending to maintain Amazon Linux 1 until June 30, 2023. With that in mind are you open to a PR that includes a build for an Amazon Linux 1 variant of the lambda package?

ashkulz commented 3 years ago

Sure, if it's not going to be EOL soon I'll happily merge a PR :-)

siddhant2308 commented 3 years ago

Sure, if it's not going to be EOL soon I'll happily merge a PR :-)

Can anyone advise on what changes it will take to get the layer for amazonlinux 1. (Sorry i am still wrapping my head around all this, but any starting point will be nice).

ashkulz commented 3 years ago

I assume it'll be doing similar changes to #77 but for AmazonLinux 1 (by changing from to amazonlinux:1)?

siddhant2308 commented 3 years ago

https://github.com/wkhtmltopdf/packaging/blob/b32dc1be3bc278176d73cf15714ea1dbd8deab1e/build.yml#L313 changed to amazonlinux:1 Sorry for over-simplify things here, but in the packaging repo (wkhtmltopdf repo in parallel) running command: ./build package-docker amazonlinux2_lambda ../wkhtmltopdf, and expecting a zip output. This is taking some while to complete.

ashkulz commented 2 years ago

Considering AmazonLinux 1 is EOL this monthend, I'm going to close this issue.