I can't connect to RDS on VPC Peering but Lambda can.

0

Account B's airflow EC2 was reading data from Account A's RDS from Account A's airflow EC2 using VPC Peering with Account A. There was no other changes on account B, simply upgraded the RDS instance type on account A. Since then, i can't access RDS on account A from airflow EC2 on account B. I tried resetting the routing table, security group of RDS.

I've been using RDS's endpoint and the endpoint hasn't changed since the RDS instance type changed. I tested with Lambda to connect RDS on the same vpc and security group which B's Airflow EC2 based on. It worked fine. But on Airflow EC2 it's still not working. Any suggestions ? Thanks for comments

1 Answer
1

Hello.

Can you check what kind of error occurs when accessing RDS from Airflow?
The fact that you can connect from Lambda in the same VPC as EC2 means that there are no problems with settings such as routing.
Also, if the information that EC2 was originally able to connect to RDS is correct, there should be no problem with the security group.
Therefore, I think the only way to troubleshoot is to check the Airflow logs.

profile picture
EXPERT
answered a month ago
profile picture
EXPERT
reviewed a month ago
profile picture
EXPERT
reviewed a month ago
  • Thanks for the comment. The Airflow log is all about Mysql Connection failed. I use a PythonOperator to connect RDS and i wonder "is it Airflow problem or not?". So I tested bare python code connecting to RDS in python file and it was also failed.

    I've done with below.

    1. I cleaned up dns cache but nothing.
    2. I created new EC2 and tested bare python code connecting to RDS in python file but nothing.
    3. I used a VPC Analyzer to check VPC Peering and it passed with success. Therefore it not a network resources issue.

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