I just launched a new clean ec2 instance in the same eu-west-2 and specified the subnet. All traffic internally and externally is enabled. Curl requests to http://169.254.169.254 return results and external requests also work (eg. google.com). However, requests to http://ec2.eu-west-2.amazonaws.com/ hang. Note that requests to https://ec2.eu-west-1.amazonaws.com/ resolve. My end aim is to use aws ec2 describe-tags
(I know there are other methods, but I want to understand why this method works on one instance and not on another). I SSH connected to another instance in the region (on the same subnet) and all works perfectly. I have tried this request as an IAM user with and without the ec2:DescribeTags
permission and both hang.
Both servers have the same nameserver (and so do instances in the different availability zones within the region). Why isn't Curl working internally on these new instances but not the old ones? Is it a route53 issue; a vpc issue; or a different permission?
Extra info: If I create the instance in a different region, such as ap-east-1, and then query the above locations or https://ec2.ap-west-1.amazonaws.com/, it resolves. There are other instances on the eu-west region, including a rabbit mq tunnel and a database. Could these be a part of the problem?
aws ec2 describe-tags
uses the AWS API and not the IP address or the DNS domain name. Three different things with different documented behaviors.aws ec2 describe-tags
connects toec2.eu-west-2.amazonaws.com
but in--debug
mode this connection stage hangs. Any ideas why? Thanks.aws ec2 describe-tags
commands, and which EC2 instances work and don't work are too vague to troubleshoot definitively. My best guess is that you've launched new EC2 instances in private subnets that don't have NAT gateways, or you've launched new EC2 instances in public subnets but haven't given them public IP addresses.