Skip to main content

Problems using EC2 command line tools on one of the instances [Resolved]

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: ''
Unable to execute HTTP request: Connect to 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.

Question Credit: Kasia Gogolek
Question Reference
Asked March 13, 2019
Posted Under: Network
2 Answers

The AWS API communicates via HTTP, in the EU region the endpoint is

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.

credit: mschuett
Answered March 13, 2019

mschuett is correct the API is not ordinarily available to private instances.

However, you can setup a VPC Endpoint to for your private subnets.

credit: D. Harris
Answered March 13, 2019
Your Answer