Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError: 'stdout' when running lambdash #10

Open
dtenenba opened this issue May 16, 2019 · 2 comments
Open

KeyError: 'stdout' when running lambdash #10

dtenenba opened this issue May 16, 2019 · 2 comments

Comments

@dtenenba
Copy link

dtenenba commented May 16, 2019

I installed lambdash and as mentioned in another issue and in the CloudFormation output of my first attempt, I had to change Runtime from nodejs4.3 to nodejs8.10. I realize that could cause some issues but I don't think the issue I am running into is related to the runtime; it's a python issue.

My stack was created successfully. After exporting LAMBDASH_FUNCTION , I ran lambdash and got this:

$ ./lambdash
Traceback (most recent call last):
  File "./lambdash", line 19, in <module>
    os.write(sys.stdout.fileno(), base64.b64decode(result['stdout']))
KeyError: 'stdout'

Same with python3:

$ python3 ./lambdash
Traceback (most recent call last):
  File "./lambdash", line 19, in <module>
    os.write(sys.stdout.fileno(), base64.b64decode(result['stdout']))
KeyError: 'stdout'

I have boto3 installed in both pythons.

Seems like the problem is that the call to invoke LAMBDASH_FUNCTION is returning an error:

In [10]: result
Out[10]: {u'errorMessage': u'RequestId: f8b38d9d-5758-4125-b220-1b12e8021bec Process exited before completing request'}

In [11]: response['FunctionError']
Out[11]: 'Unhandled'

So result only has the key errorMessage, not stdout and stderr.

@ehammond
Copy link
Member

Thanks for reporting this.

I haven't examined this code in years, but if somebody has ideas on how to fix the issue, I'll take a look.

@Gaelan
Copy link

Gaelan commented Jun 14, 2020

@dtenenba you need to pass a command to lambdash, i.e. ./lambdash echo foo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants