Thanks for replying, @tung.
So I got it to work by defining my function like this in
Jets.once # runs once in lambda execution context
def my_function(event:, context:)
This works if I edit it directly in the Lambda console and test. However I get errors on deploy if I try to deploy from Jets cli. The error seems weird:
Traceback (most recent call last):
36: from /Users/nate/.rbenv/versions/2.5.3/bin/jets:23:in `<main>'
35: from /Users/nate/.rbenv/versions/2.5.3/bin/jets:23:in `load'
2: from /Users/nate/.rbenv/versions/2.5.3/lib/ruby/2.5.0/psych.rb:497:in `load_file'
1: from /Users/nate/.rbenv/versions/2.5.3/lib/ruby/2.5.0/psych.rb:497:in `open'
/Users/nate/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/jets-2.3.0/lib/jets/lambda/function_constructor.rb:38:in `module_eval': No such file or directory @ rb_sysopen - /private/tmp/jets/konnected-cloud/stage/code/handlers/data.yml (Errno::ENOENT)
Any thoughts on what’s going on here?