Skip to main content

AWS Lightsail DNS

Lightsail has its own DNS API distinct from Route 53 — use this provider only if your zone lives in the Lightsail console, not if you registered your domain at Lightsail and delegated to Route 53.

Prerequisites​

  • A Lightsail DNS zone. You can see them under Networking → DNS zones in the Lightsail console. If your zone doesn't appear there, use the Route 53 provider instead.
  • An IAM user or access key with the policy below.

IAM policy​

{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Action": [
"lightsail:GetDomains",
"lightsail:GetDomain",
"lightsail:CreateDomainEntry",
"lightsail:DeleteDomainEntry"
],
"Resource": "*"
}]
}

Lightsail doesn't support resource-level policies for DNS, so the actions must be *-scoped. If that is broader than your org policy allows, promote the zone to Route 53.

Add the credential​

  1. Settings → DNS Credentials → New → AWS Lightsail.
  2. Access key ID / secret access key: paste.
  3. DNS zone: the apex, e.g. example.com. Required — Lightsail's API doesn't infer the zone from the FQDN.
  4. Region: defaults to us-east-1, which is correct for the global Lightsail DNS endpoint. Leave blank.
  5. Test connectivity → Save.

Config fields​

FieldRequiredPurpose
access_key_idyesIAM access key.
secret_access_keyyesIAM secret.
dns_zoneyesZone apex — Lightsail's API needs it explicitly.
regionnoDefault us-east-1.

Propagation​

Lightsail propagation is similar to Route 53 — under 30 seconds typically.

Caveats​

  • One zone per credential. Unlike Route 53, the Lightsail provider needs dns_zone up front. Register one DNS credential per zone.
  • No TTL control. Lightsail DNS entries carry no TTL, so the TTL of a CA connector validation record is whatever Lightsail applies.
  • Env-var mutation. The lego Lightsail provider reads AWS credentials from env vars. CertAutoPilot serializes provider creation with a mutex and restores the original environment afterwards — nothing to configure, just be aware.

Troubleshooting​

"DNS zone not found"​

The zone isn't in Lightsail. Either migrate it in (Lightsail has an import flow) or switch to Route 53.

"AccessDenied"​

The IAM policy is missing the lightsail:*DomainEntry actions. See the policy above.

See also​