Search code examples
amazon-web-servicesspring-bootnetflix-eurekaamazon-elastic-beanstalknetflix-zuul

AWS ElasticBeans With Eureka and Zuul , how to Restrict access to services?


I have created a full micro services solution on AWS elasticBeansTalk(each service in its own container) on port 5000(default port for elasticbeans) -> this creates each micro service in its own security group.

I am using Zuul and eureka and everything is working great, But my problem is that I had to create inbound and outbound rules for all of my containers(with all IP white listed 0.0.0.0/0).

I would like to block public access to each of the micro services except Zuul and the spring config server(And I am a really bad devops guy), can Anyone help me with the correct configuration? Many thanks and Kind regards, Roie Beck

I am attaching an image of the structure(there is also a config server in there but I didn't find an image of one):

Configuration


Solution

  • You would want to create a private subnet to run all of your micro-services and have your zuul gateway proxy all requests in your public subnet. Zuul and the micro-services can communicate through the NAT-gateway. More information can be found here: https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Scenario2.html