aws ec2 associate-dhcp-options
Associates a set of DHCP options (that you've previously created) with the specified VPC, or associates no DHCP options with the VPC. AWS CLI reference
2 examples 3 options Its page in the AWS CLI reference
Examples
Example 1: To associate a DHCP options set with your VPC
The following associate-dhcp-options example associates the specified DHCP options set with the specified VPC.
aws ec2 associate-dhcp-options --dhcp-options-id dopt-d9070ebb --vpc-id vpc-a01106c2Identify--dhcp-options-idThe ID of the DHCP options set, or default to associate no DHCP options with the VPC.--vpc-idThe ID of the VPC.This command produces no output.
For more information, see Work with DHCP option sets in the Amazon VPC User Guide.
Example 2: To associate the default DHCP options set with your VPC
The following associate-dhcp-options example associates the default DHCP options set with the specified VPC.
aws ec2 associate-dhcp-options --dhcp-options-id default --vpc-id vpc-a01106c2Identify--dhcp-options-idThe ID of the DHCP options set, or default to associate no DHCP options with the VPC.--vpc-idThe ID of the VPC.This command produces no output.
For more information, see Work with DHCP option sets in the Amazon VPC User Guide.
Options
--dhcp-options-idThe ID of the DHCP options set, or default to associate no DHCP options with the VPC.--dry-runChecks whether you have the required permissions for the action, without actually making the request, and provides an error response.--vpc-idThe ID of the VPC.