ruby AWS sdk, auth, and greengrass issues.

0

I'm trying to follow the docs about using greengrass component based auth, and run into a confusing situation.

Ive read that in a greengrass environment, as long as the automatic environment variables are set, auth is handled automatically.

(specifically, AWS_CONTAINER_AUTHORIZATION_TOKEN and AWS_CONTAINER_CREDENTIALS_FULL_URI)

This actually works great when I use a dummy test ruby program, to do things like

wrapper = Aws::IAM::Client.new wrapper.get_user

But when I swap out my test program, for fluentd, using the timestream plugin at https://github.com/StudistCorporation/fluent-plugin-timestream

it bombs out with an auth error,

failed to flush the buffer. retry_times=0 next_retry_time=2023-04-12 17:54:12 +0000 chunk="5f9274b9cd65f79f9897b62d5fca25ed" error_class=Aws::Errors::EndpointDiscoveryError error="Endpoint discovery failed for the operation or discovered endpoint is not working, request will keep failing until endpoint discovery succeeds or :endpoint option is provided."

This is making no sense to me. How can the same(?) ruby aws lib work in one case, but fail in the other?

For what it's worth, this is using ubuntu 20.04

질문됨 일 년 전193회 조회
1개 답변
1
수락된 답변

The error you get is not related to the credentials, but to the Timestream client not being able to determine the endpoint to connect to. Timestream uses a cellular architecture where the endpoint is not fixed. AWS SDKs implements the endpoint discovery pattern and apparently this is failing inside your Greengrass component. You should verify that the permissions associated to the Greengrass TES Role allow the timestream:DescribeEndpoints action.

AWS
전문가
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠