- Newest
- Most votes
- Most comments
I utilized the private IP of an external EC2, and it successfully functioned! To clarify the process for anyone encountering a similar issue:
- Ensure that both the Elastic Beanstalk (EB) environment and your manually created EC2 instance share the same security group.
- Confirm that the specified security group allows incoming traffic on the required port range.
- Subsequently, you can establish a connection from your EB environment to the manually created EC2 instance using the private IP of the latter.
If I understand correctly, you're provisioning a new EC2 instance and you want that instance to have access to, and be able to be accessed by, pre-existing EC2 instances.
Assuming all the pre-existing instances already have the same security group associated with them then you can add that security group (rather than an IP address, or IP address range) as the source/target of a security group rule that is associated with your new EC2 instance.
This is described here https://docs.aws.amazon.com/vpc/latest/userguide/security-group-rules.html#security-group-referencing
You could launch your new EC2 with the same security group as the other instances are already in https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/security-group-rules-reference.html#sg-rules-other-instances
Relevant content
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
I did change the new Ec2 instance security group to EB security group still can not connect redis service from EB.
with elastic catch i can connect without any issue, but not the EC2 which I have created and installed Redis on it manually.