'How can i connect to Aurora serverless in Spring boot

I want to connect aws aurora serverless from local using spring boot. Because aurora can't public access so i I did the following. 1: create a NLB, 2: Using private IP of aurora serverless to add target group. i can connect to aurora from my mysql workbench local using loadbalancer url but can't connect when config in datasource in my application.yml file. what is happening.

spring: datasource: url: "jdbc:mysql://auroradb-5164fsdafas.elb.ap-southeast 1.amazonaws.com:3306/my_db" username: admin password: password



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source