Actions35
- Bucket Actions
- IAM Actions
- Object Actions
IAM → Detach User Policy
AI-generatedSummary
Detach an IAM policy from a specified user by providing the user's name and the policy's ARN.
Inputs
- User Name (required) — The name of the IAM user from whom you want to detach the policy.
- Policy ARN (required) — The Amazon Resource Name (ARN) of the IAM policy to detach from the user.
Output shape
a single record confirming the detach operation's success or containing an error message
The output indicates the result of attempting to detach the specified policy from the given user. No pagination applies.
Examples
Example 1: Detach the policy 'MyPolicy' from user 'JohnDoe'
Set 'User Name' to 'JohnDoe' and 'Policy ARN' to 'arn:aws:iam::123456789012:policy/MyPolicy'