in codes/lambda/rest-function/src/handler.py [0:0]
def handle(event, context):
# print('event====>', json.dumps(event))
table = get_table(_table_name)
if event['httpMethod'] == 'GET':
books = get_list(table)
body_str = create_response_body(books)
return {
'statusCode': 200,
'headers': {'Content-Type': 'application/json'},
'body': body_str
}