umegaya / lua-aws

pure-lua implementation of aws REST APIs
122 stars 35 forks source link

lua-aws in Openresty #46

Closed mthota15 closed 6 years ago

mthota15 commented 6 years ago

I am planning to use lua-aws module under Openresty environment. How to leverage the openresty http engine for aws api calls?

umegaya commented 6 years ago

hi, thank you for having interest in lua-aws!

there is http engine for the purpose. https://github.com/umegaya/lua-aws/blob/master/lua-aws/engines/http/lua-resty-http.lua and you should be able to use it like following:

    local aws = AWS.new({
        accessKeyId = ...,
        secretAccessKey = ...,
        endpoint = ...,
        preferred_engines = {
                         http = 'lua-resty-http'
                },
    })
umegaya commented 6 years ago

FYI, currently lua-resty-http have this limitation.

mthota15 commented 6 years ago

Thanks @umegaya.