Deny user access with Service Control Policies
To immediately deny access to make authorized API calls when an IAM Identity Center user's access is disabled or the user is deleted, you can:
-
Add or update the inline policy of the permission set(s) assigned to the user by adding an explicit
Denyeffect for all actions on all resources. -
Specify the
aws:useridoridentitystore:useridcondition key.
Alternatively, you can use a Service Control Policy to deny the user's access across all member accounts in your organization.
Example SCP to deny access
This denial policy blocks all AWS actions for a specific user, regardless of other permissions they might have been granted elsewhere.
This policy overrides any Allow policies.