Ssl Certbot在通过dns为route53颁发证书时无法找到AWS凭据

Ssl Certbot在通过dns为route53颁发证书时无法找到AWS凭据,ssl,dns,amazon-route53,lets-encrypt,certbot,Ssl,Dns,Amazon Route53,Lets Encrypt,Certbot,我需要从LetsEncrypt获得AWS Route 53上托管的域的证书。我没有暴露任何端口80或443,因为服务器用于VPN,并且没有公共访问 因此,唯一的方法是通过路由53的DNS验证 到目前为止,我已经安装了certbot和dns-route53插件 sudo snap install --beta --classic certbot sudo snap set certbot trust-plugin-with-root=ok sudo snap install --beta cert

我需要从LetsEncrypt获得AWS Route 53上托管的域的证书。我没有暴露任何端口80或443,因为服务器用于VPN,并且没有公共访问

因此,唯一的方法是通过路由53的DNS验证

到目前为止,我已经安装了certbot和dns-route53插件

sudo snap install --beta --classic certbot
sudo snap set certbot trust-plugin-with-root=ok
sudo snap install --beta certbot-dns-route53
sudo snap connect certbot:plugin certbot-dns-route53
我在我的AWS帐户中创建了一个可以访问Route53的特殊用户,我在~/.AWS/config和~/.AWS/credentials中添加了访问密钥id和秘密访问密钥,如下所示

[default]
aws_access_key_id=foo
aws_secret_access_key=bar
基本上遵循此处给出的每个步骤:

现在,当我运行以下命令时:

sudo certbot certonly -d mydomain.com --dns-route53
它给出以下输出:

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator dns-route53, Installer None
Requesting a certificate for mydomain.com
Performing the following challenges:
dns-01 challenge for mydomain.com
Cleaning up challenges
Unable to locate credentials
To use certbot-dns-route53, configure credentials as described at https://boto3.readthedocs.io/en/latest/guide/configuration.html#best-practices-for-configuring-credentials and add the necessary permissions for Route53 access.
我查看了错误消息中给出的文档:

但我不认为我做错了什么

我甚至通过执行
sudo su
进入了根级别,并将AWS密钥导出为env vars,甚至还将AWS密钥导出到home中,但它仍然会抛出相同的错误


我对自己做错的事情感到沮丧,任何帮助都将不胜感激。

遇到同样的问题,你能解决吗?