amazon-web-servicesamazon-redshiftboto3endpoint

With Boto3, how can I query the Redshift endpoint?


I found the following documentation about this: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/redshift/client/describe_endpoint_access.html

In theory there should be a describe_endpoint_access which looks like what I need. I tried running the code below:

redshift = boto3.client('redshift',
                   region_name="us-west-2",
                   aws_access_key_id=KEY,
                   aws_secret_access_key=SECRET
                   )
redshift.describe_endpoint_access(ClusterIdentifier=DWH_CLUSTER_IDENTIFIER)

I got the error: AttributeError: 'Redshift' object has no attribute 'describe_endpoint_access'

I also tried redshift.client.describe_endpoint_access(ClusterIdentifier=DWH_CLUSTER_IDENTIFIER)

and I got the same result.


Solution

  • I see no issue with what is being attempted. Check to ensure the correct version of boto3 is being used. You can check that from the Python interpreter to ensure you are using the version of boto3 that supports that function for reshift client.

    >>> boto3.__version__
    '1.34.153'
    >>>