SEATTLE — Federal regulators have given Amazon a green light to begin testing drones, but it will most likely take years before the online retailer can start delivering packages from the air to peoples’ homes.

The Federal Aviation Administration on Thursday gave Amazon permission to conduct test flights of its drones outdoors, as long as the company obeys a host of rules like flying below 400 feet and only during daylight hours.

In a sign of how far Amazon has to go before its vision for its drone-delivery service is realized, the company’s drones for now will have to be operated by a pilot with a certificate to fly a private manned aircraft. Amazon has envisioned its drone-delivery service, which it calls Amazon Prime Air, to be autonomous, consisting of buzzing fleets of miniature helicopters soaring far beyond the view of Amazon warehouses.