YUM update error EC2 Could not retrieve mirrorlist https...

0

Wherenever I run Sudo YUM update on an new EC2 intance I get this error:

Could not retrieve mirrorlist https://amazonlinux-2-repos-us-west-2.s3.dualstack.us-west-2.amazonaws.com/2/core/latest/x86_64/mirror.list error was
12: Timeout on https://amazonlinux-2-repos-us-west-2.s3.dualstack.us-west-2.amazonaws.com/2/core/latest/x86_64/mirror.list: (28, 'Failed to connect to amazonlinux-2-repos-us-west-2.s3.dualstack.us-west-2.amazonaws.com port 443 after 4982 ms: Connection timed out')```

Here are the things I've already checked:

1. NACL and Security Groups already have inbound Port 80 and port 443 open
2. Outbound NACL and Security Groups is already Open to all TCP
3. Internet Gateway correctly attached
4. Have given this EC2 a Public, elastic IP, and that still didn't work.

Not sure what else I'm missing?
질문됨 일 년 전1846회 조회
2개 답변
1
수락된 답변

Your inbound NACL is wrong. it dont need inbound 80,443.

It needs inbound ephemeral ports open range 32768-65535 https://docs.aws.amazon.com/vpc/latest/userguide/vpc-network-acls.html

If issue persist, you can use VPC Reachability analyzer to find out where traffic is getting blocked. https://aws.amazon.com/blogs/aws/new-vpc-insights-analyzes-reachability-and-visibility-in-vpcs/

Accept answer if it helps resolving the issue

답변함 일 년 전
profile pictureAWS
전문가
검토됨 일 년 전
  • This did it. Thank you. I had to give the s3 Bucket end point full access, rather than some more restricted access to get Yum to update... but it's working now. Thanks for the reply!

1

The instance needs to be in a public subnet where the route table attached to the subnet has a rule routing traffic to the internet gateway. Or in a private subnet where the route table attached to the subnet has a rule routing traffic to a NAT Gateway/Instance.

profile pictureAWS
전문가
kentrad
답변함 일 년 전
  • The Subnet's Routable has 0.0.0.0/0 Rule to the My Internet Gateway. I double checked my Launch template to ensure that this Route Table is associated with the Subnet that the EC2 instance is attached to when it is created.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠