For a sheetrock lid type attic access locating a pull chain type luminaire just above the attic access lid is code compliant as long as the luminaire is also adjacent to the equipment requiring servicing.
Attic access nec.
The national electrical code defines a wet location as an area that is subject to saturation with water or other liquids and unprotected locations exposed to the weather.
Nec 334 23 in accessible attics.
The access opening should be located in a hallway or other readily accessible location and minimum 22 x 30.
See the actual nec text at nfpa org for the complete code section.
If the attic space is smaller than these specs then an access hatch is not required.
The national electric code has another definition for damp locations that is more subjective but if you think the receptacle is going to get wet use an in use.
I m sure this is in the nec too somewhere.
Type ac cables in accessible attics or.
An attic that is accessible which is defined by the nec as having a permanently installed stair or ladder in place must have protection for any cables that run across the top of the attic floor joists or within 7 feet where they run across the face of rafters or studs.
Another point to remember is that section 333 12 requires this protection in the entire attic space only if it is accessible by permanent stairs or ladders.
Where the attic space is accessible through a scuttle hole the protection is required only within 6 feet of the scuttle hole.
Once there click on their link to free access to the 2017 nec edition of nfpa 70.
The installation of cable in accessible attics or roof spaces shall also comply with 320 23 nec 320 23 in accessible attics.
Here s the full text of the code.
Below is a preview of article 210.