I have a small script that generates new Let's Encrypt certificates whenever they are due for renewal and then imports the new certificates to our AWS account so that we can use them to sign cloudfront requests to our custom subdomain.
I haven't had this issue on any of our other servers, but when I install certbot with the instructions here https://certbot.eff.org/all-instructions/#debian-9-stretch-apache, I can successfully generate the certs.
Then, when I install awscli with pip install awscli --upgrade --user
, I can also run my aws command to import my certs.
But then when I go back and run the certbot renewal, I get this error
An unexpected error occurred: ContextualVersionConflict: (botocore 1.7.47 (/root/.local/lib/python2.7/site-packages), Requirement.parse('botocore<1.6.0,>=1.5.0'), set(['boto3']))
If I force install botocore to version 1.5.95 (the highest support version by certbot apparently), then certbot works fine, but I get this error from awscli
Traceback (most recent call last): File "/root/.local/bin/aws", line 19, in import awscli.clidriver File "/root/.local/lib/python2.7/site-packages/awscli/clidriver.py", line 24, in from botocore.history import get_global_history_recorder ImportError: No module named history
What's wrong here? Why does this work on another server with botocore on version 1.7.47, but not this one?