- Newest
- Most votes
- Most comments
Hello. Check your outbound rules in the security group you have chosen for your instance. In my case I'm allowing all traffic.
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
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.
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"
}
Relevant content
- asked 6 years ago
- asked 2 years ago
- asked 2 months ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated 8 months ago
- AWS OFFICIALUpdated 2 years ago
Allowing all outgoing ports on the security solves this for me.