質問編集履歴

2

apex buildでアップロードするzipファイルを作ってみた結果

2018/06/18 10:53

投稿

xxpodxx
xxpodxx

スコア33

test CHANGED
File without changes
test CHANGED
@@ -17,3 +17,51 @@
17
17
  ランタイム: Go 1.x
18
18
 
19
19
  ハンドラ:main
20
+
21
+
22
+
23
+ apex buildでzipファイルを作ってみた結果です。
24
+
25
+ ```
26
+
27
+ apex build simpleGo > tmp/out.zip
28
+
29
+ cd tmp
30
+
31
+ tar xf out.zip
32
+
33
+ ls
34
+
35
+ main.go* out.zip
36
+
37
+ ```
38
+
39
+
40
+
41
+ main実行ファイルがないためですね。
42
+
43
+ project.jsonに以下のフックを追加して、buildするようにしたらエラーメッセージが変わりました。
44
+
45
+ ```
46
+
47
+ "hooks": {
48
+
49
+ "build": "GOOS=linux GOARCH=amd64 go build -o main main.go",
50
+
51
+ "clean": "rm -f main"
52
+
53
+ }
54
+
55
+ ```
56
+
57
+
58
+
59
+ ```
60
+
61
+ {
62
+
63
+ "errorMessage": "RequestId: 4c524f8c-72e5-11e8-bc39-35407b72484e Process exited before completing request"
64
+
65
+ }
66
+
67
+ ```

1

デプロイ方法を追記

2018/06/18 10:53

投稿

xxpodxx
xxpodxx

スコア33

test CHANGED
File without changes
test CHANGED
@@ -10,6 +10,10 @@
10
10
 
11
11
  }
12
12
 
13
+
14
+
15
+ lambdaはapexでデプロイしています。
16
+
13
17
  ランタイム: Go 1.x
14
18
 
15
19
  ハンドラ:main