Invoke AWS Lambda

Invokes an AWS Lambda function and processes its response.

Use the Invoke AWS Lambda policy to execute an AWS Lambda function and integrate the function’s response into the assembly flow.

For more information on the policy parameter descriptions, see DataPower Nano Gateway documentation.

Example of an Invoke AWS Lambda policy in code view.

kind: InvokeAWSLambda
apiVersion: api.ibm.com/v1
metadata:
  name: AWSLambdaExtension
  version: 1
  namespace: sample
spec:
  functionName: test
  qualifier: v1 # version of a function name
  invocationType: request-response #invocation type - request-response  or event 
  region: aws-us
  awsAuthType: 
    accessSecret: my-aws-secret 
  tlsConnectionProfile: my-aws-con-alias 
  input: inputMessage #optional (if empty no message is sent along with the lambda function invocation)
  output: outputMessage #optional -> by default the response
  clientConfig: # Only a subset of the client config properties are supported in the news AWS SDK for rust
    # Timeouts (in milliseconds)
    socketTimeout: 1000
    connectionTimeout: 1000
    requestTimeout: 1000
    clientExecutionTimeout: 1000
    clientRetryCount: 5
    connectionExpirationTimeout: 100
    enableExpectContinue: true
    enableGzip: true
    enableHostPrefixInjection: true
    maxConnectionIdleTime: 1000
    responseMetadataCacheSize: 128
    # Retry settings
    enableThrottledRetries: true
    # Connection settings
    enableKeepAlive: true
    enableResponseMetadataCache: true
    signatureAlgorithm: test
    tcpSendBufferSizeHint: 10
    tcpReceiveBufferSizeHint: 10
  extensions:
    dp-nano-gateway:
      apiVersion: api.ibm.com/v1
      spec:
        clientConfig:
          serverRetryCount: 3