Skip to content

Commit 2f1ebf9

Browse files
committed
output results, fixed event argument
1 parent 13541a7 commit 2f1ebf9

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ If you now try and run:
8787

8888
As you probably put together, the ``lambda invoke`` command grabs the values stored in the ``event.json`` file and passes them to your function.
8989

90-
The ``event.json`` file should help you develop your Lambda service locally. You can specify an alternate ``event.json`` file by passing the ``--event=<filename>.json`` argument to ``lambda invoke``.
90+
The ``event.json`` file should help you develop your Lambda service locally. You can specify an alternate ``event.json`` file by passing the ``--event-file=<filename>.json`` argument to ``lambda invoke``.
9191

9292
When you're ready to deploy your code to Lambda simply run:
9393

aws_lambda/aws_lambda.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
2+
from __future__ import print_function
33
import json
44
import os
55
import logging
@@ -77,7 +77,9 @@ def invoke(src, alt_event=None):
7777

7878
# TODO: look into mocking the ``context`` variable, currently being passed
7979
# as None.
80-
return fn(event, None)
80+
results = fn(event, None)
81+
print("below shows the result returned by your function "
82+
"execution:\n{0}".format(results))
8183

8284

8385
def init(src, minimal=False):

scripts/lambda

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def init():
2121

2222

2323
@click.command(help="Run a local test of your function.")
24-
@click.option('--event', default=None, help='Alternate event file.')
24+
@click.option('--event-file', default=None, help='Alternate event file.',)
2525
def invoke(event_file):
2626
aws_lambda.invoke(CURRENT_DIR, event_file)
2727

0 commit comments

Comments
 (0)