-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: migrate to aws-sdk-go-v2 (lightsail, route53) #1973
Conversation
4588773
to
4fa82e4
Compare
4fa82e4
to
9092f3a
Compare
I don't think Github issues notifications when editing a comment, only when creating it. Let me try that again: Pinging some people who have contributed in the past to these providers:
Has anyone of you a bit free of time on their hands and still have access to Route53 or Lightsail and could check if all still work? |
Not sure if it helps but a build with the new AWS SDK V2 worked for me ➜ lego git:(feat/migrate-aws-sdk-v2) ./dist/lego --domains <redacted> --dns route53 -m <redacted> run
2023/07/26 20:39:49 [INFO] [<redacted>] acme: Obtaining bundled SAN certificate
2023/07/26 20:39:50 [INFO] [<redacted>] AuthURL: https://acme-v02.api.letsencrypt.org/acme/authz-v3/<redacted>
2023/07/26 20:39:50 [INFO] [<redacted>] acme: Could not find solver for: tls-alpn-01
2023/07/26 20:39:50 [INFO] [<redacted>] acme: Could not find solver for: http-01
2023/07/26 20:39:50 [INFO] [<redacted>] acme: use dns-01 solver
2023/07/26 20:39:50 [INFO] [<redacted>] acme: Preparing to solve DNS-01
2023/07/26 20:39:51 [INFO] Wait for route53 [timeout: 2m0s, interval: 4s]
2023/07/26 20:40:26 [INFO] [<redacted>] acme: Trying to solve DNS-01
2023/07/26 20:40:26 [INFO] [<redacted>] acme: Checking DNS record propagation using [127.0.0.53:53]
2023/07/26 20:40:30 [INFO] Wait for propagation [timeout: 2m0s, interval: 4s]
2023/07/26 20:40:30 [INFO] [<redacted>] acme: Waiting for DNS record propagation.
2023/07/26 20:40:34 [INFO] [<redacted>] acme: Waiting for DNS record propagation.
2023/07/26 20:40:38 [INFO] [<redacted>] acme: Waiting for DNS record propagation.
2023/07/26 20:40:48 [INFO] [<redacted>] The server validated our request
2023/07/26 20:40:48 [INFO] [<redacted>] acme: Cleaning DNS-01 challenge
2023/07/26 20:40:49 [INFO] Wait for route53 [timeout: 2m0s, interval: 4s]
2023/07/26 20:41:15 [INFO] [<redacted>] acme: Validations succeeded; requesting certificates
2023/07/26 20:41:16 [INFO] [<redacted>] Server responded with a certificate. though i couldn't get the integration tests to pass, but that's probably more a config error |
Thank you very much, @kingcdavid! As for the integration test, I believe you need to call something like: AWS_ACCESS_KEY_ID="..." \
AWS_SECRET_ACCESS_KEY="..." \
AWS_REGION="..." \
R53_DOMAIN="..." \
go test -v -run TestLiveTTL github.com/go-acme/lego/v4/providers/dns/route53 where the You can omit the |
I tried that, but it still skipped the test, possibly need to add envDomain into the NewEnvTest? diff --git a/providers/dns/route53/route53_test.go b/providers/dns/route53/route53_test.go
index 1c8e5f5f..c6028692 100644
--- a/providers/dns/route53/route53_test.go
+++ b/providers/dns/route53/route53_test.go
@@ -25,7 +25,8 @@ var envTest = tester.NewEnvTest(
EnvMaxRetries,
EnvTTL,
EnvPropagationTimeout,
- EnvPollingInterval).
+ EnvPollingInterval,
+ envDomain).
WithDomain(envDomain).
WithLiveTestRequirements(EnvAccessKeyID, EnvSecretAccessKey, EnvRegion, envDomain) Then the tests pass ➜ lego git:(feat/migrate-aws-sdk-v2) ✗ go test -v -run TestLiveTTL github.com/go-acme/lego/v4/providers/dns/route53
=== RUN TestLiveTTL
2023/07/26 21:26:14 [INFO] Wait for route53 [timeout: 2m0s, interval: 4s]
2023/07/26 21:26:47 [INFO] Wait for route53 [timeout: 2m0s, interval: 4s]
--- PASS: TestLiveTTL (56.58s)
PASS
ok github.com/go-acme/lego/v4/providers/dns/route53 56.588s
also the route53.toml may need updating referencing the new SDK? |
I updated the links.
only Edit: I found and fix the problem. |
68324b3
to
303d7bf
Compare
Thank you a lot @kingcdavid ❤️ @dmke I think we can merge now: route53 was the more impacted by the migration and for lightsail it's mainly just modification of package names. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, let's merge this :-)
The
aws-sdk-for-go
v2 is available since 2021/01/19As the SDK has been split into a constellation of modules, this will potentially reduce the size of the dependencies.
(Edit: after a comparison this increase the size of the binary...)
It's a pure technical migration, I haven't tested the providers in a real context.
Fixes #1743