def assign_policies(self, users):
iam_client = next(iam_resource_objects())<EOL>try:<EOL><INDENT>for user in users:<EOL><INDENT>for arn in self.policy_arns:<EOL><INDENT>r = iam_client.attach_user_policy(UserName=user, PolicyArn=arn)<EOL><DEDENT><DEDENT><DEDENT>except ClientError as e:<EOL><INDENT>logger.exception('<STR_LIT>')<EOL>return False<EOL><DEDENT>return True<EOL>
Assign IAM policies to new test users