However "We don't know how long it will take," he added, speaking at a coalition airbase in an undisclosed location as part of his Middle East trip.
His brief visit comes a week after Western powers and Iran reached a deal on the Iranian nuclear programme.
Carter said that while "friends can disagree," the US will continue to work with Israel to counter threats posed from Iran and Islamic State group militants.