0

I'm writing and ansible playbook and using cloudformation module to launch an EC2 instance (Amazon Linux AMI). Then I can ssh to that instance and from that instance I can install with yum but cannot curl or ping.

Ex: $ curl -sS https://getcomposer.org/installer | php curl: (7) Failed to connect to getcomposer.org port 443: Connection timed out

Is there anyone can help? Thanks.

Charles PHAM
  • 840
  • 3
  • 13
  • 25

2 Answers2

1

you might missed the route specifics in route table. Please provide necessary route configurations for further assistance.

Naveen Kerati
  • 951
  • 3
  • 13
  • 29
0

I cannot reproduce your problem. Here is what I did:

  • Launched a new t2.nano instance using the default Amazon Linux AMI
  • Connected via SSH
  • sudo yum install php
  • curl -sS https://getcomposer.org/installer | php

Result:

Composer (version 1.4.2) successfully installed to: /home/ec2-user/composer.phar
Use it: php composer.phar
John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
  • This is my error. I'm setting the instance within VPC but I set wrong Route Table, so this is the cause of problem. Anyway. Thanks for your quickly response! @John Rotenstein. – Charles PHAM Jun 12 '17 at 02:32
  • Feel free to delete the Question if it will not assist other people. – John Rotenstein Jun 12 '17 at 03:04