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

Lambda function must first be created? #2

Closed
manuelmeurer opened this issue Feb 8, 2016 · 4 comments
Closed

Lambda function must first be created? #2

manuelmeurer opened this issue Feb 8, 2016 · 4 comments

Comments

@manuelmeurer
Copy link

Hey,

First: thanks for putting this code on here, helped me a lot!

I'm trying to get a "hello world" to work, followed the instructions in the README but at the point where aws lambda update-function-code is called, I see this error:

A client error (ResourceNotFoundException) occurred when calling the UpdateFunctionCode operation: Function not found: arn:aws:lambda:us-east-1:080694036296:function:helloRuby

From aws lambda update-function-code help:

Updates the code for the specified Lambda function. This operation must
only be used on an existing Lambda  function  and  cannot  be  used  to
update the function configuration.

Maybe update-function-code could be used to create functions as well back when you wrote your code?
I'll try to make it work with create-function now, but when rerunning it, we'll probably need to check if the function exists first...

@lorennorman
Copy link
Owner

Awesome, glad it has been helpful! Sorry it didn't all Just Work :(

I don't have time to unravel this right now and get my brain back into it to really help you, but here's a quick comment: I had already created the lambda function via the AWS management console. If you haven't done that yet, it doesn't make any sense to try and "update its code"...

...and as I re-read the name of this issue, I realize that's just what you're asking! So yeah, I need to update the readme to take a more "first time use" perspective.

Does this clear things up enough for you to take it from here? How else can I be helpful?

@manuelmeurer
Copy link
Author

Yeah, that's what I thought! 😄
If I can make it work with create-function, I'll send you a PR.

@manuelmeurer
Copy link
Author

I created an Ansible role based on your shell script: https://github.com/krautcomputing/ansible-aws-lambda-ruby
Thanks again for putting this up, it helped a lot! 😄

@lorennorman
Copy link
Owner

Bravo! I'm a big fan of Ansible, as well. Thanks for making this and for the mentions!

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

2 participants