You will need to install a user script manager extension to install this script.
This Amazon Autologin script does what it says and works wonders in combination with Tampermonkey and Greasemonkey (and I totally did not add those two names here for search engine optimization).
You enter your credentials for your Amazon accounts in the first array. Then, when Amazon prompts you for your password (eg. when you wanted to simply look at your order history), the script will automatically log you in when you enter your email address.
Additionally, if you have 2FA authentication setup on your account, you can simply add your token to the credentials array at the top of the script and it will also fill that in for you as well. And it also skips the annoying "Please add a phone number for SMS verification purposes".
Basically it gets rid of all Amazon login annoyances.
It also detects errors or captcha requests and aborts automated logins to prevent spamming of the website which could result in a lock of your account or IP address.
It is currently enabled to run on Amazon.com and .de. It should probably work on all Amazon TLDs, so feel free to add yours manually if needed.