Rotation of AWS IAM credentials
-
@prusaman the
config
is an object withaccessKeyId
andsecretAccessKey
.It might be easier to just create long(ish) keys which are scoped to just route53 only and that too only for the specific domain. See the IAM policy example here - https://docs.cloudron.io/domains/#route53-dns
-
-
@girish Im getting the following:
curl -k -X PUT -H 'Content-Type: application/json' -H 'Authorization: Bearer APIKEYHERE' --data '{"domain":"sub.domain.tld","zone": "sub.domain.tld","provider":"route53","config": {"accessKeyId":"AKIA","secretAccessKey":"XXXXX"},"tlsConfig":{ "provider":"letsencrypt-prod","wildcard":true }}' https://my.sub.domain.tld/api/v1/domains/sub.domain.tld
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Error</title> </head> <body> <pre>Cannot PUT /api/v1/domains/sub.domain.tld</pre> </body> </html>
But I get the following with:
curl -k -X GET -H 'Content-Type: application/json' -H 'Authorization: Bearer APIKEYHERE' https://my.sub.domain.tld/api/v1/domains
{ "domains": [ { "domain": "sub.domain.tld", "zoneName": "sub.domain.tld", "provider": "route53", "config": {} } ] }
Any ideas? Im sure Im just not constructing the call correctly.
-
-
@prusaman said in Rotation of AWS IAM credentials:
curl -k -X PUT -H 'Content-Type: application/json' -H 'Authorization: Bearer APIKEYHERE' --data '{"domain":"sub.domain.tld","zone": "sub.domain.tld","provider":"route53","config": {"accessKeyId":"AKIA","secretAccessKey":"XXXXX"},"tlsConfig":{ "provider":"letsencrypt-prod","wildcard":true }}' https://my.sub.domain.tld/api/v1/domains/sub.domain.tld
I got the path wrong. Send POST request to
https://my.sub.domain.tld/api/v1/domains/sub.domain.tld/config
. I double checked that it works. -
-