2 Risposte
- Più recenti
- Maggior numero di voti
- Maggior numero di commenti
0
You can specify the IP Address in a Launch Template, specifically AWS::EC2::Launch Template NetworkInterface
con risposta un anno fa
0
It's good to avoid the issue using domain names or internal load balancers, but there are some ways of getting the same private IP.
One is to use an additional ENI that you attach to your instance in addition to the default ENI. Other resources can reference the private IP of this additional ENI, which can be detached and attached to another instance as needed. Note it needs to be in the same AZ but different subnet than the default ENI.
Another hack I've heard of is using a very small subnet (/28) and using up all but one of the available IP addresses. Then when your instance starts it's forced to always use the same IP address.
Contenuto pertinente
- AWS UFFICIALEAggiornata 3 anni fa
- AWS UFFICIALEAggiornata 2 anni fa
- Come posso assegnare un indirizzo IP privato primario personalizzato alla mia istanza di Amazon EC2?AWS UFFICIALEAggiornata un anno fa
Thanks for adding the much better answer @Rodney Lester. My info was way out of date - somehow in the shift from Launch Configurations to Launch Templates years ago I never noticed (or have forgotten) that specifying a primary IPv4 address is now possible. Cheers.