How are battery an connections ? Do the headlamps work when this happens ? How familiar are you with the electronic on your vehicle ?
This could be an ignition switch problem , a BCM - body control module , The ignition switch is a Discrete Ignition Signal to the vehicle BCM body control module .
The Body Control Module (BCM) performs multiple body control functions. The BCM can control devices directly connected to its outputs based on input information. The BCM evaluates this information and controls certain body control systems by commanding outputs on or off. The BCM control inputs can be:
GM has had a problem with ignition switches , but the thing to do is hook up a scan tool an check for the correct power mode .
Serial Data Power Mode
On vehicles that have several control modules connected by serial data circuits, one module is the power mode master (PMM). On this vehicle the PMM is the Body Control Module (BCM). The BCM receives 2 signals/circuits from the ignition switch. These are the Ignition 1 and Ignition 3 signals/circuits.
To determine the correct power mode the BCM uses:
?€¢
The state of these signals/circuits, either switch closed (B+ = 1) or switch open (open = 0)
?€¢
The status of the engine run flag.
The chart indicates the modes detected and transmitted by the BCM:
Those modules that have discrete ignition signal inputs also remain in the state dictated by the last valid BCM message received on the serial data circuits. They then check the state of their discrete ignition input to determine the current valid state. If the discrete ignition input is active, B+, the modules will fail-safe to the "RUN" power mode. If the discrete ignition input is not active, open or 0 voltage, the modules will fail-safe to "OFF-AWAKE". In this state the modules are constantly checking for a change status message on the serial data circuits and can respond to both local inputs and serial data inputs from other modules on the vehicle.
You may want to take this to the repair shop an that doesn't necessarily mean the dealer !