Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ListTagsForResource fails to get log group tags after v3.115.0 #824

Open
selina-yosh opened this issue Jul 26, 2024 · 0 comments
Open

ListTagsForResource fails to get log group tags after v3.115.0 #824

selina-yosh opened this issue Jul 26, 2024 · 0 comments

Comments

@selina-yosh
Copy link

Describe what happened:
We use aws-dd-forwarder-3.115.0 to forward cloudwatch logs to datadog, and we get the following error:
"Failed to get log group tags"
botocore.exceptions.ClientError: An error occurred (ValidationException) when calling the ListTagsForResource operation: Invalid resourceArn

When we use aws-dd-forwarder-3.114.0, there is no error.


[ERROR] 2024-07-22T03:22:22.805Z fb3a2610-d2b1-4d0c-a736-0e02bce8ac0b [dd.trace_id=2685132624149447776 dd.span_id=8357311845160155887] Failed to get log group tags
Traceback (most recent call last):
File "/var/task/caching/cloudwatch_log_group_cache.py", line 174, in _get_log_group_tags
response = self.cloudwatch_logs_client.list_tags_for_resource(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/lang/lib/python3.11/site-packages/botocore/client.py", line 534, in _api_call
return self._make_api_call(operation_name, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/lang/lib/python3.11/site-packages/botocore/client.py", line 976, in _make_api_call
raise error_class(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (ValidationException) when calling the ListTagsForResource operation: Invalid resourceArn

Describe what you expected:
We expected no error.

Cause:
We see in aws-dd-forwarder-3.115.0,
boto3 API is changed from “ListTagsLogGroup” to “ListTagsForResource”,but boto3 version(1.10.33) is not changed to support the API “ListTagsForResource”, caused this error.

v3.115.0 release note:
https://github.com/DataDog/datadog-serverless-functions/releases

boto3 v1.10.33 support list:
https://boto3.amazonaws.com/v1/documentation/api/1.10.33/reference/services/logs.html#client
We can see "list_tags_log_group" supported, "list_tag_for_resource" not support.

Steps to reproduce the issue:
Using aws-dd-forwarder-3.115.0(perheps version after v3.115.0) to forward cloudwatch loggroup will reproduce the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant