Problem :
while trying to use lua custom lua module to send data to kinesis , we are getting some error
Error Trace:
{"error":"...esty/luajit/share/lua/5.1/api-gateway/aws/AwsService.lua:202: attempt to concatenate field 'aws_access_key' (a nil value)"}
Code snippet :
function _M.send(region, role, data, stream_name)
local service = KinesisService:new({
aws_region = region,
aws_credentials = {
provider = "api-gateway.aws.AWSIAMCredentials",
shared_cache_dict = "shared_iam_dict",
security_credentials_host = "169.254.170.2",
security_credentials_url= os.getenv("AWS_CONTAINER_CREDENTIALS_RELATIVE_URI")
}
})
local response = service:putRecord(stream_name, data, "partition-id")
return response
end
it seems api is not able to get security IAM credentails
Can you please let me know , what went wrong , any help will be appreciated?
env is set in AWS_CONTAINER_CREDENTIALS_RELATIVE_URI in nginx.conf
env AWS_CONTAINER_CREDENTIALS_RELATIVE_URI;