Unable to update Amazon Linux instance via yum

0

I have an instance running Amazon Linux v2 (2017.12).

If I try to update via yum, I get the following-

Could not retrieve mirrorlist http://amazonlinux.us-east-2.amazonaws.com/2017.12/core/$pointrelease/x86_64/mirror.list error was
14: HTTP Error 403 - Forbidden

The instance can access other hosts via http.

If I try something as simple as curl -I 'http://amazonlinux.us-east-2.amazonaws.com/' I still get a 403 Forbidden response.

I tried running yum clean all and deleted everything in /var/cache/yum, but that had no effect.

Edited by: brunnock2 on Apr 12, 2019 7:49 AM

Edited by: brunnock2 on Apr 12, 2019 7:51 AM

asked 5 years ago4584 views
1 Answer
0

Fixed it.

Edit /etc/yum.repos.d/amzn2-core.repo .

Replace

mirrorlist=http://amazonlinux.$awsregion.$awsdomain/$releasever/$product/$pointrelease/$basearch/mirror.list

with

mirrorlist=http://amazonlinux.$awsregion.$awsdomain/$releasever/$product/latest/$basearch/mirror.list

Edited by: brunnock2 on Apr 13, 2019 4:21 AM

answered 5 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