KPMG LLP 1601 Market Street Philadelphia, PA 19103-2499 KPMG LLP, a Delaware limited liability partnership and a member firm of the KPMG global organization of independent member firms affiliated with KPMG International Limited, a private English company limited by guarantee. Consent of Independent Auditors We consent to the incorporation by reference in the registration statements (No. 333-198158) on Form S-3 of Hannon Armstrong Sustainable Infrastructure Capital, Inc., (No. 333-230548) on Form S-8 of Hannon Armstrong Sustainable Infrastructure Capital, Inc. Equity Incentive Plan, (No. 333-212913) on Form S-8 of Hannon Armstrong Sustainable Infrastructure Capital, Inc. Equity Incentive Plan, (No. 333-265595) on Form S- 8 of Hannon Armstrong Sustainable Infrastructure Capital, Inc. Equity Incentive Plan, (No. 333-269145) on Form S-8 of Hannon Armstrong Sustainable Infrastructure Capital, Inc. Equity Incentive Plan, (No. 333-265594) on Form S-3ASR of Hannon Armstrong Sustainable Infrastructure Capital, Inc., and (No. 333-263169) on Form S-3ASR of Hannon Armstrong Sustainable Infrastructure Capital, Inc. of our report dated April 29, 2021, with respect to the consolidated financial statements of Rosie TargetCo, LLC and subsidiaries, which report appears in the December 31, 2022 annual report on Form 10-K/A of Hannon Armstrong Sustainable Infrastructure Capital, Inc. dated March 31, 2023. Philadelphia, Pennsylvania March 30, 2023