Allow specifying the credentials file in dns-route53
We originally got a PR for this at https://github.com/certbot/certbot/pull/5781. The good description of why this is valuable that was provided there was:
The current Route53 DNS plugin doesn't allow directly specifying credentials to use, which means:
No way to use different AWS credentials for different certificates.
The way Boto3 loads default credentials always depends on environment variables, whether it's
$HOME(loading~/.aws/file), or$AWS_*environment variables directly.The environment will probably be different on renewals, so people could pass
$AWS_*variables tocertonlyand successfully obtain the certificate, but later renewal from the cron job would fail unless they also modify/etc/cron.d/certbot.
sudodoesn't touch$HOMEby default, sosudo certbot ...would read/home/user/.aws, whilesudo -H certbot ...would read/home/root/.aws, etc.
I moved the work that was done there into the route53-credentials-file branch on this repo in case anyone wants to build on it in the future.
Source: certbot/certbot