I instantiated a micro machine in the US-West(Oregon) region. For my application, I need to be in Oregon – regulatory reasons. (The servers that my application will interact with will refuse connection otherwise.)
I tried curl ifconfig.me and searched the IP it produced. I was surprised that it returned
http://iplocation.truevue.org/50.112.44.39.html
Which seems to be in California. Is there a way to make sure that my IP is always originating from Oregon?
I looked into elastic IP, but that is for users connecting with the instance.
Appreciate thoughts greatly
Get a few Elastic IPs and test each one until you find one that appears to be in Oregon. Attach that Elastic IP address to the instance. If your initial set of five Elastic IPs don’t satisfy your tests, release them, get more, and repeat until you have found one that does.
Your best bet is to use the Elastic IP address’s DNS name (e.g. “ec2-50-112-33-39.us-west-2.aws.amazon.com”) for communications. Services running within that region will get the instance’s private IP address, minimizing the bandwidth usage charges, and services outside that region will get the elastic IP address that is internet-routable.