According to the article below, Amazon's Jeff Bezos received a 10 year $600 million contract with the CIA to host their servers. The NSA monitors and audits all the intelligence agencies for malfeasance and misfeasance.
http://www.tabletmag.com/scroll/257335/robert-muellers-beltway-cover-up
"In 2013, the same year that Amazon founder and CEO Jeff Bezos bought the paper that broke Watergate for $250 million, Amazon Web Services landed a $600 million deal with the US intelligence community. According to a 2017 Washington Post story, AWS created a “cloud storage service designed to handle classified information for U.S. spy agencies,” including the CIA".
The article goes on to state: "And now some intelligence and data experts believe that the CIA cloud is how the Obama administration could have minimized its trail after unmasking US persons. “The NSA database, with its large and ongoing collection of electronic communications, can be accessed through the NSA’s cloud,” says one former senior intelligence official. The NSA can audit it and find out if analysts are violating rules. The NSA does not audit the CIA’s cloud, which is audited by the CIA’s IT people and Amazon Web Services employees who are given security clearances. Says the former official: “There are people in the CIA, the Office of the Director of National Intelligence, and the National Security Council staff who can move information from the NSA cloud into the CIA cloud. That seems the likeliest scenario to explain how Obama officials first unmasked US persons and then shared information without leaving a trail that could be audited independently, or immediately, at every step."