Adding an API Gateway trigger to the function