Notes based on Stéphane Maarek's Udemy course.
Effect, Action, Resource, Conditions and Policy VariablesDENY has precedence over ALLOWAdministratorAccessPowerUserAccess: does not allow anything regarding to IAM, organizations and account (with some exceptions), otherwise similar to admin accessIAM policy condition:
"Condition": {
"{condition-operator}": {
"{condition-key}": "{condition-value}"
}
}
StringEquals, StringNotEquals, StringLike, etc.NumericEquals, NumericNotEquals, NumericLessThan, etc.DateEquals, DateNotEquals, DateLessThan, etc."Condition": {"IpAddress": {"aws:SourceIp": "192.168.0.1/16"}}"Condition": {"Null": {"aws:TokenIssueTime": "192.168.0.1/16"}}${aws:username}: example "Resource:["arn:aws:s3:::mybucket/${aws:username}/*"]aws:CurrentTimeaws:TokenIssueTimeaws:PrincipalType: indicates if the principal is an account, user, federated or assumed roleaws:SecureTransportaws:SourceIpaws:UserIdec2:SourceInstanceARNs3:prefixs3:max-keyssns:EndPointsns:Protocoliam:ResourceTag/key-nameiam:PrincipalTag/key-name--dry-run option to simulate API calls. This can be used to test permissions.Request would have succeeded, but DryRun flag is setAn error occurred (UnauthorizedOperation) when calling the {policy_name} operation