I'm running a query to a timestream table and it is constantly giving me an error "
Endpoint Discovery failed to refresh the required endpoints."
I do not know what's going on, and the thing is that this code is supposed to do its job.
It never reaches the query statement, when the for loop starts, it throws the exception.
Could anyone be of help? Thanks in advance.
client = boto3.client('timestream-query',
aws_access_key_id=os.getenv('AWS_ACCESS_KEY'),
aws_secret_access_key=os.getenv( 'AWS_SECRET_ACCESS_KEY'),
region_name=os.getenv('REGION_NAME') )
paginator = client.get_paginator('query')
query_string = "SELECT * FROM DB.table"
try:
page_iterator = paginator.paginate(QueryString=query_string)
for page in page_iterator: # fails here <----
self._parse_query_result(page)
except Exception as err:
print("Exception while running query:", err)