8. Commitments and Contingencies Commitments We have non-cancelable contractual agreements related to the hosting of our data processing, storage, and other computing services. In January 2017, we entered into the Google Cloud Platform License Agreement. Under the agreement, we were granted a license to access and use certain cloud services. The agreement has an initial term of five years and we are required to purchase at least $400.0 million of cloud services in each year of the agreement. For each of the first four years, up to 15% of this amount may be moved to a subsequent year. If we fail to meet the minimum purchase commitment during any year, we are required to pay the difference. In March 2016, we entered into the AWS Enterprise Agreement for the use of cloud services from Amazon Web Services, Inc. (AWS). Under the agreement, we are committed to spend $1.1 billion between January 2017 and December 2022 on AWS services ($90.0 million in 2018, $150.0 million in 2019, $215.0 million in 2020, $280.0 million in 2021, and $349.0 million in 2022). If we fail to meet the minimum purchase commitment during any year, we are required to pay the difference. Any such payment may be applied to future use of AWS services during the term, although it will not count towards meeting the future minimum purchase commitments. The future minimum contractual commitment including commitments less than one year, as of June 30, 2020, for each of the next five years are as follows: Minimum Commitment (in thousands) Remainder of 2020 $ 328,016 2021 699,684 2022 391,587 2023 85 2024 695 Thereafter 216 Total minimum commitments $ 1,420,283 Contingencies We record a loss contingency when it is probable that a liability has been incurred and the amount of the loss can be reasonably estimated. We also disclose material contingencies when we believe a loss is not probable but reasonably possible. Accounting for contingencies requires us to use judgment related to both the likelihood of a loss and the estimate of the amount or range of loss. Many legal and tax contingencies can take years to be resolved. Pending Matters Beginning in May 2017, we, certain of our officers and directors, and the underwriters for our IPO were named as defendants in securities class actions purportedly brought on behalf of purchasers of our Class A common stock, alleging violation of securities laws that arose following our IPO. On January 17, 2020, we reached a preliminary agreement to settle the securities class actions. The preliminary settlement agreement was signed in January 2020 and provided for a resolution of all of the pending claims in the securities class actions for $187.5 million. In the fourth quarter of 2019, we recorded legal expense, net of amounts directly covered by insurance, of $100.0 million for the expected settlement of the stockholder actions since we concluded the loss was probable and estimable. The amount was recorded in general and administrative expense in our consolidated statements of operations. On April 3, 2018, BlackBerry Limited filed a lawsuit against us alleging that we infringe six of its patents. This lawsuit was recently dismissed after four of the patents were ruled to be invalid; however, Blackberry Limited has since appealed the ruling to the U.S. Court of Appeals for the Federal Circuit. Management believes we have meritorious defenses to these claims. In 2017, Vaporstream, Inc. filed a lawsuit against us alleging that we infringe a number of its patents. In March 2020, we reached a preliminary agreement to settle the matter and in the first quarter of 2020 we recorded legal expense of $10.0 million related to the expected settlement since we concluded the loss was probable and estimable. The amount was recorded in general and administrative expense in our consolidated statements of operations. In April 2020, the case was dismissed pursuant to a settlement agreement. The outcomes of our legal proceedings are inherently unpredictable, subject to significant uncertainties, and could be material to our financial condition, results of operations, and cash flows for a particular period. For the pending matters described above, it is not possible to estimate the reasonably possible loss or range of loss. We are subject to various other legal proceedings and claims in the ordinary course of business, including certain patent, trademark, privacy, regulatory, and employment matters. Although occasional adverse decisions or settlements may occur, we do not believe that the final disposition of any of our other pending matters will seriously harm our business, financial condition, results of operations, and cash flows. Indemnifications In the ordinary course of business, we may provide indemnifications of varying scope and terms to customers, vendors, lessors, investors, directors, officers, employees, and other parties with respect to certain matters. Indemnification may include losses from our breach of such agreements, services we provide, or third party intellectual property infringement claims. These indemnifications may survive termination of the underlying agreement and the maximum potential amount of future indemnification payments may not be subject to a cap. We have not incurred material costs to defend lawsuits or settle claims related to these indemnifications as of June 30, 2020. We believe the fair value of these liabilities is immaterial and accordingly have no liabilities recorded for these agreements at June 30, 2020.