By using AWS re:Post, you agree to the Terms of Use

Sending UDP traffic to EC2 host from ECS instance, security group issue on EC2 host


I'm wanting to send UDP traffic to an EC2 host in the same VPC as an ECS instance and I can only get it to work by testing with allowing all source IPs in the security group for the EC2 instance. With RDS it's always worked fine to use the RDS instance's security group ID as source in the ECS container's security group, but that isn't working here, where I'd use the ECS container's SG as source for the UDP port in the EC2 instance's SG. I tried using something like to allow all VPC traffic, but that doesn't work either. Are ECS instances in my VPC? Thanks for any help.

  • I'm assuming you are using ECS on EC2, not Fargate...can you confirm? If so, what Task networking mode are you using? (AWSVPC, BRIDGE, or HOST)?

  • @AWS-User-5227227 Were you able to resolve this issue? I have the same issue, where I am trying to connect to a DB on EC2 from ECS - without success.