Closed sholland-bamboohealth closed 1 year ago
+1. Exactly the same error. Everything seems built and deployed ok, and the 2 custom layers can be seen on the console. However, running the function gives that error ::
Function Logs START RequestId: f6cafea3-fbcf-42bc-803e-af713dc9566f Version: $LATEST RequestId: f6cafea3-fbcf-42bc-803e-af713dc9566f Error: fork/exec /opt/bootstrap: exec format error Runtime.InvalidEntrypoint
Agreed. I was wondering if I needed to check my rights but I would assume if I can build and deploy then I've got the rights to kick it off.
I've reinstalled SAM and the custom runtime. Same behaviour.
It seems like we've battled this issue since we first built this runtime. Building the runtime entirely on Windows, without using sam build
tends to end with this issue, which I believe is related to the /opt/bootstrap
file not having the execute bit set correctly.
I'm yet to have a solution to this, other than when I need to do things I do it using WSL, macOS, Linux, etc.
Will keep this issue open until we figure out a solution.
So instead of using .\build-layers.ps1
, i should use option Asam build --parallel
?
I've tried all 3 build options with the same results... but maybe the fact I run .\build-layers.ps1 has some permanent effect on the subsequent tests, Could be somehow related to having installed different versions of (fff*****) python ? Just a feeling. I'll retry all steps later, after a good cleanup + reboot. And also in a second computer (when back home after the weekend).
I've rebuilt everything. Running the process from inside WSL and the MS-provided Ubuntu, and NOT calling ./building_layers.ps1, has done the trick. I also tried on Amazon2 linux WSL, but the wget/apt commands are different and I don't want to learn those arcane syntax when PowerShell/pwsh could be there. Please add them to the docs... :-)
Agreed, once i moved away from the ./building_layers.ps1 and got make installed on the wsl installed Ubuntu...everything was fine. @austoonz I do think it would help having a note about make being a pre-req but not coming with the MS Ubuntu distro.
@sholland-bamboohealth Agreed. I actually just pushed this commit which adds a note about that above the sam build
commands.
thank you all for working with me...on this...
When I try to test the deployed function I get the following error. Building with Powershell entirely and deploying with SAM deploy -g