Use a user with only LambdaInvoke rights.
Example Python function:
def lambda_handler(event, context): return 'Hello! value of key is ' + event['key']