Sample http function - cross provider deployment

Has anyone written any http function that can be deployed to more than one serverless platform? say AWS lamba and google cloud functions? Goal is without making any code change, configuration change in serverless yml is fine.

Any pointers pls.