acme-nginx icon indicating copy to clipboard operation
acme-nginx copied to clipboard

ERROR - Unable to locate credentials

Open MrLeonix opened this issue 5 years ago • 4 comments

I'm trying to run: acme-nginx --no-reload-nginx --dns-provider route53 -d "*.<domain-name>.com"

And then, it does not succeed with following message:

INFO - creating TXT dns record _acme-challenge.<domain-name>.com IN TXT <value>
ERROR - error creating dns record
ERROR - Unable to locate credentials

I'm running it on Amazon Linux.

MrLeonix avatar Oct 14 '19 02:10 MrLeonix

I am also getting the same exception. I am running in Fargate cluster. I have attached the Task Execution and Task Role to the container and given route53 permissions. It's looking for default profile which is not present. Ideally it should pick it up from the task roles. Instead of boto3 session, just use boto3.client

tapvirvirk avatar Dec 09 '20 18:12 tapvirvirk

Thanks for reporting, i will have a look. Tested only locally with environment variables.

kshcherban avatar Dec 10 '20 09:12 kshcherban

I have resolved it. When I was running the command from crontab, aws credentials in the environment variable are not retained. I found a way to extract the credentials via api call and export them into environment variable. After that, command is working fine.

tapvirvirk avatar Dec 10 '20 14:12 tapvirvirk

I exported my AWS creds into my environment variable still facing the same issue.

AwpshuN avatar Oct 18 '21 07:10 AwpshuN