From 80d3dc0e1b4285f0e449a673b4afdc1119f4f808 Mon Sep 17 00:00:00 2001 From: lyenliang Date: Thu, 12 May 2022 14:54:21 +0800 Subject: [PATCH] Fix issue #2722 I make `AWS_HOST` and `Region` configurable with environment variables. You can now use acme.sh with AWS China using the following command. `AWS_HOST=api.route53.cn Region=cn-northwest-1 ./acme.sh --issue ...` --- dnsapi/dns_aws.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dnsapi/dns_aws.sh b/dnsapi/dns_aws.sh index 14a4594d..66f2321d 100755 --- a/dnsapi/dns_aws.sh +++ b/dnsapi/dns_aws.sh @@ -9,7 +9,7 @@ #All `_sleep` commands are included to avoid Route53 throttling, see #https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DNSLimitations.html#limits-api-requests -AWS_HOST="route53.amazonaws.com" +AWS_HOST="${AWS_HOST:-route53.amazonaws.com}" AWS_URL="https://$AWS_HOST" AWS_WIKI="https://github.com/acmesh-official/acme.sh/wiki/How-to-use-Amazon-Route53-API" @@ -301,7 +301,7 @@ aws_rest() { RequestDateOnly="$(echo "$RequestDate" | cut -c 1-8)" _debug2 RequestDateOnly "$RequestDateOnly" - Region="us-east-1" + Region="${Region:-us-east-1}" Service="route53" CredentialScope="$RequestDateOnly/$Region/$Service/aws4_request"