Closed cnelsonvelo closed 4 years ago
This seems to have broken AWS SAM cli as well.
Same here File "/var/runtime/bootstrap", line 4 if [ -z "$AWS_LAMBDA_EXEC_WRAPPER" ]; then ^ SyntaxError: invalid syntax
I moved to python3.7 for now and it is working.
@mhart could you help us with that?
Well AWS Lambda did update a bunch of runtimes today – and the bootstrap files changed on them.
Unfortunately I'm not familiar with how Pycharm integrates these containers – is it expecting something in particular?
The python3.8 image seems to execute fine for me – without doing any complicated debugging or anything.
@therealjeffg can you be more specific about what broke with SAM CLI?
Yeah, this is an issue with aws-sam-cli
– it's assuming that /var/runtime/bootstrap
is a python file – but Lambda has changed it to be a bash file (hence the syntax error).
I'll file an issue over at the sam repo
Pull request opened at https://github.com/awslabs/aws-sam-cli/pull/2070
The Lambda runtimes have been rolled back – hopefully this won't raise its head again!
When attempting to debug using Pycharm today new containers were downloaded automatically and the debugging fails with this error:
Connected to pydev debugger (build 201.6668.115) Traceback (most recent call last): File "/tmp/lambci_debug_files/pydevd.py", line 1438, in _exec pydev_imports.execfile(file, globals, locals) # execute the script File "/tmp/lambci_debug_files/_pydev_imps/_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "/var/runtime/bootstrap", line 4 if [ -z "$AWS_LAMBDA_EXEC_WRAPPER" ]; then ^ SyntaxError: invalid syntax
Reverting to an earlier version of the python3.8 containers, and preventing Pycharm from automatically updating them resolves the issue temporarily.