Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7076871
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:21:04+00:00 2026-05-28T06:21:04+00:00

So for reasons Id rather not go into, my DB is on an EC2

  • 0

So for reasons Id rather not go into, my DB is on an EC2 instance in eu-west-1 and I have created a beanstalk app on us-east-1. Id like my app to talk to that EC2 instance on a MySQL port (3306).

Can anyone assist with how Id set this up, what ingress rules I need to setup on the EC2 security group? Given that I will have multiple versions of the app in beanstalk, the IP address may change regularly (after environment rebuilds etc).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T06:21:05+00:00Added an answer on May 28, 2026 at 6:21 am

    The important concept regarding Security Group Rules you might be missing is, that you do not necessarily specify IP addresses as traffic sources alone, rather regularly will refer to other security groups as well:

    The source can be an individual IP address (203.0.113.1), a range of
    addresses (e.g., 203.0.113.0/24), or an EC2 security group. The
    security group can be another group in your AWS account, a group in
    another AWS account, or the security group itself.

    By specifying a security group as the source, you allow incoming
    traffic from all instances that belong to the source security group
    .
    […] You might specify another security group in your account if you’re creating a
    three-tier web service (see Creating a Three-Tier Web Service).

    [emphasis mine]

    Consequently you’ll simply need to add the Beanstalk app instances security group as a traffic source for TCP port 3306 within the MySQL instance security group.


    Taking this further

    An additional concept to make oneself familiar with is, that you can have multiple security groups assigned to an instance, thus enabling (possibly dynamic) composition of the resulting firewall.

    For example, a recommended practice for larger architectures suggests to specify a dedicated security group per ‘role’ your instances have (rather than accumulating several rules within one security group as usual), e.g. we have security groups like ‘role-ssh’ (TCP port 22) and ‘role-mysql’ (TCP port 3306), which are assigned to EC2 instances as needed in turn. You can read more about this concept in e.g. Security Groups – Most Underappreciated Feature of Amazon EC2.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For reasons I'd rather not get into right now, I have a string like
For reasons that I'd rather not go into, I have a bunch of parallel
For reasons that I would not like to discuss, our master database schema is
For reasons I'd rather not go into, I need to filter a set of
For reasons I'd rather not go into (has to do with compatibility with a
We've run into an interesting situation that needs solving, and my searches have turned
For reasons it's not worth getting into, the object Model of the django application
I have this rewrite rule that turns foo.com/test (or foo.com/test/) into foo.com/test.txt: RewriteRule ^test/?$
I'd like to have a web project in a solution that is set to
For reasons that are irrelevant to this question I'll need to run several SQLite

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.