Aws setup command failing


Hi, I’m new to mongoose and AWS.

I’m testing an ESP32 board to connect to AWS.
I can build, flash, connect to wifi, but the setup command fails.
With the command: “mos aws-iot-setup”
I get the response: Adxy_AWS is not authorized to perform iot:CreateCerificateFromCSR on resource: ***

I verified my access key, secret access key and region, and they are all entered correctly in aws cli.
I only have one user in AWS. I’ve tried creating different policies for this user to allow certificate creation such as AWSCerificateManagerFullAccess.
Any ideas what the problem might be?



Try giving admin acess to your user in the AWS. It may not be the best practice to do so, but check if it works for now.


Thank you,
I had to create an Administrator group, then add the user to the group and the error is gone.
This stuff is really not clear, and I feel that I’m stumbling around in the dark.
So this isn’t the best practice? What might be the correct way of doing this?

Thanks again.


I believe the correct way would be giving just the right permission to execute the desired task. This way you won’t be in danger of misuse services or, if you are working in a group project, to mess around with other person’s work.

I mean, even if someone get a hold of your credentials, he or she won’t be able to cause you any trouble. I’ve been working around with AWS for about 3 months now, and you’re right about “stumbling in a dark” a lot. Documentation is really “not-so-good” and leaves many ground for misinterpretation and/or unsolved problems. So don’t give up, mess around, get a few things right and you’ll handle yourself just fine :smile: