adobe-apiplatform / api-gateway-aws

AWS SDK for NGINX with Lua
Apache License 2.0
171 stars 44 forks source link

Lambda Invocation times out after 60 s #22

Open denis-singh opened 7 years ago

denis-singh commented 7 years ago

Hi, We have some lambda's that run for more than 60s. Is it possible to remove the "60000" that has been hardcoded into the lambda invoke function and get it to use the "aws_conn_keepalive" variable when a new lambda service is created?

-- actionName, arguments, path, http_method, useSSL, timeout, contentType
    local ok, code, headers, status, body = self:performAction("Invoke", payload, path, "POST", true, 60000, "application/x-amz-json-1.1", extra_headers)

    if (code == ngx.HTTP_OK and body ~= nil) then
        return {}, code, headers, status, body
    end
    return nil, code, headers, status, body
end
ddragosd commented 7 years ago

aws_conn_keepalive has another purpose, but we could expose a timeout parameter to the invoke method. Feel free to submit a PR if it's urgent for you.