AWS AWSEC2 documentation change
Summary
Restructured documentation about modifying DNS hostname settings, added CLI/PowerShell examples, clarified requirements for instance store-backed instances, and reorganized subnet configuration instructions
Security assessment
The changes primarily improve documentation structure and add implementation examples. While DNS configuration (A/AAAA records) relates to network visibility, there's no evidence this addresses a specific vulnerability. The instance store-backed instance note is operational guidance rather than security remediation.
Diff
diff --git a/AWSEC2/latest/UserGuide/instance-naming-modify.md b/AWSEC2/latest/UserGuide/instance-naming-modify.md index 4e3a2e5a9..04e7ad5f9 100644 --- a//AWSEC2/latest/UserGuide/instance-naming-modify.md +++ b//AWSEC2/latest/UserGuide/instance-naming-modify.md @@ -11 +11,7 @@ You can change the hostname type and DNS hostname configurations for subnets, wh -## Subnets +###### Resource based naming options + + * **Hostname type** : Determines the default setting for the guest OS hostname of EC2 instances launched in the subnet. This is either the resource name or IP name. + + * **Enable DNS hostname IPv4 (A record) requests** : Determines whether DNS requests/queries to the resource name resolve to the private IPv4 address (A record) of the EC2 instance. + + * **Enable DNS hostname IPv6 (AAAA record) requests** : Determines whether DNS requests/queries to the resource name resolve to the IPv6 address (AAAA record) of the EC2 instance. @@ -13 +18,0 @@ You can change the hostname type and DNS hostname configurations for subnets, wh -Modify the configurations for a subnet by selecting a subnet in the Amazon VPC console and choosing **Actions** , **Edit subnet settings**. @@ -15 +20,3 @@ Modify the configurations for a subnet by selecting a subnet in the Amazon VPC c -###### Note + + +## Subnets @@ -19 +26 @@ Changing the subnet settings doesn't change the configuration of EC2 instances t - * **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. +Console @@ -21 +27,0 @@ Changing the subnet settings doesn't change the configuration of EC2 instances t - * **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. @@ -23 +29 @@ Changing the subnet settings doesn't change the configuration of EC2 instances t - * **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. +###### To modify the options for a subnet @@ -24,0 +31 @@ Changing the subnet settings doesn't change the configuration of EC2 instances t +Open the Amazon VPC console and select the subnet. Choose **Actions** , **Edit subnet settings**. Modify the settings as needed and then save your changes. @@ -25,0 +33 @@ Changing the subnet settings doesn't change the configuration of EC2 instances t +AWS CLI @@ -28 +36,18 @@ Changing the subnet settings doesn't change the configuration of EC2 instances t -## EC2 instances +###### To modify the options for a subnet + +Use the [modify-subnet-attribute](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/modify-subnet-attribute.html) command. + + + aws ec2 modify-subnet-attribute \ + --subnet-id subnet-0abcdef1234567890 \ + --private-dns-hostname-type-on-launch resource-name \ + --enable-resource-name-dns-a-record-on-launch \ + --enable-resource-name-dns-aaaa-record-on-launch + +PowerShell + + +###### To modify the options for a subnet + +Use the [Edit-EC2SubnetAttribute](https://docs.aws.amazon.com/powershell/latest/reference/items/Edit-EC2SubnetAttribute.html) cmdlet. + @@ -30 +55,7 @@ Changing the subnet settings doesn't change the configuration of EC2 instances t -Follow the steps in this section to modify the Hostname type and DNS Hostname configurations for an EC2 instance. + Edit-EC2SubnetAttribute ` + -SubnetId subnet-0abcdef1234567890 ` + -PrivateDnsHostnameTypeOnLaunch ResourceName ` + -EnableResourceNameDnsAAAARecordOnLaunch $true ` + -EnableResourceNameDnsARecordOnLaunch $true + +## EC2 instances @@ -34 +65,4 @@ Follow the steps in this section to modify the Hostname type and DNS Hostname co - * 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 change the hostname type, you must first stop the instance. There is no need to stop an instance to change the other two options. + + * Because you can't stop an instance store-backed instance, you can only configure the hostname type and DNS hostname options at instance launch. Only the following instance types support instance store volumes as root volumes: C1, C3, D2, I2, M1, M2, M3, R3, and X1. + @@ -36 +69,0 @@ Follow the steps in this section to modify the Hostname type and DNS Hostname co - * 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. @@ -38,0 +72 @@ Follow the steps in this section to modify the Hostname type and DNS Hostname co +Console @@ -41 +75 @@ Follow the steps in this section to modify the Hostname type and DNS Hostname co -###### To modify the hostname type and DNS hostname configurations for an instance +###### To modify the hostname type and DNS hostname options for an instance @@ -63,0 +98,28 @@ To stop the instance, select the instance and choose **Instance state** , **Stop +AWS CLI + + +###### To modify the hostname type and DNS hostname options for an instance + +Use the [modify-private-dns-name-options](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/modify-private-dns-name-options.html) command. + + + aws ec2 modify-private-dns-name-options \ + --instance-id i-1234567890abcdef0 \ + --private-dns-hostname-type resource-name \ + --enable-resource-name-dns-a-record \ + --enable-resource-name-dns-aaaa-record + +PowerShell + + +###### To modify the hostname type and DNS hostname options for an instance + +Use the [Edit-EC2PrivateDnsNameOption](https://docs.aws.amazon.com/powershell/latest/reference/items/Edit-EC2PrivateDnsNameOption.html) cmdlet. + + + Edit-EC2PrivateDnsNameOption ` + -InstanceId i-1234567890abcdef0 ` + -PrivateDnsHostnameType ResourceName ` + -EnableResourceNameDnsAAAARecord $true` + -EnableResourceNameDnsARecord $true +