Posh-ACME icon indicating copy to clipboard operation
Posh-ACME copied to clipboard

AWS Lambda runtime support

Open frankvdbh opened this issue 3 years ago • 1 comments

We are trying to use Posh-ACME in an AWS Lambda function. The lambda environment uses .Net core 3.1. We package the lambda function using AWS Powershell tools into a lambda package. During this stage it is bundling the Posh-ACME module ( https://docs.aws.amazon.com/lambda/latest/dg/powershell-handler.html ) However when the lambda is being executed, it complains on importing one of the module functions and I'm not able to find out the reason. We assume something specific to the Amazon Linux base image but wonder why it complains on this specific function. Anyone else tried te same ? We tried a more manual bundling approach where we locally extract the module files, leave out the Revoke-PACertificate function, and this does work.

The error output is below:

START RequestId: 504063a8-436b-4b65-a860-3629e7e7787d 
Version: $LATEST
Importing module ./Modules/Posh-ACME/4.12.0/Posh-ACME.psd1

[Error] - Failed to import function /var/task/Modules/Posh-ACME/4.12.0/Public/Revoke-PACertificate.ps1: Could not find a part of the path '/var/runtime/ref'.

[Error] - Cannot bind argument to parameter 'Path' because it is null.

[Error] - Value cannot be null. (Parameter 'The provided Path argument was null or an empty collection.')
[Error] - Cannot bind argument to parameter 'Path' because it is null.
[Error] - Cannot bind argument to parameter 'Path' because it is null.

frankvdbh avatar Jan 27 '22 15:01 frankvdbh

Hey @frankvdbh. Thanks for reaching out. Unfortunately, I don't have much experience with Lambda and I don't recall anyone posting about similar issues in the past.

That said, I do have an AWS account that I could poke around on and try some things to see if I can at least reproduce the problem.

rmbolger avatar Jan 27 '22 20:01 rmbolger

This is now fixed in 4.18.0

rmbolger avatar Jun 28 '23 06:06 rmbolger