Could not retrieve mirrorlist http://amazonlinux.default.amazonaws.com/2/co

0

I can not cloudform a usable ec2 instance in us-east-1b. The console log shows this:

\[  117.581749] cloud-init\[3206]: Cannot find a valid baseurl for repo: amzn2-core/2/x86_64  
\[  117.585263] cloud-init\[3206]: Could not retrieve mirrorlist http://amazonlinux.default.amazonaws.com/2/core/latest/x86_64/mirror.list error was  
\[  117.590381] cloud-init\[3206]: 12: Timeout on http://amazonlinux.default.amazonaws.com/2/core/latest/x86_64/mirror.list: (28, 'Connection timed out after 5000 milliseconds')  

I've retried a few time (a dozen?), over the last few hours. Here's the most recent instance id: i-079e1e18a88555d37, the single instance in this cloud formation arn:aws:cloudformation:us-east-1:566653950698:stack/DevelAxe0/01a331b0-9134-11e9-bbf1-0e17762a99e0

Please advise.

asked 5 years ago4075 views
3 Answers
0

Hello,
This timeout error can happen when an instance runs in a private VPC with no Internet access, as the repositories are hosted on S3.
To access the repositories from the instance you can setup an Internet Gateway in your VPC or configure a VPC endpoint to access the repositories: https://aws.amazon.com/amazon-linux-ami/faqs/?nc1=h_ls#vpc-endpoint

Thanks,
Paul

AWS
answered 5 years ago
0

Try checking the inbound & outbound rules of the instance security group. It should work if the http & https ports are open to the internet.

If you are using a VPC, then check the NAT Instance/NAT Gateway.

Edited by: krshnteja on Jul 25, 2021 11:42 AM

answered 3 years ago
0

Hi,

Enable the HTTP and HTTPS outbound connections under the SG attached to that instance and that should work!

Cheers

answered 3 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions