Skip to main content

Triage and Remediation

Remediation

Using Console

Sure, here are the steps to remediate the misconfiguration of unlocked Route 53 domains in AWS:
  1. Open the AWS Management Console and go to the Route 53 service.
  2. In the left navigation pane, click on the Registered domains option.
  3. Select the domain that you want to lock.
  4. In the domain details page, click on the “Add/Edit Tags” button.
  5. In the “Add/Edit Tags” dialog box, click on the “Add tag” button.
  6. In the “Key” field, enter “LockDomain” and in the “Value” field, enter “True”.
  7. Click on the “Save changes” button to save the tag.
  8. After adding the tag, click on the “Lock domain” button to lock the domain.
  9. In the “Lock domain” dialog box, review the information and click on the “Lock domain” button to confirm.
  10. Once the domain is locked, you will see the “Domain lock enabled” message on the domain details page.
Congratulations! You have successfully remediated the misconfiguration of unlocked Route 53 domains in AWS.

To remediate the misconfiguration of unlocked Route 53 domains in AWS using AWS CLI, follow these steps:
  1. Open the AWS CLI on your local machine.
  2. Run the following command to get a list of your Route 53 domains:
  1. For each domain in the list, run the following command to check if it is locked:
If the output of this command shows that the domain is already locked, then no further action is needed for that domain.
  1. If the domain is not locked, run the following command to lock it:
This command will update the nameservers for the domain to be locked.
  1. Finally, run the following command to verify that the domain is now locked:
If the output of this command shows that the domain is now locked, then the remediation is complete.
To remediate the Route 53 Domains Should Be Locked misconfiguration in AWS using Python, follow these steps:
  1. Install the AWS SDK for Python (Boto3) using the following command:
  1. Create an AWS IAM user with the necessary permissions to manage Route 53 domains.
  2. Configure the AWS CLI with the IAM user credentials using the following command:
  1. Write a Python script to enable domain locking for all Route 53 domains using the following code:
  1. Save the script and run it using the following command:
This will enable domain locking for all Route 53 domains in your AWS account.
Changing transfer_lock from false to true does not force replacement of the domain; it is an in-place update.To verify, terraform plan should show the aws_route53domains_registered_domain resource with transfer_lock changing from false (or null) to true.