For your case the below policy is all you need
{
"Version": "2021-12-16",
"Statement": [
{
"Sid": "AllowsSES",
"Effect": "Allow",
"Action": "ses:*",
"Resource": "arn:aws:ses:(regiondetail):(AWSAccountNumber):identity/(AWSIAMName)"
}
]
}
The reason is you are potentially creating a policy that is a bit contradicting.
You are providing access and denying the access to everyone. So the policy when being applied in real time might not work as you expect to still give access to you.
Also use Deny policy when absolutely necessary and use it for denying access to specific users or resources as appropriate. Also when you give specific access like above, it will give access to ONLY those users.
Including Deny, you can use the below:-
{
"Version": "2021-12-16",
"Statement": [
{
"Sid": "AllowsSES",
"Effect": "Allow",
"Action": "ses:*",
"Resource": "*"
},
{
"Sid": "DenySelected",
"Effect": "Deny",
"Action": "*",
"Resource": "arn:aws:ses:(regiondetail):(AWSAccountNumber):identity/(AWSIAMName)"
}
]
}