import json
import time

def lambda_handler(event,context):
    number_1 = event['key1']
    number_2 = event['key2']
    return {"number" : abs(number_1 - number_2)}
import json

def lambda_handler(event, context):
    number_1 = int(event['key1'])
    number_2 = int(event['key2'])
    return {"number" : abs(number_1 - number_2)}

Add int() function for casting from string to integer
Add int() function for casting from string to integer
