How to create lambdas?
Hi.
I attempted to create a lambda with this service, but it complained about missing IAM permissions. I didn't see an IAM port listed for configuring those permissions. Perhaps I'm missing something about how to configure IAM roles?
Thanks, -justin
Comments (9)
-
Account Deactivated -
Account Deactivated @justinabrahms can you confirm that adding and running Python Lambdas works for you, so we can close this off? Please test with the most recent version. Thanks
-
@w_hummer The code worked for me, but it broke the web interface.
Is python currently the only available Lambda runtime? My attempt with nodejs43 only ended in failure. :(
-
Account Deactivated Fixed the Lambda UI issue in this PR: https://bitbucket.org/atlassian/localstack/pull-requests/36 The version hasn't been bumped yet, though. Will bump the version and push a new Docker image soon (probably tomorrow).
@whiteadam Unfortunately, Python is currently the only supported runtime. There has been a proposal here to use a Docker runtime environment that supports different languages: https://github.com/atlassian/localstack/issues/27 It is currently not high up in the priority list on our end, but if you get a chance to look into this - a pull request would be highly appreciated!
-
Account Deactivated - changed status to resolved
-
reporter Confirmed that I now get a non-IAM oriented error. :) I have another error which is that "handler" is a hardcoded value for my function, which I've named
lambda_handler
in my code. I can just edit the source code to make this work on my end. Unfortunately, corporate OSS guidelines mean it will be unlikely I can contribute a fix for this. -
Hi,
I was trying to run a lambda on localstack.
But when I enter the following command:
aws --endpoint-url=http://localhost:4574 lambda create-function --function-name=f1 --runtime=python2.7 --role=r1 --handler=lambda.handler --zip-file fileb://lambda.zip
(For uploading the lambda)
It prompts the following: Unable to locate credentials. You can configure credentials by running "aws configure".
-
Doesn't work for me if I try node8.10: https://bitbucket.org/atlassian/localstack/issues/63/creating-node810-lambdas-doesnt-work
-
@w_hummer Your sample is neat and straight forward. Everything looks good to me expect test isnt printed out in console. do you have any ideas?
- Log in to comment
Hi,
Can you pull the latest version of LocalStack and then try this:
lambda.py
with the following content:Then you should see the following:
Please note that currently only Lambdas written in Python are supported.