Cannot find a valid baseurl for repo: amzn2-core/2/x86_64

0

Hello,

I have an amazon linux 2 instance sitting within a VPC that has a gateway endpoint attached to it.

When trying to run yum commands, I get a 403 forbidden error "Cannot find a valid baseurl for repo: amzn2-core/2/x86_64".

I've read this can be caused by the requested repository sitting within an S3 bucket, which is blocked by the gateway endpoint.

I've whitelisted arn:aws:s3:::repo.us-east-1.amazonaws.com on my gateway endpoint, but this has not worked.

Does anyone know how I can solve this issue?

Thank you,

Ryan M

Edited by: RyanM1234 on Mar 19, 2021 2:30 PM

Edited by: RyanM1234 on Mar 19, 2021 2:31 PM

質問済み 3年前12324ビュー
4回答
1

Hello. Check your outbound rules in the security group you have chosen for your instance. In my case I'm allowing all traffic.

回答済み 1年前
  • Allowing all outgoing ports on the security solves this for me.

0

Had the same error. Possible network issue.

I found this on stack Overflow and it worked for me:

To solve this, adding a valid nameserver into resolv.conf (use sudo if you are not root user)

$ echo nameserver 8.8.8.8 > /etc/resolv.conf

kk2021
回答済み 3年前
0

I had exactly the same problem today and the way I fixed it was to go to the Sydney region, where it worked (sudo yum update -y). However, if you are using t4g instance types, you may need to go to somewhere like Tokyo. Once there, you can run the updates, create an Amazon Machine Image and then copy that back to where you need it. Be aware though that when you transfer the image over the network, you may incur charges.

回答済み 2年前
0

I'm came here for the same problem... I had the same problem but for my deployment I am using terraform in different regions like: sa-east 1, us-east-1 and 2 and us-west-1 and 2. I saw rmmcosta's answer, it got me thinking and looking at my hashcode... and . . . explode!! Dude, in my code in resource aws_security_group I left only port 22 externally accessible by tcp protocol on ingress and all ports on egress but only tcp protocol. Did means my instances cannot browse on the web or find any types URLs. RESUME: Change egrees rules maitaning all ports and put all protocols (tcp and udp) and allowing all traffic to browse and find urls, ping and repos.

resource "aws_security_group" "allow-vpc-master" {
name = "allow-vpc-master01"
  vpc_id = aws_vpc.vpc-master01.id
  ingress {
    description = "Libera porta 22"
    from_port   = "22"
    to_port     = "22"
    protocol    = "tcp"
    cidr_blocks = "0.0.0.0/0"
  }
  egress {
    from_port   = "0"
    to_port     = "0"
    protocol    = "-1"
    cidr_blocks = "0.0.0.0/0"
  }
  
profile picture
回答済み 1年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ