aws / aws-lambda-runtime-interface-emulator

Apache License 2.0
923 stars 96 forks source link

Installing Windows "aws-lambda-runtime-interface-emulator " copies Linux binary to windows program files #132

Open madhub opened 1 month ago

madhub commented 1 month ago

Followed the instruction provided to install "aws-lambda-runtime-interface-emulator" on windows , it copies Linux binary to program files. Executed following command from powershell administrator prompt to install. Used gitbash file command to verify the binary

Invoke-WebRequest -OutFile 'C:\Program Files\aws lambda\aws-lambda-rie' https://github.com/aws/aws-lambda-runtime-interface-emulator/releases/latest/download/aws-lambda-rie

checked the file type from windows gitbash shell

image

Please build windows binary & update the documentation

valerena commented 3 weeks ago

This binary emulates the Lambda runtime interface, which is only Amazon Linux, therefore is not expected to actually run on Windows. To use it correctly, you need a Docker base image that contains the actual Lambda runtime (this is just the interface with an underlying runtime). If you have an image function, then you can follow the instructions in the README. If you have a zip function, the easiest way to make use of this is to use SAM CLI which uses RIE behind the scenes. In both cases, you need Docker.

madhub commented 3 weeks ago

This binary emulates the Lambda runtime interface, which is only Amazon Linux, therefore is not expected to actually run on Windows. To use it correctly, you need a Docker base image that contains the actual Lambda runtime (this is just the interface with an underlying runtime). If you have an image function, then you can follow the instructions in the README. If you have a zip function, the easiest way to make use of this is to use SAM CLI which uses RIE behind the scenes. In both cases, you need Docker.

Ok, got it

Just for clarification, what is windows installation step here 👇

image

valerena commented 3 weeks ago

That installation basically downloads the latest version of RIE into your Windows machine (for the corresponding platform). With that latest version you can then do the instructions to Build RIE into your base image