Currently S3 discovery returns the buckets in all regions, regardless of the region specified to the discovery script. The problem comes when trying to create metrics for those buckets because the metrics are tied to the region of the bucket, so some of the created items from the prototypes will always return empty datapoints.
This PR filters the discovered buckets to those only in the active region, making all the metrics valid for all the buckets discovered once the items have been created from their protoypes.
Currently S3 discovery returns the buckets in all regions, regardless of the region specified to the discovery script. The problem comes when trying to create metrics for those buckets because the metrics are tied to the region of the bucket, so some of the created items from the prototypes will always return empty datapoints.
This PR filters the discovered buckets to those only in the active region, making all the metrics valid for all the buckets discovered once the items have been created from their protoypes.