{
"Statement":[{
"Effect":"effect",
"Principal":"principal",
"Action":"action",
"Resource":"arn",
"Condition":{
"condition":{"Key":"Value"}
}
}
]
}
{
"Version": "2012-10-17",
"Statement":[
{
"sid": "DenyUnapprovedAction",
"Effect": "Deny",
"Action": [
"ds:*",
"iam:CreateUser",
"Cloudtrail:stoplogging"
],
"Resource": [
"*"
]
}
]
}
{
"Effect": "Allow",
"Action": [
"secretsmanager:*",
"lambda:*",
"s3:PutObject",
"s3:GetObject",
"s3:DeleteObject"
],
"Resources": "*",
"Condition": {
"StringEquals": {
"aws:RequestedRegion": [
"us-west-1",
"us-west-2"
]
}
}
}
Enable your developers to create IAM roles to pass to EC2 and Lambda, but ensure they cannot exceed their own permission
(Allow create role but only with a specifiv permission boundary allow attach managed policies but only to roles with a specific boundary)
{
"Effect": "Allow",
"Action": [
"iam:DetachRolePolicy",
"iam:CreateRole",
"iam:AttachRolePolicy"
],
"Resource": "arn:aws:iam::123456789:role/unicorns-*",
"Condition":{
"StringEquals": {
"iam:PermissionsBoundary":
"arn:aws:iam::123456789:policy/region-restriction"
}
}
}