Open delhi09 opened 2 weeks ago
Hi @delhi09, thanks for reaching out. Since you received a NextToken
, I suspect what's happening here is that pagination is taking place before filtering. You're using the --no-paginate
flag, so if your OPT_OUT
contact is not in the first page of results, getting no results back makes sense. If you remove that, or continue paginating, what's the response look like?
Hi @RyanFitzSimmonsAK , thank you for your suggestion. I tried it, but unfortunately, it didn't change the result.
$ aws sesv2 list-contacts --contact-list-name=TestContactList --filter="FilteredStatus=OPT_OUT,TopicFilter={TopicName=test-topic,UseDefaultIfPreferenceUnavailable=true}" --region us-east-1
{
"Contacts": [],
"NextToken": “xxx”
}
What if you continue to paginate using the NextToken
?
Describe the bug
I would like to count OPT_OUT emails in the list management of AWS SES.
I confirmed at least one OPT_OUT email exists using the following command:
However, the following command always returns an empty result:
When
FilteredStatus=OPT_IN
, the command successfully returns OPT_IN emails as follows:Expected Behavior
OPT_OUT emails should be returned as follows:
Current Behavior
As described in the "Describe the bug" section.
Reproduction Steps
1.Send an email using the SESv2 API with ListManagementOptions:
2.Receive the email in a Gmail client and click the "Unsubscribe" link.
3.Confirm "test@example.com" is saved as
OPT_OUT
using the following command:OPT_OUT
emails using the following command. It will probably return an empty result:Possible Solution
No response
Additional Information/Context
No response
CLI version used
aws-cli/2.16.7 Python/3.11.8 Darwin/23.4.0 exe/x86_64
Environment details (OS name and version, etc.)
macOS 14.4.1