SECOND AMENDMENT TO 364-DAY CREDIT AGREEMENT Dated as of August 11, 2016 among PLAINS ALL AMERICAN PIPELINE, L.P., as Borrower, BANK OF AMERICA, N.A., as Administrative Agent, and CITIBANK, N.A., JPMORGAN CHASE BANK, N.A.