How to run PuTTYgen from a .NET AWS Lambda function

25 Views Asked by At

I have a .NET 8.0 AWS Lambda function. I need to generate a new RSA key pair and convert the private key to PPK format with a passphrase.

Since PPK is a PuTTYgen-specific format, I have been unable to find any native .NET tools to do the conversion of the generated key to PPK.

As an alternative, I have read that it is possible to run arbitrary executables from Lambda, but all the examples are nodejs.

So my question is, how would I go about packaging PuTTYgen into my Lambda function and then executing it with C#?

1

There are 1 best solutions below

0
Martin Prikryl On

See How to add custom libraries and binaries in AWS Lambda?

Though be aware that AWS Lambda runs on Linux. PuTTY(gen) is primarily a Windows application. Make sure you use Linux build of PuTTYgen.