As we know we have some major Fass providers like AWS Lambda, Google Cloud Functions, and Microsoft Azure Functions. each has its own SDK to develop the FaaS functions. is there any way(or SDK) to write a function in plain JAVA and run it on any of the FaaS Providers?
I am aware of how to write the functions in AWS Lambda, Google Cloud Functions, and Microsoft Azure Functions individually but I need to write a common function that can run in any of the FaaS providers.
You can write the Java Azure Function where you have to modify the Cloud Services Connectivity and Code accordingly. Then you can upload this code to the GitHub Repository. And then Use the Terraform script with the required cloud provider for deploying the Function as a Service with the code from the Git Repo.
Source: https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs
You can use the Cloud Providers script provided by hasicorp in the terraform for provisioning and deploying the infrastructure for our applications like Web Apps, APIs, Functions, etc and deploying using the code repositories such as GitHub, etc.