Last active
November 6, 2023 04:45
-
-
Save spasam/608457e6d0677061302a00ef08945383 to your computer and use it in GitHub Desktop.
Secure your AWS accounts by disallowing creation of access keys for the root user, which will allow unrestricted access to all resources in the account
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": [ | |
{ | |
"Sid": "GRRESTRICTROOTUSERACCESSKEYS", | |
"Effect": "Deny", | |
"Action": "iam:CreateAccessKey", | |
"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