Skip to main content

AWS Lambda Resolver

name

Type

string!

Values

awsLambda:invoke


options

The options object contains configuration specific to the type of resolver you select.


args

Type

ParameterConfig?

Description

Allows mapping from the QueryContext to the args values (input arguments) for the resolver. Results are not serialized. For more information read about the ParameterConfig.


results

Type

ParameterConfig?

Description

Allows mapping from the QueryContext to the results for the resolver step in a ComposeResolver or whole query. Results are not serialized. For more information read about the ParameterConfig.

functionName

Type

(string | ParameterConfig)!

Description

Allows mapping from the QueryContext to create a FunctionName for the Lambda resolver invocation. serialize.template is used to place the tokens in the functionName string.

Example

{
"MyLambdaQuery": {
"resolver": {
"name": "awsLambda:invoke",
"service": "aws",
"functionName": {
"ops": [
{
"path": "acct",
"value": "12345678"
},
{
"path": "region",
"value": "us-east-1"
},
{
"path": "fn",
"mapping": "myFunction"
}
],
"serialize": {
"template": "{acct}:{region}:function:{fn}"
}
}
}
}
}
var functionName = '12345678:us-east-1:function:myFunction';

payload

Type

ParameterConfig?

Description

Allows mapping from the QueryContext to create a Payload for the Lambda resolver invocation.

Example

var $args = {
price: '123',
couponCode: 'FREE_STUFF'
};
{
"MyLambdaQuery": {
"resolver": {
"name": "awsLambda:invoke",
"service": "aws",
"payload": {
"ops": [
{
"path": "price",
"mapping": "$args.price"
},
{
"path": "coupon",
"mapping": "$args.couponCode"
}
]
}
}
}
}
var payload = {
price: '123',
coupon: 'FREE_STUFF'
};

clientContext

Type

ParameterConfig?

Description

Allows mapping from the QueryContext to create a ClientContext for the Lambda resolver invocation. This object will be base64 encoded per the AWS spec and it should not exceed 3583 bytes.

Example

{
"MyLambdaQuery": {
"resolver": {
"name": "awsLambda:invoke",
"service": "aws",
"payload": {
"ops": [
{
"path": "userName",
"value": "dunefan10191"
}
]
}
}
}
}
var clientContext = 'eyJ1c2VyTmFtZSI6ImR1bmVmYW4xMDE5MSJ9';