aws iam delete-role-policy
Deletes the specified inline policy that is embedded in the specified IAM role. AWS CLI reference
1 example 2 options Its page in the AWS CLI reference
Examples
To remove a policy from an IAM role
The following delete-role-policy example removes the policy named ExamplePolicy from the role named Test-Role.
aws iam delete-role-policy --role-name Test-Role --policy-name ExamplePolicyIdentify--role-nameThe name (friendly name, not ARN) identifying the role that the policy is embedded in.--policy-nameThe name of the inline policy to delete from the specified IAM role.This command produces no output.
For more information, see IAM role management in the AWS IAM User Guide.
Options
--policy-nameThe name of the inline policy to delete from the specified IAM role.--role-nameThe name (friendly name, not ARN) identifying the role that the policy is embedded in.