christian_lemm
Level 2 Flexeran
Level 2 Flexeran

Get amazon ec2 elastic ip only when available

Hi, currently I'm trying some workflows with amazon aws / ec2 cloud. I have a simple ec2 instance that provides a public ip. But this is *not* an elastic ip, that will be the same when shutting down and starting a new ec2 instance. I managed to run FNP LicensingService on that instance. Then I tried to retrieve a specific elastic ip host id: % lmutil lmhostid -ptype AMZN -eip lmutil - Copyright (c) 1989-2022 Flexera. All Rights Reserved. The FlexNet host ID of this machine is "AMZN_EIP=1.234.56.78" (I changed the ip in the example above.) But, it printed the current public ip, which is not the desired behaviour for me. My question: Oftentimes the customers have a hard time to understand all these aws configuration options and they might not really understand the difference between a temporary public ip and an elastic ip. Is there some technical support to detect, whether the instance *really* has an elastic ip?
0 Kudos
5 Replies
mrathinam
Revenera Moderator Revenera Moderator
Revenera Moderator

Hi @christian_lemm It's difficult to differentiate the public IP or it's an elastic IP unless you have  Tag an Elastic IP address (Read https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html under Tag an Elastic IP address ). 

Best Regards,

0 Kudos

Hi mrathinam

thanks for the answer, but I don't understand in how tagging an elastic
ip will help me (the software vendor) in order to check, whether the
customer has sent me a valid elastic-ip host id.
0 Kudos

Hi @christian_lemm, Yes, customers can confirm this because they can view these details on their console for example

--

  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.

  2. In the navigation pane, choose Elastic IPs.

--

So if we really want to know then need confirmation from the customer that it's a  public IPv4 address or valid elastic-IP because elastic-ip is costly compared to public IP. 

Best Regards,

0 Kudos
CarolBrusteredm
Level 3

An advantage of using Amazon Elastic Compute Cloud (EC2) is the ability to start, stop, create, and terminate instances at any time. However, this flexibility creates a potential challenge with IP addresses. Restarting a stopped instance (or re-creating an instance after another instance is terminated) results in a new IP address. How do you successfully reference a machine when the IP address is constantly changing?

In response to this problem, Amazon offers the ability to allocate an Elastic IP address. An Elastic IP provides you a single IP address that you can associate with different EC2 instances over time. If your EC2 instance has an Elastic IP and that instance is ever stopped or terminated, you can immediately associate a new EC2 instance with the Elastic IP. Your existing applications will not break because the applications see the IP address they were expecting, even though the back-end EC2 instance has changed.

If you're building your own site manually, you should associate an Elastic IP with your enterprise geodatabase instance if you have the geodatabase on its own dedicated instance. Optionally, you can also associate an Elastic IP with your ArcGIS Server instance if you are not already using an Amazon Load Balancer.

Hi, @CarolBrusteredm Thanks for the detailed information and advantage of the Elastic IP, however, the query here was, How to distinguish the given IP is a public IP and an Elastic IP?. Is there any way we have?. 

To answer this query I have published a KB https://community.flexera.com/t5/FlexNet-Publisher-Knowledge-Base/How-to-distinguish-between-amazon-ec2-Elastic-IP-quot-AMZN-EIP/ta-p/228859 please review it and let me know if you have any more suggestion. 

Best Regards,

0 Kudos