How can I get a non-Elastic, public IP for an EC2 instance that has only a private IP?

1

Points of My Scenario: 1. I created EC2 instance without a public IP (intentionally) 2. I soon after decided I need a public IP. 3. I do not want an Elastic IP; instead, I am content to have a public IP that changes when I stop and re-start the instance. QUESTION: How do I get the standard public IP in this situation?

질문됨 일 년 전968회 조회
2개 답변
2
수락된 답변

Hello AWS Customer,

The public IP addressing feature is only available during launch. And, whether you assign a public IP address to your instance during launch or not, as you know, you can associate an Elastic IP address with your instance after it's launched.[1]

Hope you will find this information useful. Please let me know if you have any further questions or concerns. I will be more than glad to assist you.

Best regards,
Jisoo K.

profile pictureAWS
지원 엔지니어
Jisoo_K
답변함 일 년 전
profile pictureAWS
전문가
검토됨 일 년 전
  • I am avoiding Elastic IP because my EC2 instances will be powered off most of the month. I estimate I will run each of them 30 hours per month. (equals $3.5 USD per instance per month. So, my only option is to re-create the instance (since I won't use Elastic IP)?

  • What you could do is write a small script that starts/stops your instance and at the same time allocates/deallocates the EIP. That way you're not recreating the instance and you'll get a new IP every time.

2

Short answer: You can't do that with a Public IP. But you can do it with an Elastic IP.

You can associate a Public IP with an instance during launch but not after launch. However, you can allocate an Elastic IP then associate it with your instance after launch. Should you wish to change the IP you can de-associate it; release the Elastic IP; obtain a new one and associate it with your instance.

profile pictureAWS
전문가
답변함 일 년 전
profile pictureAWS
전문가
검토됨 일 년 전
  • @Brettski-AWS: both you and Jisoo_K gave me answer I needed. Since the answers are effectively identical, I've accepted the one that arrived first. I hope you find this fair. I tried to accept both, but unsuccessfully.

  • No problem! Glad we answered the question. To be fair, Jisoo_K was first by a few seconds. ;-)

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠