0

I'm trying to fetch cloudwatch data about the BytesProcessed in my VPC endpoints in AWS using AWS CLI or boto3 and I get an empty answer although it isn't empty in cloudwatch UI. Please help me understand what I do wrong.

I use the following CLI command -

aws cloudwatch get-metric-statistics --namespace AWS/PrivateLinkEndpoints --metric-name BytesProcessed --start-time 2023-04-30T09:00 --end-time 2023-04-30T09:30 --period 300 --statistics Average

And get the following answer -

{

    "Label": "BytesProcessed",
    "Datapoints": []
}

BTW I get the same answer when I set the namespace to AWS/BlaBla or the metric to BlaBla so I suspect one of those is not correct but I could not find documentation online.

I get the same empty response when I try using boto3 -

import boto3
client = boto3.client("cloudwatch")
 
response = client.get_metric_statistics(
    Namespace='AWS/PrivateLinkEndpoints',
    MetricName='BytesProcessed',
    StartTime=datetime(2023, 4, 30, 9, 0),
    EndTime=datetime(2023, 4, 30, 9, 30),
    Period=300,
    Statistics=['Average'],
    )
Tom Ron
  • 5,906
  • 3
  • 22
  • 38

0 Answers0