aws ec2 associate-address
Associates an Elastic IP address, or carrier IP address (for instances that are in subnets in Wavelength Zones) with an instance or a network interface. AWS CLI reference
7 options Its page in the AWS CLI reference
Options
--allocation-idThe allocation ID.--allow-reassociationReassociation is automatic, but you can specify false to ensure the operation fails if the Elastic IP address is already associated with another resource.--dry-runChecks whether you have the required permissions for the action, without actually making the request, and provides an error response.--instance-idThe ID of the instance.--network-interface-idThe ID of the network interface.--private-ip-addressThe primary or secondary private IP address to associate with the Elastic IP address.--public-ipDeprecated.