boto / boto3

AWS SDK for Python
https://aws.amazon.com/sdk-for-python/
Apache License 2.0
9.07k stars 1.87k forks source link

describe_db_instances API shows RDS and DocumentDB #3234

Closed ashraf133 closed 2 years ago

ashraf133 commented 2 years ago

Describe the bug

When i execute describe_db_instances api call on RDS it is should show me only RDS instances but it shows also DocumentDB instance !

         """"rds = boto3.client('rds',
                        aws_access_key_id=response['Credentials']['AccessKeyId'],
                        aws_secret_access_key=response['Credentials']['SecretAccessKey'],
                        aws_session_token=response['Credentials']['SessionToken'],
                        region_name= region
                        )

            db = rds.describe_db_instances()"""

Expected Behavior

Show only RDS instances

Current Behavior

Showing both RDS and DocumentDB

Reproduction Steps

Having RDS and DocumentDB instances and then run describe_db_instances

Possible Solution

No response

Additional Information/Context

No response

SDK version used

1.19.5

Environment details (OS name and version, etc.)

windows 10

kdaily commented 2 years ago

Hi @ashraf133,

Thanks for writing in. The documentation page also notes this as expected behavior:

https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/rds.html#RDS.Client.describe_db_instances

Note

This operation can also return information for Amazon Neptune DB instances and Amazon DocumentDB instances.

You can read more about it here how to mitigate it using filters (this would be via the Filters parameter in boto3):

https://github.com/aws/aws-cli/issues/5859#issuecomment-760366515

github-actions[bot] commented 2 years ago

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.