Skip to content

Using kinesis service throws I am error in ECS fargate task have openresty installed #33

@vkatoch2000

Description

@vkatoch2000

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;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions