Sql schema version compatibility check failed connection timed out

We are running a Temporal cluster on AWS ECS with MySQL running on an RDS instance. We are encountering the following error, causing components such as the Temporal frontend and history to restart.

Fx] ERROR              Failed to initialize custom logger: could not build arguments for function "go.uber.org/fx".(*App).constructCustomLogger.func2
        /go/pkg/mod/go.uber.org/fx@v1.17.1/app.go:415:
failed to build fxevent.Logger:
could not build arguments for function "go.temporal.io/server/temporal".glob..func8
        /home/builder/temporal/temporal/fx.go:916:
failed to build log.Logger:
received non-nil error from function "go.temporal.io/server/temporal".ServerOptionsProvider
        /home/builder/temporal/temporal/fx.go:163:
sql schema version compatibility check failed: dial tcp 10.0.45.128:3306: connect: connection timed out
[Fx] ERROR              Failed to start: could not build arguments for function "go.uber.org/fx".(*App).constructCustomLogger.func2 (/go/pkg/mod/go.uber.org/fx@v1.17.1/app.go:415): failed to build fxevent.Logger: could not build arguments for function "go.temporal.io/server/temporal".glob..func8 (/home/builder/temporal/temporal/fx.go:916): failed to build log.Logger: received non-nil error from function "go.temporal.io/server/temporal".ServerOptionsProvider (/home/builder/temporal/temporal/fx.go:163): sql schema version compatibility check failed: dial tcp 10.0.45.128:3306: connect: connection timed out
Unable to start server. Error: could not build arguments for function "go.uber.org/fx".(*App).constructCustomLogger.func2 (/go/pkg/mod/go.uber.org/fx@v1.17.1/app.go:415): failed to build fxevent.Logger: could not build arguments for function "go.temporal.io/server/temporal".glob..func8 (/home/builder/temporal/temporal/fx.go:916): failed to build log.Logger: received non-nil error from function "go.temporal.io/server/temporal".ServerOptionsProvider (/home/builder/temporal/temporal/fx.go:163): sql schema version compatibility check failed: dial tcp 10.0.45.128:3306: connect: connection timed out

can someone please help here?

Temporal cluster version: 1.18.5
Mysql version : 8.0.35