prometheus / cloudwatch_exporter

Metrics exporter for Amazon AWS CloudWatch
Apache License 2.0
903 stars 325 forks source link

STS and Custom Cloudwatch Endpoints #183

Open mrazavi32 opened 5 years ago

mrazavi32 commented 5 years ago

Does the Cloudwatch exporter support the use of temp credentials/Security Token Service and C2S endpoints (non-public AWS endpoints)?

jscheid commented 5 years ago

I'm pretty sure it doesn't. Would you accept a PR that adds this feature?

brian-brazil commented 5 years ago

Per https://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/credentials.html it should be possible via file.

jscheid commented 5 years ago

Thanks for the link but I can't see immediately what you're referring to. I'd like to point at a custom http URL, but I think https://github.com/prometheus/cloudwatch_exporter/blob/cbe73e796998012504485bc3f01298b6403d4615/src/main/java/io/prometheus/cloudwatch/CloudWatchCollector.java#L225 means that the URL is always derived from the region and always using https. Am I missing something?

or-shachar commented 2 years ago

@jscheid is this still an issue? would like to elaborate a little more?

matthiasr commented 2 years ago

I am wary of allowing users to override (potentially security relevant) endpoints. Under what circumstances is this necessary? The exporter uses a few different APIs; would the user have to provide URLs to all of them, or is there any higher-level setting that would allow achieving this intention less verbosely?