Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ec2 instance on AWS apt- get not working

I have Ec2 instance on AWS with Amazon Ubuntu.

When i try to download any thing, I am unable to do so.

For Ex:

~# apt-get update  0% [Connecting to ap-southeast-1.ec2.archive.ubuntu.com (103.246.148.161)] [Connecting to security.ubuntu.com (91.189.91.15) 

Another Ex will be

~# wget https://s3.amazonaws.com/aws-cli/awscli-bundle.zip  --2014-04-09 07:27:17--  https://s3.amazonaws.com/aws-cli/awscli-bundle.zip Resolving s3.amazonaws.com... 207.171.189.80 Connecting to s3.amazonaws.com|207.171.189.80|:443... 

This remains forever.

I was able to download files until I created Group and user for AWS Console.

Please suggest what can be issues here.

like image 694
raheem52 Avatar asked Apr 09 '14 07:04

raheem52


People also ask

Why can't I reach my EC2 instance?

To troubleshoot why your Amazon EC2 can't access the internet, do the following: Verify that the EC2 instance meets all prerequisites. Verify that the instance has a public IP address. Verify that a firewall isn't blocking the access.

Why is my EC2 Linux instance not booting and going into emergency mode?

The most common reasons an instance might boot in emergency mode are: A corrupted kernel. Auto-mount failures because of incorrect entries in the /etc/fstab.

Why is my AWS instance not connecting?

The following are common reasons why EC2 Instance Connect might not work as expected: EC2 Instance Connect doesn't support the OS distribution. The EC2 Instance Connect package isn't installed on the instance. There are missing or incorrect AWS Identity and Access Management (IAM) policies or permissions.

How do you troubleshoot if you Cannot SSH into an AWS instance?

Confirm that the security group is permitting inbound SSH traffic (port 22) from your IP address (or even 0.0. 0.0/0 for testing purposes) Keep NACLs at default settings unless you understand them deeply. Make sure the instance is a Linux instance (Windows does not have SSH enabled)


1 Answers

You EC2 instances's Security groups is not configured to let it reach internet. You need to have an Outbound rule for all traffic to 0.0.0.0/0. In EC2-Classic, this is already in place and hence you need not worry. However, if this is in VPC, then you need to add this rule.

Also, Apart from what is said above, could you check whether any iptables rules causing any issue.

like image 164
slayedbylucifer Avatar answered Sep 28 '22 04:09

slayedbylucifer