Change resource based naming options for Amazon EC2 - Amazon Elastic Compute Cloud

Change resource based naming options for Amazon EC2

You can change the hostname type and DNS hostname configurations for subnets, which affects all subsequent instance launches in that subject, or you can change them for an EC2 instances after you launch it.

Subnets

Modify the configurations for a subnet by selecting a subnet in the Amazon VPC console and choosing Actions, Edit subnet settings.

Note

Changing the subnet settings doesn't change the configuration of EC2 instances that are already launched in the subnet.

  • Hostname type: Determines whether you want the default setting of the guest OS hostname of the EC2 instance launched in the subnet to be the resource name or IP name.

  • Enable DNS hostname IPv4 (A record) requests: Determines whether DNS requests/queries to your resource name resolve to the private IPv4 address (A record) of this EC2 instance.

  • Enable DNS hostname IPv6 (AAAA record) requests: Determines whether DNS requests/queries to your resource name resolve to the IPv6 address (AAAA record) of this EC2 instance.

EC2 instances

Follow the steps in this section to modify the Hostname type and DNS Hostname configurations for an EC2 instance.

Considerations
  • To change the Use resource based naming as guest OS hostname setting, you must first stop the instance. To change the Answer DNS hostname IPv4 (A record) request or Answer DNS hostname IPv6 (AAAA record) requests settings, you don't have to stop the instance.

  • To modify any of the settings for non-EBS backed EC2 instance types, you cannot stop the instance. You must terminate the instance and launch a new instance with the desired Hostname type and DNS Hostname configurations.

To modify the hostname type and DNS hostname configurations for an instance
  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.

  2. If you're going to change the Use resource based naming as guest OS hostname setting, first stop the EC2 instance. Otherwise, skip this step.

    To stop the instance, select the instance and choose Instance state, Stop instance.

  3. Select the instance and choose Actions, Instance settings, Change resource based naming options.

    • Use resource based naming as guest OS hostname: Determines whether you want the guest OS hostname of the EC2 instance to be the resource name or IP name.

    • Answer DNS hostname IPv4 (A record) requests: Determines whether DNS requests/queries to your resource name resolve to the private IPv4 address of this EC2 instance.

    • Answer DNS hostname IPv6 (AAAA record) requests: Determines whether DNS requests/queries to your resource name resolve to the IPv6 address (AAAA record) of this EC2 instance.

  4. Choose Save.

  5. If you stopped the instance, start it again.