I am creating a cli app with which I want to call my AWS lambda function:
@click.group(context_settings={"help_option_names": ["-h", "--help"]}, invoke_without_command=True)
@click.version_option(version=__version__, prog_name="experiment")
def experiment():
pass
@experiment.command()
def lambda():
my_lambda_func(event, context) # Need to get event and context and store result
This CLI app will be installed inside a docker container.
So, when I use:
experiment lambda
My lambda code will get executed. The problem is I don’t know how to get event and context objects to my_lambda_func
and how to store the result of the function.
Is it even possible? The only resources in the internet just use direct function name