Skip to content

Instantly share code, notes, and snippets.

@spasam
Last active March 25, 2023 20:46
Show Gist options
  • Save spasam/4e0ba44dcaca583947e8eb08d9724dad to your computer and use it in GitHub Desktop.
Save spasam/4e0ba44dcaca583947e8eb08d9724dad to your computer and use it in GitHub Desktop.
Secure your AWS accounts by disallowing account access with root user credentials, which are credentials of the account owner and allow unrestricted access to all resources in the account
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "GRRESTRICTROOTUSER",
"Effect": "Deny",
"Action": "*",
"Resource": [
"*"
],
"Condition": {
"StringLike": {
"aws:PrincipalArn": [
"arn:aws:iam::*:root"
]
}
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment