How To Convert AWS Route53 to Cloudflare Let’s Encrypt DNS challenge with acme.sh

acme.sh is a command-line utility that can be used to issue and manage Let’s Encrypt SSL certificates. You can use acme.sh to convert an AWS Route53-managed domain to a Cloudflare-managed domain and complete the Let’s Encrypt DNS challenge. Here’s an example of how to do this:

  1. Install acme.sh: To get started, you will need to install acme.sh on your system. You can do this by running the following command:
curl https://get.acme.sh | sh
  1. Export your AWS credentials: Before you can use acme.sh to update your Route53 DNS records, you will need to export your AWS credentials. You can do this by running the command:
export AWS_ACCESS_KEY_ID="your_access_key"
export AWS_SECRET_ACCESS_KEY="your_secret_key"
  1. Issue the certificate: Once you have acme.sh installed and your AWS credentials exported, you can issue the certificate by running the following command:
acme.sh --issue -d example.com --dns dns_aws
  1. Convert the domain to Cloudflare: After the certificate is issued, you can convert the domain to Cloudflare by creating a new zone in Cloudflare and updating the nameservers in your registrar to point to the Cloudflare nameservers.
  2. Update the DNS records in Cloudflare: Once the domain is managed by Cloudflare, you can update the DNS records by going to the DNS tab in Cloudflare and adding the TXT records provided by acme.sh
  3. Renew the certificate: After updating the DNS records, you can renew the certificate with acme.sh using the same command that you used to issue the certificate

Please note that these instructions are for a basic setup and you should adapt them according to your specific requirements. Also, before making any changes, it’s recommended to have a backup plan in case something goes wrong, and also to test the changes before applying them to your production environment.

Leave a Comment