Support API filters out AWS Support Cases that are created in a non english language
Describe the bug
Hello,
This issue to report a bug we identified with the AWS Support API, where-in when we use the Support Client and we paginate and describe AWS Support cases, only the cases that are created originally in the console with the english language will be returned.
Here's a snippet that you can use to reproduce the issue:
import boto3
from datetime import datetime
def lambda_handler(event, context):
support = boto3.client(
"support",
region_name = "us-east-1",
)
case_iterator = (
support
.get_paginator('describe_cases')
.paginate(
afterTime="2025-04-27",
includeCommunications=False,
includeResolvedCases=True,
)
.search("""cases[].{
CaseId: caseId,
DisplayId: displayId,
Subject: subject,
Status: status,
ServiceCode: serviceCode,
CategoryCode: categoryCode,
SeverityCode: severityCode,
SubmittedBy: submittedBy,
TimeCreated: timeCreated,
CCEmailAddresses: ccEmailAddresses,
Language: language
}""")
)
for index, data in enumerate(case_iterator):
display_id = data['DisplayId']
print(display_id)
if __name__ == '__main__':
lambda_handler({}, None)
Before you trigger this snippet, make sure to:
- first create a test AWS Support Case with french selected as "Preferred contact language" and record the AWS Support Case ID
- second create another AWS Support Case with english as "Preferred contact language" and record the AWS Support Case ID
- change the value of line 13 to have todays date
- run the snippet and notice that only the second AWS Support Case ID is returned.
Regression Issue
- [ ] Select this option if this issue appears to be a regression.
Expected Behavior
Expected behaviour is that all the Support Cases should be returned by the API if there's no filter on the language as input (as it is the case in my code).
Current Behavior
Only the AWS Support Case with English as preferred contact language is returned.
Reproduction Steps
see above.
Possible Solution
it looks like the API automatically filters out non english preferred contact language cases.
Additional Information/Context
No response
SDK version used
latest
Environment details (OS name and version, etc.)
macos
Hello @schniber, thanks for reaching out. I have tested the above replicated issue and got the same results whgere I only got english cases. However, checking the paginator page for the DescribeCases : https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/support/paginator/DescribeCases.html language parameter can be added. So on my replication, I have added the parameter and got cases that are non english cases (and all languages that AWS Support supports: "en", "es", "ja", "pt", "zh", "ko")
My repro :
import boto3
def test_pagination_with_language():
support = boto3.client("support", region_name="us-east-1")
languages = ["en", "es", "ja", "pt", "zh", "ko"]
for lang in languages:
print(f"Testing language: {lang}")
try:
# Paginated call WITH language parameter
case_iterator = (
support
.get_paginator('describe_cases')
.paginate(
language=lang, # Add language parameter here
afterTime="2025-05-23",
includeCommunications=False,
includeResolvedCases=True,
)
.search("""cases[].{
DisplayId: displayId,
Subject: subject,
Language: language
}""")
)
cases = list(case_iterator)
print(f" Cases found: {len(cases)}")
for case in cases:
print(f" - {case['DisplayId']}: {case.get('Language')} | {case.get('Subject', 'No subject')}")
except Exception as e:
print(f" ERROR: {e}")
print()
def test_pagination_all_languages():
support = boto3.client("support", region_name="us-east-1")
languages = ["en", "es", "ja", "pt", "zh", "ko"]
all_cases = []
for lang in languages:
case_iterator = (
support
.get_paginator('describe_cases')
.paginate(
language=lang,
afterTime="2025-05-23",
includeCommunications=False,
includeResolvedCases=True,
)
.search("""cases[].{
DisplayId: displayId,
Subject: subject,
Language: language
}""")
)
for case in case_iterator:
all_cases.append(case)
print(f"Total cases collected: {len(all_cases)}")
print("All cases:")
for case in all_cases:
print(f" - {case['DisplayId']}: {case.get('Language')} | {case.get('Subject', 'No subject')}")
if __name__ == '__main__':
test_pagination_with_language()
print("\n" + "="*60 + "\n")
test_pagination_all_languages()
Let me know if you have any questions. Thanks.
Hey Adrian,
yes indeed by injecting the languages and looping over it it works.
I wish this was natively supported by the API wherein:
- if no language is specified, then it outputs all cases without filters
- else, if a language filter is specified, then the API can honor that.
Thanks for the inputs. I have raised this feature request to the Support Service Team. Going forward, we don't have visibility and approximate time on when the service team is going to release but check the Changelog for updates: https://github.com/boto/boto3/blob/develop/CHANGELOG.rst. Thank you.
This issue is now closed. Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one.