I am not able to access the data from the event in the python function
I am trying to get the name from the JSON
def handler(event, context):
resp = event
user_name = resp['body']['user']['name']
but I get the following error
ERROR] TypeError: string indices must be integers
Traceback (most recent call last):
File "/var/task/index.py", line 28, in handler
user_name = resp['body']['user']['name']
respis already the body. try usingresp['repository']['name']and tell me the result.