Cherry-pick #16263 to 7.x: Add endpoint into AWS config #16389
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Cherry-pick of PR #16263 to 7.x branch. Original message:
What does this PR do?
This PR is to add support for custom endpoint configuration in the AWS modules for Filebeat and Metricbeat.
AWS Service endpoints: https://docs.aws.amazon.com/general/latest/gr/aws-service-information.html
Why is it important?
There are users running in AWS private cloud regions, which require endpoint URL in configuration to access AWS API. The
ap-northeast-3
Region in Japan is not returned by Region enumeration APIs, such asEC2.describeRegions
API. To define endpoints for this Region, custom endpoint needs to be used:So the Amazon EC2 endpoint for this Region would be
ec2.ap-northeast-3.amazonaws.com
.Checklist
How to test this PR locally
Use
endpoint
config with regions to collect metrics. For example, the config below is to only collect EC2 cloudwatch metrics fromus-west-1
region underamazonaws.com
endpoint.Similarly, testing endpoint config parameter with Filebeat s3 input can use config like below:
For testing autodiscovery
aws_ec2
provider, config below can be used:aws_ec2
provider is workingresourcegroupstaggingapi
with endpoint: make sure tags for each service are collected with endpoint config provided.regions
config parameter: make sure if there is noregions
specified, then metrics from all regions should be collected.Related issues
#16245