Problems using EC2 command line tools on one of the instances
The AWS API communicates via HTTP, in the EU region the endpoint is https://ec2.eu-west-1.amazonaws.com
A VPC instance without public IP cannot communicate with that endpoint, so it cannot use the API or CLI tools.
You either have to assign public IPs or set up an HTTP proxy for your VPC.
Related videos on Youtube
Kasia Gogolek
I am a senior developer for Living Group. My main interests include Software Architecture, new technologies, roller derby and cats.
Updated on September 18, 2022Comments
-
Kasia Gogolek over 1 year
I'm having a bit of a problem with EC2 API tools timing out on a new instance I created.
Yesterday I took an image of a server on which the tools worked fine. I made some changes to the software it runs, and init scripts, which I needed to support our new deployment system.
Today, I set up a new Launch Configuration for it, and spawned a new instance. I log into this instance from the original one, as it only has a private IP. Now, for the purpose of our deployment I need to be able to access the snapshots with a certain tag, which works fine on original instance, but on the new one it just times out:
Unknown problem connecting to host: 'https://ec2.eu-west-1.amazonaws.com' Unable to execute HTTP request: Connect to ec2.eu-west-1.amazonaws.com:443 timed out
I feel like it's a configuration issue, is there any way you could shed some light on what I'm doing wrong?
To clarify:
- both instances have the same Key pair name.
- both have the same security group.
- the server that I'm having a problem with is only accessible via private IP, with the Public DNS, Public IP, and Elastic IP being blank.
Any help will be much appreciated.
-
user2902302 about 10 yearsI probably forgot one option: use one instance as a NAT gateway.
-
Asfand Qazi almost 8 yearsIt's surprising that AWS does not provide internal routing for the AWS API for instances in private subnets, like it does for S3.