I am facing a problem while deploying
.....\node_modules\aws-lambda-golang\lib\builder.ts:71
throw new Error(Failed to compile Go function at ${this.entry}: ${err}
);
^
It appears that the problem is in line 28 in "builder.ts" file where you check the status of goBuild
if (goBuild.status !== 0) {
throw new Error(goBuild.stdout.toString().trim());
}
After logging goBuild, it has status 1
goBuild : {
status: 1,
signal: null,
output: [
null,
,
<Buffer 70 61 63 6b 61 67 65 20 42 61 68 6a 61 2f 44 6f 63 75 6d 65 6e 74 73 2f 57 4f 52 4b 2d 50 52 4f 4a 45 43 54 53 2f 78 63 68 61 6e 67 65 72 2d 62 61 63 ...
612 more bytes>
],
pid: 7848,
stdout: ,
stderr: <Buffer 70 61 63 6b 61 67 65 20 42 61 68 6a 61 2f 44 6f 63 75 6d 65 6e 74 73 2f 57 4f 52 4b 2d 50 52 4f 4a 45 43 54 53 2f 78 63 68 61 6e 67 65 72 2d 62 61 63 ... 612 more bytes>
}
GO is working fine on my Windows 10 PC, I tried removing and installing the latest version but the same error appears
Note: There is no error in compiling lambda function code, I have tried "go build main.go", and works fine, besides the same cdk code deployed success in mac OS