def handle()

in codes/lambda/topic-function/src/handler.py [0:0]


def handle(event, context):
    # print('event====>', json.dumps(event))

    dynamodb = get_resource('dynamodb')
    table = dynamodb.Table(_table_name)

    for record in event['Records']:
        msg = json.loads(record['Sns']['Message'])
        print('put item===>', msg)
        put_ddb(table, msg)