Appdynamics / Appdynamics/aws-cloudwatch-exts-commons

Using monitors that depend on aws-cloudwatch-exts-commons/src/main/java/com/appdynamics/extensions/aws/collectors/RegionMetricStatisticsCollector.java has trouble on ECS Fargate

Open
#6 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
0
Forks
9
Avg merge
5m
Merged PRs (30d)
1

Description

Hi,

I am trying to run the standalone machine agent with the Route53 monitor in AWS ECS Fargate Service/Task/Container. However, the monitor fails to acquire credentials, because
aws-cloudwatch-exts-commons/src/main/java/com/appdynamics/extensions/aws/collectors/RegionMetricStatisticsCollector.java uses the InstanceProfileCredentialsProvider rather than the DefaultCredentialsProvider:

Caused by: com.amazonaws.AmazonClientException: Unable to load credentials from Amazon EC2 metadata service
at com.amazonaws.auth.InstanceProfileCredentialsProvider.handleError(InstanceProfileCredentialsProvider.java:244)
at com.amazonaws.auth.InstanceProfileCredentialsProvider.loadCredentials(InstanceProfileCredentialsProvider.java:225)
at com.amazonaws.auth.InstanceProfileCredentialsProvider.getCredentials(InstanceProfileCredentialsProvider.java:124)
at com.amazonaws.services.cloudwatch.AmazonCloudWatchClient.invoke(AmazonCloudWatchClient.java:970)
at com.amazonaws.services.cloudwatch.AmazonCloudWatchClient.listMetrics(AmazonCloudWatchClient.java:429)
at com.appdynamics.extensions.aws.metric.processors.MetricsProcessorHelper.getMetrics(MetricsProcessorHelper.java:79)
at com.appdynamics.extensions.aws.metric.processors.MetricsProcessorHelper.getMetrics(MetricsProcessorHelper.java:70)
at com.appdynamics.extensions.aws.metric.processors.MetricsProcessorHelper.getFilteredMetrics(MetricsProcessorHelper.java:40)
at com.appdynamics.extensions.aws.route53.Route53MetricsProcessor.getMetrics(Route53MetricsProcessor.java:45)
at com.appdynamics.extensions.aws.collectors.RegionMetricStatisticsCollector.call(RegionMetricStatisticsCollector.java:85)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with aws-cloudwatch-exts-commons/src/main/java/com/appdynamics/extensions/aws/collectors/RegionMetricStatisticsCollector.java and trace the credential provider used by the CloudWatch client. Check the Route53MetricsProcessor path and the reported ECS Fargate stack trace. Done means monitors using this collector can acquire credentials through the provider intended for ECS Fargate rather than only EC2 instance metadata.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, java
Domain
backend, cloud
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.