This riff came from a Rory Gallagher recording, but I’ve heard it (or variations of it) in many songs over the years (CCR comes to mind, even though I can’t think of which song.)
It’s in E, and like many blues things in E, it’s based around the open position E minor box 1/box 2 scales.
Then, when it goes to the IV chord, the A, it just moves the whole thing up – which is an easy move to make.
Also cool is the turnaround, which goes up by 1/2 step to the C instead of down to the A7 so it’s kind of a nice variation to have in your hip pocket (think of songs like “Little Sister” which make the same move.)
Hope you dig it and feel free to share with any guitar playing friends.