0

I'm trying to deploy and run an AWS Lambda function from Amazon's new **Cloud9* cloud IDE. https://aws.amazon.com/cloud9/

After setting up my Cloud9 account and running a sample Lambda function from a template I've got an error message:

   HTTPSConnectionPool(host='iam.amazonaws.com', port=443):
   Max retries exceeded with url: / (Caused by 
   ConnectTimeoutError(<botocore.awsrequest.AWSHTTPSConnect object 
   at 0x7fa6a1f79e50>, 'Connection to iam.amazonaws.com timed out. 
   (connection timeout = 60)')).

Maybe, there is some issue with an IAM role? Maybe I should open port 443? But where?

Error message

UPD:

Finally I've found the source of the problem.

AWS Cloud9 Tutorial says:

We recommend you change the default network ACL's inbound rule 100 to the following settings to allow only SSH traffic:

   Type: SSH (22)
    Protocol: TCP (6)
    Port Range: 22

So I did this because I expected an outbound traffic to be allowed. But there was no connection. After I allowed all inbound traffic in Network ACL settings in AWS VPC Console - Cloud9 started to see the Internet.

My question is still open:

What is the best practice to enable an Internet access to AWS Cloud9 IDE and not loose my code privacy?

Tom
  • 17,103
  • 8
  • 67
  • 75
franchb
  • 1,174
  • 4
  • 19
  • 42
  • 1
    Maybe I should think about NAT? Network Address Translation (NAT) instance that forwards HTTP, HTTPS and NTP traffic from a single private subnet to the Internet. You need one stack per availability zone. - http://templates.cloudonaut.io/en/stable/vpc/ – franchb Dec 02 '17 at 13:05
  • 1
    Yes, this definitely looks like a network issue to me. – Jamie Starke Dec 02 '17 at 15:56
  • `ping google.com` gives an answer `PING google.com (172.217.3.46) 56(84) bytes of data. 4 packets transmitted, 0 received, 100% packet loss, time 3059ms`. Tried to connect VPC to NAT according to Amazon guides - sill nothing, the same error... – franchb Dec 02 '17 at 16:03
  • Where are you running Cloud9? This appears to be a problem related to **that** computer, and if that computer is not in AWS then this problem is not in AWS. – Michael - sqlbot Dec 02 '17 at 16:26
  • 1
    Assuming you are running Cloud9 on EC2, and not your own server, your VPC **must** have a public subnet for Cloud9 to use. http://docs.aws.amazon.com/cloud9/latest/user-guide/vpc-settings.html – Mike Patrick Dec 03 '17 at 02:59
  • Yes, I did it. But something was wrong. Deleting current Cloud9 environment and associated VPC and reinstalling it from scratch has solved the problem. I suppose to find what was wrong and then decide - should I delete this question or write an answer. Thank you to all who tried to help me. – franchb Dec 03 '17 at 08:56

0 Answers0