Skip to content

Instantly share code, notes, and snippets.

@neoshrew
Last active August 28, 2019 10:59
Show Gist options
  • Save neoshrew/64e8b3757bb6078a1f1da5962b0ebd7c to your computer and use it in GitHub Desktop.
Save neoshrew/64e8b3757bb6078a1f1da5962b0ebd7c to your computer and use it in GitHub Desktop.
"Version": "2012-10-17",
"Statement": [
{
"Sid": "",
"Effect": "Deny",
"NotPrincipal": {
"AWS": [
"arn:aws:iam::99999999999:role/AppRole",
"arn:aws:iam::99999999999:role/AdminRole"
]
},
"Action": "s3:*",
"Resource": [
"arn:aws:s3:::my-awesome-bucket/*",
"arn:aws:s3:::my-awesome-bucket"
]
},
{
"Sid": "",
"Effect": "Allow",
"Principal": {
"AWS": [
"arn:aws:iam::99999999999:role/AppRole",
"arn:aws:iam::99999999999:role/AdminRole"
]
},
"Action": "s3:*",
"Resource": [
"arn:aws:s3:::my-awesome-bucket/*",
"arn:aws:s3:::my-awesome-bucket"
]
}
]
}
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "",
"Effect": "Deny",
"NotPrincipal": {
"AWS": [
"99999999999"
"arn:aws:iam::99999999999:role/AppRole",
"arn:aws:iam::99999999999:role/AdminRole",
"arn:aws:iam::99999999999:assumed-role/AdminRole/andy.gelnar"
]
},
"Action": "s3:*",
"Resource": [
"arn:aws:s3:::my-awesome-bucket/*",
"arn:aws:s3:::my-awesome-bucket"
]
},
{
"Sid": "",
"Effect": "Allow",
"Principal": {
"AWS": [
"99999999999"
"arn:aws:iam::99999999999:role/AppRole",
"arn:aws:iam::99999999999:role/AdminRole",
"arn:aws:iam::99999999999:assumed-role/AdminRole/andy.gelnar"
]
},
"Action": "s3:*",
"Resource": [
"arn:aws:s3:::my-awesome-bucket/*",
"arn:aws:s3:::my-awesome-bucket"
]
}
]
}
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "",
"Effect": "Deny",
"Principal": {
"AWS": "*"
},
"Action": "s3:*",
"Resource": [
"arn:aws:s3:::my-awesome-bucket/*",
"arn:aws:s3:::my-awesome-bucket"
],
"Condition": {
"StringNotLike": {
"aws:userId": [
"99999999999"
"ARO[APPROLEID]FWERFVR",
"ARO[ADMINROLEID]QEFEW:*"
]
}
}
},
{
"Sid": "",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": "s3:*",
"Resource": [
"arn:aws:s3:::my-awesome-bucket/*",
"arn:aws:s3:::my-awesome-bucket"
],
"Condition": {
"StringLike": {
"aws:userId": [
"99999999999"
"ARO[APPROLEID]FWERFVR",
"ARO[ADMINROLEID]QEFEW:*"
]
}
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment