1 Risposta
- Più recenti
- Maggior numero di voti
- Maggior numero di commenti
0
Hello.
There is an AWS CLI command that retrieves the list of email addresses registered in the suppression list, so I think it is possible to do this by creating a shell script using that command.
https://docs.aws.amazon.com/ses/latest/dg/sending-email-suppression-list.html#sending-email-suppression-list-view-entries
aws sesv2 list-suppressed-destinations
Running the above command will give you the following output:
I think it would be a good idea to process this and create a CSV.
{
"SuppressedDestinationSummaries": [
{
"EmailAddress": "recipient2@example.com",
"Reason": "COMPLAINT",
"LastUpdateTime": "2020-04-10T21:03:05Z"
},
{
"EmailAddress": "recipient0@example.com",
"Reason": "COMPLAINT",
"LastUpdateTime": "2020-04-10T21:04:26Z"
},
{
"EmailAddress": "recipient1@example.com",
"Reason": "BOUNCE",
"LastUpdateTime": "2020-04-10T22:07:59Z"
}
]
}
I think it is possible by combining the "jq" commands as shown below.
aws sesv2 list-suppressed-destinations | jq -r '.SuppressedDestinationSummaries[] | [.EmailAddress, .Reason] | @csv' > suppression_list.csv
Once processed into CSV, you can upload it to S3 using the "aws s3 cp" command.
aws s3 cp ./suppression_list.csv s3://test-s3
Contenuto pertinente
- AWS UFFICIALEAggiornata 2 anni fa