How do I restrict access for some users to operate only on SES and not other services on my AWS account?
Exemple:
{
"Version": "2021-12-16",
"Statement": [
{
"Sid": "AllowsSES",
"Effect": "Allow",
"Action": "ses:*",
"Resource": "*"
},
{
"Sid": "DenyAllOthers",
"Effect": "Deny",
"Action": "*",
"Resource": "*"
}
]
}
IAM Users in AWS have no access by default. They only have access when permission is specifically granted to the via
Allowpolicies.This can happen via IAM policies, but some services can also grant permission directly, such as Amazon S3 bucket policies and Amazon SQS access policies.
In general, it is best to avoid using
Denypolicies, since they overrideAllowpolicies. It is better to simply limit what is granted viaAllowpolicies. Sometimes, however, aDenyis required. For example, an Administrator might be granted permission over all S3 buckets, but specifically Denied access to a bucket that contains sensitive data.For your situation, it should be sufficient simply to use your first (
Allow) policy to grant them access to Amazon SES. By default, they will not have access to any other service.