I am utterly confused by the docs in AWS.
What I tried
- Signed up an AWS account using the region us-west-2
- Created a Lambda function called helloworld
- Created a handler called
hello_worldinside.
- Selected Actions > Configure Test Event > Selected Common > Hello World
Press Test and I get the following error messages:
The area below shows the result returned by your function execution. { "errorMessage": "Syntax error in module 'helloworld'" }
and
START RequestId: f71b8c46-ecc8-11e5-91b6-c55c85fd12cb Version: $LATEST
Syntax error in module 'helloworld': invalid syntax (helloworld.py, line 1)
END RequestId: f71b8c46-ecc8-11e5-91b6-c55c85fd12cb
REPORT RequestId: f71b8c46-ecc8-11e5-91b6-c55c85fd12cb Duration: 0.29 ms Billed Duration: 100 ms Memory Size: 128 MB Max Memory Used: 10 MB
What I wanted
I just want to get a successful execution of a python hello world, so I know where I am supposed to observe the output and how to run the script.
Updates
I have changed the code to
def print_something(entry, second_entry):
print str(entry)
print str(second_entry)
return str(second_entry)
And it is executed properly.
This is what I saw:
START RequestId: 33bf2a83-ecda-11e5-bdcd-2de843a18bed Version: $LATEST
{u'key3': u'value3', u'key2': u'value2', u'key1': u'value1'}
<__main__.LambdaContext object at 0x7f66d1848990>
END RequestId: 33bf2a83-ecda-11e5-bdcd-2de843a18bed
What on earth is that LamdaContext object that appears as the second param?




