You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The AWS CLI is able to retrieve the documents by tag
aws --version
aws-cli/2.11.13 Python/3.11.3 Linux/5.15.90.1-microsoft-standard-WSL2 exe/x86_64.ubuntu.20 prompt/off
aws ssm list-documents --profile dev --filters Key=tag:Component,Values=core-directory-retrieve-groups-for-user
b-ngu
changed the title
(short issue description)
Boto3 1.26.117 list_documents() not retrieving documents when filtered by tag
Apr 21, 2023
b-ngu
changed the title
Boto3 1.26.117 list_documents() not retrieving documents when filtered by tag
Boto3 1.26.117 ssm list_documents() not retrieving documents when filtered by tag
Apr 21, 2023
Describe the bug
boto3==1.26.117 ssm client list_documents() call is not filtering documents by tag
Expected Behavior
list_documents() should return documents when filtered by tag
Current Behavior
list_documents() appears to not find the document when filtered by tag, despite the document being tagged
Reproduction Steps
session = boto3.session.Session(profile_name="dev")
client = session.client("ssm")
response = client.list_documents(Filters=[
{
'Key': 'tag:Component',
'Values': ['core-directory-retrieve-groups-for-user']
}
])
logger.debug(pformat(response))
Output
response
'DocumentIdentifiers': [],
'NextToken': 'AAMAARqoT0YpDF0hNtKThpjLNC4mcm5RlQKIrnXPcq42yHoRAAAAAGRClb4FgM1VrH1s60MfZ76kjxBEovTFOytUnZTIziJSJ2olAEQgF2fM8U2D4PXjwYkV500dDQAENagCtkb+uDjZzhy0GBybhOtsHX35Jg8vVPQCYSu3cRsNp1zHhdyV+wTEi/oJF07DFXbQgnhfknssGjXHm6V5+R1BLA75TcVG+bax5CD5RIylYs4AEcJ0LeetUiIbxYbjB3bc8gQB6F+JWYm4sFWdP5JJhxW26AfiQgSof5EHBwMnWiK+BA3sGh67uppsnANedxukf2Cq88nl4X3nS8OUx39j79IvRsXkxg5e6QKOg4XSQhzjLJXVqxveWOb0eyhMzKztc/tpQ/0xs4AXKu2xVIXgfCF/DlC2199PXXYzJ3FtXsSAtyv7ICSnsxG9qlGBJqCtfhTK0TOUxpIRT7WNUh48so06bthaY3In1rqYur+p5Eh6irnVCjBAmscyhOKLt+DN+lk/2VMVu5BtEVuR3c5fdX1vkxiNR/KXo3/Q5EZLA0U0sOamZEftifpJe3L/XaqK5feElmgb+Ier9mrbS6PySQgKHc6Y90cVwWd7JxhyXldO1WugzDgtylUl3ywYmo9NewT2+0HpyiRGdI9GbhcbsW7Q1/HmJYdlUxXIME5EWdhA6H2vPbdQg34Uz/lEobhFh3Utr7L8I3ua1MEgSsB/mnwSYxBiBvcye5K79qDcwnmHipuPUMcnf6MloA2Y9i6+NZhpSBbL/z2OvylDSj3Y/CQNetoSRZTyecyfbcpFseETKXPOE6TsKtli9d0mHkh4CAJQqYtVDPBTg1bedK0J9g3LdwP7vE7CKKPC7EfxO03LeTd6kBUiN8abQO2Gg3zd5x8Agy9ww1R8XkQIjWKsaXhapWrAdbF+QC7/vmoIYCLsnx4dNkI5VGdEYpI9+tjqJ8KaO+9zue9REbS9/PIEY3AI839flpGkF2i8SBMef0rGkW48s+mwi5d0T8cJKKrcSe34D3CRvkpg',
'ResponseMetadata': {'HTTPHeaders': {'connection': 'keep-alive',
'content-length': '1081',
'content-type': 'application/x-amz-json-1.1',
'date': 'Fri, 21 Apr 2023 13:55:10 GMT',
'server': 'Server',
'x-amzn-requestid': '319ffb0b-ecbd-4f71-b3bf-249de47bf432'},
'HTTPStatusCode': 200,
'RequestId': '319ffb0b-ecbd-4f71-b3bf-249de47bf432',
'RetryAttempts': 0}}
Possible Solution
No response
Additional Information/Context
The AWS CLI is able to retrieve the documents by tag
aws --version
aws-cli/2.11.13 Python/3.11.3 Linux/5.15.90.1-microsoft-standard-WSL2 exe/x86_64.ubuntu.20 prompt/off
aws ssm list-documents --profile dev --filters Key=tag:Component,Values=core-directory-retrieve-groups-for-user
Output
{
"DocumentIdentifiers": [
{
"Name": "core-directory-retrieve-groups-for-user-Document-156PFmQlwgwp",
"CreatedDate": "2023-04-20T16:08:57.741000-06:00",
"Owner": "xxxxxxxxxxxx",
"PlatformTypes": [
"Windows",
"Linux"
],
"DocumentVersion": "1",
"DocumentType": "Command",
"SchemaVersion": "2.2",
"DocumentFormat": "YAML",
"TargetType": "/AWS::EC2::Instance",
"Tags": [
{
"Key": "App",
"Value": "directory"
},
{
"Key": "AppCode",
"Value": "ABC123"
},
{
"Key": "core-patch-environment",
"Value": "dev"
},
{
"Key": "Branch",
"Value": "dev"
},
{
"Key": "Portfolio",
"Value": "core"
},
{
"Key": "Environment",
"Value": "nonp"
},
{
"Key": "Component",
"Value": "core-directory-retrieve-groups-for-user"
},
{
"Key": "Name",
"Value": "core-directory-dev-core-directory-retrieve-groups-for-user"
}
]
}
]
}
SDK version used
1.26.117
Environment details (OS name and version, etc.)
Ubuntu 20.04.5 LTS (WSL on WIndows)
The text was updated successfully, but these errors were encountered: