Soracom Funk
Configuration
Enabling Funk will incur fees based on the number of requests made. Refer to the Pricing & Fee Schedule for more information.
Soracom Funk settings are found in Soracom Air or Soracom Inventory group settings.
Funk settings are shared among all device types within the same group. This means that you can configure Funk for one device type (cellular, Sigfox, LoRaWAN, or Inventory), and all other device types within that group will also use the same Funk settings.
If you want to use different Funk settings for different device types, simply create multiple groups each with different Funk settings, and assign your devices accordingly.
To configure Funk, open the settings page of the group that you want to configure.
Underneath the Basic Settings tab, click the SORACOM Funk panel to expand its settings.
Enable Funk by switching the option to ON.
You can then select the Service where you would like Funk to send data, and provide configuration parameters for the service.
Parameters
- Service - The cloud function provider where Funk will send data. Possible options are:
- AWS Lambda
- Azure Functions
- Google Cloud Functions
- Content type - The format of data being sent by your device.
- Credentials - The authentication credentials to use to connect to your cloud function.
- Function ARN or Function URL - The ARN or URL where your data will be sent, as configured in your cloud function.
When selecting the AWS Lambda service, you can also append :{VERSION}
to the end of the resourceUrl to specify which version of your function should be called.
When selecting the Google Cloud Functions service, the Credentials setting is not required. Refer to Google Cloud Functions documentation for different techniques to authenticate requests.
Advanced Configuration
Funk can also be configured through the Soracom API or CLI by using the SoracomFunk namespace.
Configuration Structure
"SoracomFunk": {
"enabled": true|false,
"destination": {
"provider": "aws"|"azure"|"google",
"service": "lambda"|"function-app"|"cloud-functions",
"resourceUrl": "https://example.com/path/to/resource"
},
"credentialsId": {
"$credentialsId": "my-credentials",
},
"contentType": "unspecified"|"application/json"|"text"|"binary"
}
Parameters
Enable or disable Funk:
- key (string, required) -
enabled
- value (boolean, default:
false
) - Enables or disables Funk.
Modify the Funk destination:
- key (string, required) -
destination
- value (object, required) - Destination configuration.
- provider (string, required) - Select the destination provider. Valid options:
"aws"
,"azure"
, and"google"
. - service (string, required) - Select the destination service. The service must correspond to the provider. Valid options:
"lambda"
,"function-app"
, or"cloud-functions"
. - resourceUrl (string, required) - The resource ARN or function URL.
- provider (string, required) - Select the destination provider. Valid options:
Modify credentials to use for authentication (this parameter has no effect when using Google Cloud Functions):
- key (string, required) -
$credentialsId
- value (string, required) - Name of credentials stored on Soracom to use for authentication with Funk destination.
Modify data processing behavior:
- key (string, required) -
contentType
- value (string, default:
"json"
) - Specifies processing to be applied to user data contained in payloads. Valid options:"unspecified"
,"application/json"
,"text"
, or"binary"
. When set to JSON, data will be parsed as JSON.
Sample configurations
For AWS Lambda:
[
{
"key": "enabled",
"value": true
},
{
"key": "destination",
"value": {
"provider": "aws",
"service": "lambda",
"resourceUrl": "arn:aws:lambda:us-east-1:900012345678:function:my-lambda-function"
}
},
{
"key": "$credentialsId",
"value": {
"my-aws-credentials"
}
},
{
"key": "contentType",
"value": "application/json"
}
]