adobe-apiplatform / api-gateway-aws

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

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

Open vkatoch2000 opened 8 months ago

vkatoch2000 commented 8 months ago

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;

vkatoch2000 commented 8 months ago

is code still maintained @ddragosd ??