I need to connect my Elastic Beanstalk application to an external(not created by EB) database hosted on RDS. I can do this easily in two steps: 1) Create application 2) edit configuration and add the necessary security group in the EB console
I want the correct security group to be added on startup, to avoid the possible human errors of doing it manually.
My problem is that using eb start it dynamically creates the security group. I can't figure out a way to automatically set the correct (or a second) ec2 security group that allows access to the database. The eb cli doesn't seem to allow for using saved configurations.
Is it possible using the config file? Or am I missing something?
I hope this helps, create a .config on .ebextensions:
Resources:
AWSEBSecurityGroup:
Type: "AWS::EC2::SecurityGroup"
Properties:
GroupDescription: "My Own SecurityGroup for ElasticBeanstalk environment."
SecurityGroupIngress:
- {CidrIp: "0.0.0.0/0", IpProtocol: "tcp", FromPort: "443", ToPort: "443"}
- {CidrIp: "0.0.0.0/0", IpProtocol: "tcp", FromPort: "80", ToPort: "80"}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With