- Newest
- Most votes
- Most comments
It's likely to be one of the items in this knowledge article https://repost.aws/knowledge-center/ec2-troubleshoot-yum-errors-al1-al2
My best guess would be that the EC2 instance doesn't have outbound access on ports 80 & 443 in a security group that is associated with it. Can you verify these outbound ports are open?
If this doesn't solve the problem then look at the route table. Is the EC2 instance provisioned in the default VPC, or a VPC you have created? If the EC2 is in the default VPC then is it in a pre-existing subnet, or in a subnet you have created?
If it's in a pre-existing subnet in the default VPC then the routing should be fine, so look at other possibilities in the knowledge article.
If it's in a new subnet and/or new VPC then make sure the subnet has a route directly to an internet gateway, in AWS Console -> VPC -> Subnets -> [subnet] -> Route table and it needs to have an entry for destination 0.0.0.0/0 with target igw-abcd1234 (or if you're using a NAT Gateway then ensure this is properly setup).
Once this is confirmed to be in place, if you still can't yum update
then I would advise working through the other steps in the linked knowledge article.
Relevant content
- asked a month ago
- Accepted Answerasked a year ago
- AWS OFFICIALUpdated 2 days ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 10 months ago