Lego: Add custom AWS session config support to Route53 provider

Created on 5 Nov 2020  路  2Comments  路  Source: go-acme/lego

Hi Folks,

The Route53 provider can be customized via Config and NewDNSProviderConfig at the moment.

When using AWS SDK for Golang, the session can be further customized to change other settings like the endpoint URL.

This comes in very handy as having the ability to change the endpoint URL allows us to have a local route53 via localstack and use that for integration testing or local development.

I'd like to submit a pull request that allows specifying a custom AWS session config to the Route53 provider via NewDNSProviderConfig that the provider would use to create an AWS session.

Let me know if this is something you're keen on, suggestions on other approaches are also welcome.

Cheers,
Rafa.

arednsprovider question

All 2 comments

Hello,

the NewDNSProviderConfig take a Config and in this struct you have a field Client *route53.Route53.

If you provide a Client you are able to create a custom session.

https://github.com/go-acme/lego/blob/ff0377ac02dd60a600a77ae93097cb6404e2853c/providers/dns/route53/route53.go#L105-L107

I can confirm your suggestion works, @ldez. I completely missed the Config struct had a Client field.

Closing this one as it's not really an issue, thank you so much for your reply 馃檱馃徏

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mhf-ir picture mhf-ir  路  3Comments

AubreyHewes picture AubreyHewes  路  3Comments

kuuji picture kuuji  路  4Comments

Kuchenm0nster picture Kuchenm0nster  路  4Comments

rawtaz picture rawtaz  路  3Comments