Why is my iPhone 6 Plus dying with 30% battery left?

My phone shuts down with 20 to 30 percent battery left.
Don't quote me, but search the forums. pretty sure it's known by Apple and they are replacing batteries on certain devices made between certain dates. Call Apple and then make a Genius Bar appointment for a battery replacement if you are given one.
Is it the s or the 6? If it is the 6s, I heard that Apple is replacing some batteries which might be faulty.

Original thread: https://forums.imore.com/threads/why-is-my-iphone-6-plus-dying-with-30-battery-left.381140/