我正在运行仅与数据库相关的lambda函数。我不需要事件的任何输入。但处理函数由事件和上下文组成。如果我删除事件和上下文,则显示错误。是否可以删除这些东西?如果是,怎么样?
Traceback (most recent call last):
File "/home/preethi/newvenv/bin/lambda", line 187, in <module>
cli()
File "/home/preethi/newvenv/local/lib/python2.7/site-packages/click/core.py", line 716, in __call__
return self.main(*args, **kwargs)
File "/home/preethi/newvenv/local/lib/python2.7/site-packages/click/core.py", line 696, in main
rv = self.invoke(ctx)
File "/home/preethi/newvenv/local/lib/python2.7/site-packages/click/core.py", line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/preethi/newvenv/local/lib/python2.7/site-packages/click/core.py", line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/preethi/newvenv/local/lib/python2.7/site-packages/click/core.py", line 534, in invoke
return callback(*args, **kwargs)
File "/home/preethi/newvenv/bin/lambda", line 85, in invoke
verbose=verbose,
File "/home/preethi/newvenv/local/lib/python2.7/site-packages/aws_lambda/aws_lambda.py", line 220, in invoke
results = fn(event, None)
TypeError: handler() takes no arguments (2 given)
谢谢。