Dear PureCloud Developers
Wishing you are well.
I was wondering if I could ask for help with a test AWS Lambda Action?
I have created a "Hello world" GET request on Lambda available from the following resource
https://9g0ewror34.execute-api.ap-southeast-2.amazonaws.com/prod/helloworld?key1=helloworld
And I would like to create a data action that calls it from PureCloud.
The URL to call is https://9g0ewror34.execute-api.ap-southeast-2.amazonaws.com/prod/helloworld?key1=helloworld and I have used the attached Data Action (which is copied in text below) Samuel-AWS-Helloworld-20181005212536.custom.json (1.4 KB)
I can call it in postman, when I call it from the Data actions I receive the following error:
This is my first try at AWS Lambda calls, any assistance and guidance will be extremely appreciated. Thank you.
8. Execute: [Lambda error] Caused by: 1 validation error detected: Value 'https://9g0ewror34.execute-api.ap-southeast-2.amazonaws.com/prod/helloworld?key1=helloworld' at 'functionName' failed to satisfy constraint: Member must satisfy regular expression pattern: (arn:(aws[a-zA-Z-]*)?:lambda:)?([a-z]{2}((-gov)|(-iso(b?)))?-[a-z]+-\d{1}:)?(\d{12}:)?(function:)?([a-zA-Z0-9-.]+)(:($LATEST|[a-zA-Z0-9-]+))? (Service: AWSLambda; Status Code: 400; Error Code: ValidationException; Request ID: 56640aea-c891-11e8-898c-7f629d28ef3b) [6318f5cb-827b-42ee-9a48-8634e9e48140]
{
"status": 400,
"code": "the request could not be understood by the server due to malformed syntax.",
"entityName": "https://9g0ewror34.execute-api.ap-southeast-2.amazonaws.com/prod/helloworld?key1=helloworld",
"message": "[Lambda error] Caused by: 1 validation error detected: Value 'https://9g0ewror34.execute-api.ap-southeast-2.amazonaws.com/prod/helloworld?key1=helloworld' at 'functionName' failed to satisfy constraint: Member must satisfy regular expression pattern: (arn:(aws[a-zA-Z-]*)?:lambda:)?([a-z]{2}((-gov)|(-iso(b?)))?-[a-z]+-\d{1}:)?(\d{12}:)?(function:)?([a-zA-Z0-9-\.]+)(:(\$LATEST|[a-zA-Z0-9-]+))? (Service: AWSLambda; Status Code: 400; Error Code: ValidationException; Request ID: 56640aea-c891-11e8-898c-7f629d28ef3b) [6318f5cb-827b-42ee-9a48-8634e9e48140]",
"messageParams": {},
"contextId": "6318f5cb-827b-42ee-9a48-8634e9e48140",
"details": [],
"errors": []
}
{
"name": "Samuel AWS Helloworld - Exported 2018-10-05 @ 21:25",
"integrationType": "aws-lambda-data-actions",
"actionType": "custom",
"config": {
"request": {
"requestUrlTemplate": "https://9g0ewror34.execute-api.ap-southeast-2.amazonaws.com/prod/helloworld?{input.key}",
"requestType": "GET",
"headers": {
"Content-Type": "application/x-www-form-urlencoded",
"x-api-key": "zzzzzzzzzzzz"
},
"requestTemplate": "{input.rawRequest}"
},
"response": {
"translationMap": {
"total": ".test"
},
"translationMapDefaults": {},
"successTemplate": "{\n \"test\": {test}\n }"
}
},
"contract": {
"input": {
"inputSchema": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Get total from datatable",
"description": "AWS HelloWorld",
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"description": "key",
"type": "string"
}
}
}
},
"output": {
"successSchema": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "title",
"description": "description",
"type": "object",
"properties": {
"total": {
"type": "integer"
}
}
}
}
},
"secure": false
}