Skip to main content
All CollectionsKnowledge BaseAWS WorkloadsTroubleshooting - AWS Workloads
EC2 Consistent AMI Backup Failure Due to Name Resolution Error
EC2 Consistent AMI Backup Failure Due to Name Resolution Error

EC2 Consistent AMI Backup Failure Due to Name Resolution Error

Updated over a month ago

Problem Description

EC2 consistent AMI backup fails with the following error:

"New-EC2Snapshot: Name resolution failure while attempting to reach the service in region us-east-1 (as provided to the -Region parameter or configured shell default). The remote name could not be resolved: 'ec2.us-east-1.amazonaws.com'. Possible causes include:

  • Incorrect region specification (ensure you're not specifying an availability zone).

  • The service might not be available in the region.

  • Lack of network connectivity.

Resolution:

  1. Login to the affected EC2 server

  2. Verify the network settings to ensure the EC2 instance is assigned the correct DNS IP address. This issue can occur if the instance is configured with an incorrect DNS IP address. To resolve this, check that the DNS settings on the Windows EC2 instance are correctly configured by following these steps:

    1. Open the Control Panel on the EC2 instance.

    2. Go to "Network and Sharing Center" and click on "Change adapter settings".

    3. Right-click on the network adapter being used (e.g., Ethernet or Wi-Fi) and select "Properties".

    4. Select "Internet Protocol Version 4 (TCP/IPv4)" and click on "Properties".

    5. Ensure that "Obtain DNS server address automatically" is selected. Alternatively, you can specify valid DNS server IP addresses manually if required.

    6. Click "OK" to save the changes.

  3. Flush DNS cache: Sometimes, cached DNS entries can cause resolution issues. You can flush the DNS cache on the Windows EC2 instance by following these steps:

    1. Open the Command Prompt as an administrator. You can do this by searching for "Command Prompt", right-clicking on it, and selecting "Run as administrator".

  4. Now do nslookup ec2.<Aws region_name>.amazonaws.com

  5. If the command fails to resolve the IP address or shows an error, it indicates a DNS resolution problem. If not, then you may now execute the backup policy and the backup should be successful.

Did this answer your question?