LoginSignup
2
0

More than 5 years have passed since last update.

WindowsでLambdaのGoバイナリをzip圧縮すると実行に失敗する

Last updated at Posted at 2018-07-10

(Git Bash使用)
WindowsでLambda関数をGolangでコンパイル

GOOS=linux GOARCH=amd64 go build -o hello

これを、Windows標準機能でzip圧縮。
1.png

これをLambdaでアップロードし、テスト実行したところ、
perrmission denied
となり、実行に失敗した。
2.png

WinRARでzip圧縮しても同様に失敗。

WSLやDockerコンテナのLinuxから

zip hello.zip ./hello

としたものは成功した。

Windows標準やWinRARのzip圧縮は、その過程で実行属性が取れてしまっているものと推測。

2
0
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0