Last active
May 27, 2019 20:38
-
-
Save MrHassanMurtaza/5c2fd42ac2ab17462bf9f84556763d14 to your computer and use it in GitHub Desktop.
Lambda IAM Policy for Access Advisor and SES
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_iam_client(): | |
""" | |
Get identity and access management client | |
""" | |
return boto3.client('iam') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_ses_client(): | |
""" | |
Get simple email service client | |
""" | |
return boto3.client('ses') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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