The module lack idempotency as it's important for ansible , it simply need not to consider existing users/buckets as error .
To do that simply do not raise module.fail_json and instead put change false to the result dict in the main function:
# conditional state caused a failure
if result['added_users'] == '' and result['added_buckets'] == '':
#module.fail_json(msg='No users or buckets were added successfully' , **result)
result['changed'] = False
# EXIT
module.exit_json(**result)
if __name__ == '__main__':
main()