More Info:
All the domain names registered with AWS Route 53 or transferred to AWS Route 53 should be renewed 30 days before their validity period ends.Risk Level
MediumAddress
Reliability, SecurityCompliance Standards
- APRA CPS 234 (Australia)
- BSI C5 (Germany)
- Brazil LGPD
- CCPA / CPRA (California)
- CIS Critical Security Controls v8
- CMMC 2.0
- CSA Cloud Controls Matrix v4
- Cloudanix Best Practice
- DPDPA
- Digital Operational Resilience Act (EU)
- ISO/IEC 27017
- ISO/IEC 27018
- ISO/IEC 27701
- KSA PDPL
- MAS Technology Risk Management (Singapore)
- MITRE ATT&CK (Cloud)
- NIS2 Directive
- NIST SP 800-171
- NYDFS 23 NYCRR 500
- SWIFT Customer Security Controls Framework
- Sarbanes-Oxley IT General Controls
- UK NCSC Cyber Assessment Framework
Triage and Remediation
- Remediation
Remediation
Using Console
Using Console
To remediate the Route 53 Domain Expiry in 30 days issue in AWS using the AWS console, follow these steps:
- Log in to your AWS Management Console.
- Navigate to the Route 53 dashboard.
- In the left-hand navigation panel, click on the “Registered domains” option.
- Locate the domain that is expiring in 30 days and click on it.
- Click on the “Renew registration” button.
- Follow the prompts to renew the domain registration.
- Once the domain registration is renewed, verify that the domain expiry date has been updated to a future date.
Using CLI
Using CLI
To remediate the Route 53 Domain Expiry in 30 Days misconfiguration for AWS using AWS CLI, follow these steps:Replace Replace Check the value of the “Expiration” field in the output of the previous command to ensure that it has been extended.By following these steps, you can remediate the Route 53 Domain Expiry in 30 Days misconfiguration for AWS using AWS CLI.
- Install AWS CLI on your local machine if you haven’t already done so.
- Open a terminal or command prompt and run the following command to list all hosted zones in your AWS account:
- Identify the hosted zone that is expiring in 30 days or less. Note the value of the “Id” field for this hosted zone.
- Run the following command to get the details of the hosted zone:
<hosted-zone-id> with the actual ID of the hosted zone you identified in step 3.- Check the value of the “Expiration” field in the output of the previous command. If the value is less than 30 days from the current date, the hosted zone is expiring soon and needs to be renewed.
- To renew the hosted zone, run the following command:
<hosted-zone-id> with the actual ID of the hosted zone you identified in step 3.- Verify that the hosted zone has been renewed by running the following command:
Using Python
Using Python
To remediate the Route 53 Domain Expiry in 30 days issue using Python, you can use the AWS SDK for Python (Boto3) to automate the process. Here are the steps:This code will get a list of all Route 53 domains and check if they will expire in the next 30 days. If a domain is going to expire, it will be renewed for another year. You can schedule this Python script to run periodically to ensure that your domains are always up-to-date.
- Install Boto3: Install the Boto3 library using pip by running the following command in your terminal:
- Create an AWS IAM user: Create an IAM user with the necessary permissions to access Route 53 domains. The user should have the following permissions:
- route53domains:ListDomains
- route53domains:GetDomainDetail
- Configure AWS credentials: Configure your AWS credentials by setting the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables or by using the AWS CLI.
- Write Python code: Use the following Python code to remediate the Route 53 Domain Expiry in 30 days issue:
Using Terraform
Using Terraform
aws route53domains enable-domain-auto-renew by setting auto_renew = true on the Route 53 domain registration so AWS will attempt to renew the domain automatically 30–60 days before expiration (and bill the account accordingly).Terraform cannot perform the one-time, immediate renewal (renew-domain) because that is an on-demand runtime action, not a declarative configuration; use the AWS CLI or Console for that step when the domain is close to expiring.No replacement of the domain registration is forced by changing auto_renew; it is an in-place update, but enabling it will incur renewal charges when AWS performs the automatic renewal.For verification, terraform plan should show the aws_route53domains_registered_domain.DOMAIN_REGISTRATION resource with auto_renew changing from false (or unset) to true, or being created with auto_renew = true if it’s new.
