Review (BA-36989):

Select cloud function vendor

Choose and create account of the cloud vendor such as Google Cloud Platform (GCP), Amazon Web Services (AWS), or Oracle Cloud Infrastructure (OCI), Microsoft Azure, etc.

When selecting a vendor for creating a cloud function, there are several aspects to consider: pricing, functionality, scalability, reliability, etc.

Ultimately, the choice of vendor will depend on the specific needs and requirements of your application and organization. It's important to evaluate all the vendor options and compare them based on the above-mentioned points.

Configure cloud provider compartment/project

Create a compartment within the selected cloud provider's environment to organize resources and set access policies. Compartments are logical groupings of resources that allow you to set access policies and control the level of access to resources.

By creating a compartment, you can ensure that resources are properly organized and access is restricted to authorized users. This can help to improve security and compliance and make it easier to manage and monitor resources.

If you are using cloud platform for the first time and you simply need to create new cloud function, then it might be enough to use default project/compartment provided by the vendor. In other case we recommend following vendor's guides to set up granular access to your projects in the cloud.

By this link you may find example of access control in GCP

Create cloud function

Create cloud function in the selected cloud platform. Usually this process consists of following steps:

  1. Enabling cloud functions in your platform;
  2. Creating your template by selecting a runtime, trigger mechanism, name ;
  3. Provisioning your code to the cloud function;
  4. Test your cloud function.

To be provisioned to the Add-on Mart it has to conform following rules:

  • Be triggered via HTTPS POST and work with application/json format in input and output;
    • The function's HTTP response status codes may vary from service to service, but in general it must have general 2xx success, 4xx client error, 5xx server error codes.  
  • Should be allowed to be triggered without authentication from specific IP addresses list (usually restriction by domain is not possible):
    • PortaOne iPaaS SMS Dispatcher - 129.159.206.65;
    • Your corporate network ONLY (for testing);
  • Adhere to the interface defined by PortaOne - see example for SMS service by link.

By this link you may find example of creating cloud function in GCP.

By this link you may find in detail process of creating Twilio SMS cloud function in OCI.

Debugging

The requests sent from PortaBilling contain trace id header that will be used to uniquely identify made request and trace whole chain of actions. Depending on selected vendor, the trace id header will be different:

  • Azure - X-Trace-Id
  • Google - X-Cloud-Trace-Context
  • AWS - X-Amzn-Trace-Id
  • Oracle - X-B3-TraceId

They are also default ones used by vendor.You have to make sure that your vendor specific header is applied to your and you can easily filter logs by trace id.  Usually no additional actions from your side required, as those are default accepted headers, but you have to reconfirm it during tests.

Provision to the Add-On mart

Contact the PortaOne partner team (partners@porta.one) for your service app to be listed in Add-on Mart.

Children pages