RESOLVED.
The tutorial I mentioned lacks one important step.
If you have no OAuth service brought up and you assuming use the Login with Amazon, then go to
developer console --> Login with Amazon and enable the security profile you already created by walking the tutorial.
Also please note tha redirection URL should look like
https://www.amazon.com/ap/oa/?redirect_uri=https://pitangui.amazon.com/api/skill/link/xxxxxxxxxxxx
Many thanks to RocasV from labworks.io (https://forums.developer.amazon.com/users/256904/Rokas.html).
He helped me a lot resolving my problem and explained the important things.
Without you mate, I could spend much longer time fighting alone !
---------------------------------------------------------------------------
THE ORIGINAL REPORT.
Hey guys !
I'm trying to create a solution with Amazon Alexa and AWS IoT.
Lambda to AWS IoT part is ready, but I can't setup account linking in Amazon Alexa.
This is a real showstopper for now, so any help would be appreciated.
Things I did:
1. Set up and tested Lambda function that kicks AWS IoT.
2. Set up a smart home skill using that tutorial https://developer.amazon.com/blogs/post/Tx3CX1ETRZZ2NPC/Alexa-Account-Linking-5-Steps-to-Seamlessly-Link-Your-Alexa-Skill-with-Login-wit
Got filled all required forms with Client ID and secret, used LWA as OAuth2 provider, set up allowed return URLs in a security profile.
4. In https://alexa.amazon.com/spa/index.html --> Skills --> Your Skills, I see "account linking required" under blue "Enable" button. On click on that button, server returns the following:
Linking unsuccessful.
The authorization server returned with an error parameter. Please refer to https://tools.ietf.org/html/rfc6749#section-4.1.2.1 for more details.
What did I have missed ?
Thanks !