I am writing a Lambda Function in Python, which will use AWS SES for sending emails.
However, in my test AWS account, I don't want to send emails to real users.
So I wanted to perform a check like this,
if Account_Status = SANDBOX, then send emails to a pre-verified default recipient. (e.g. an internal company email address )
if Account_Status = PROD, then send emails to the real user email addresses.
But I couldn't find any related boto3 method in ses client, which can give me Account Status.
I tried response = client.get_account_sending_enabled() but it returns true even if account is in sandbox..
You can use the sesv2 api instead which has a flag directly defined in the response of the get_account() function.
From the documentation: