AWS-EC2 [SOLVED]: Amazon EC2 Connect To Amazon Aurora MySQL, Spring Boot App

AWS-EC2 [SOLVED]: Amazon EC2 Connect To Amazon Aurora MySQL, Spring Boot App

Home Forums Amazon Web Services AWS EC2 AWS-EC2 [SOLVED]: Amazon EC2 Connect To Amazon Aurora MySQL, Spring Boot App

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #246936

    Cloudy Point
    Keymaster

    QuestionQuestion

    I can connect my Spring Boot app on Elastic Beanstalk to my Amazon Aurora Database. I can connect MySQL Workbench to Amazon Aurora.

    I have failed once already connecting my Spring Boot App on EC2 Linux to Amazon Aurora. I think it might be a security group issue. How do I connect an app on EC2 to an Amazon Aurora MySQL Database? I would like my security group to just allow my EC2 instance directly and any time I want to connect locally I do the setup each time by removing/adding my IP to the security group.

    I can’t use Elastic Beanstalk. Without going into details, I have a particular use case.

    #246937

    Cloudy Point
    Keymaster

    Accepted AnswerAnswer

    Just allow the private ip of your EC2 instance in the security group of your Aurora DB.

    Eg. If the private IP of your EC2 instance is 10.0.0.122, then add a security group Inbound entry on the security group of aurora with below properties.

    Type : MySQL/Aurora
    Protocol : TCP
    Port Range : 3306
    Source : Custom : 10.0.0.122/32

    Source: https://stackoverflow.com/questions/47706802/amazon-ec2-connect-to-amazon-aurora-mysql-spring-boot-app
    Author: Nans
    Creative Commons License
    This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.