Skip to content

Instantly share code, notes, and snippets.

@MrHassanMurtaza
Last active May 27, 2019 20:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MrHassanMurtaza/5c2fd42ac2ab17462bf9f84556763d14 to your computer and use it in GitHub Desktop.
Save MrHassanMurtaza/5c2fd42ac2ab17462bf9f84556763d14 to your computer and use it in GitHub Desktop.
Lambda IAM Policy for Access Advisor and SES
def get_iam_client():
"""
Get identity and access management client
"""
return boto3.client('iam')
def get_ses_client():
"""
Get simple email service client
"""
return boto3.client('ses')
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ses:SendEmail",
"logs:CreateLogStream",
"ses:SendRawEmail",
"iam:GenerateServiceLastAccessedDetails",
"iam:ListRoles",
"iam:GetServiceLastAccessedDetails",
"logs:CreateLogGroup",
"logs:PutLogEvents"
],
"Resource": "*"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment