As of 2019, the "ideal" size for a Kindle file is set by Amazon to be 2560 pixels on the longest side and 1600 pixels on the shortest side. Remember, you pay delivery fees on the size of your cover. That means that while you can find Amazon help pages that say that the cover should be larger than that, you don't want to make it so large that you're paying more in delivery fees, for no good reason.
We tell our clients that the "perfect" size for embedding is 1000 pixels wide by whatever the proportionate height is. For example, if your print book is 6" x 9", your cover has a 1:1.5 aspect ratio (the height is 1.5x the width, right?). That means your perfect cover would be 1000 pixels wide by 1500 pixels tall.
Don't forget, you'll need to upload your cover, in JPG format, when you upload your eBook, at the KDP (and all other retailers, too!). Your print cover has to be uploaded in PDF format, as a "wraparound" cover, not in JPG or any other format. You can read up on print covers, in this article on our website: Cover Cover Cover Cover Cover Chameleon.