# How do I setup path based routing using Ingress-Nginx within AWS EKS?

**URL:** <https://discuss.kubernetes.io/t/how-do-i-setup-path-based-routing-using-ingress-nginx-within-aws-eks/7375>\
**Category:** General Discussions\
**Tags:** loadbalancer\
**Created:** [July 31, 2019, 11:56pm UTC](https://discuss.kubernetes.io/t/how-do-i-setup-path-based-routing-using-ingress-nginx-within-aws-eks/7375 "2019-07-31T23:56:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jdj333](https://avatars.discourse-cdn.com/v4/letter/j/e36b37/32.png) [@jdj333](https://discuss.kubernetes.io/u/jdj333)\
**Post date:** [July 31, 2019, 11:56pm UTC](https://discuss.kubernetes.io/t/how-do-i-setup-path-based-routing-using-ingress-nginx-within-aws-eks/7375/1 "2019-07-31T23:56:53Z")

</div>

I’m trying to figure out how to setup path based routing in an Ingress config file to route to either Service A or Service B depending on the path that gets accessed through an elastic load balancer.

Ingress-Nginx docs reference: [https://github.com/kubernetes/ingress-nginx/blob/master/docs/deploy/index.md#aws](https://github.com/kubernetes/ingress-nginx/blob/master/docs/deploy/index.md#aws)

I was able to successfully run the mandatory.yaml and service-l4.yaml file based on the docs. I see a load balancer was successfully created and I can access it.

I think I am missing some concept or something in my Ingress config file. I replaced the host for confidentiality. See below. Thanks in advance!

```
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: pullrequest-deployment
  annotations:
    # use the shared ingress-nginx
    kubernetes.io/ingress.class: "nginx"
spec:
  rules:
  - host: services.mycompany.com
    http:
      paths:
      - path: /service-a
        backend:
          serviceName: service-a
          servicePort: 80
      - path: /service-b
        backend:
          serviceName: service-b
          servicePort: 80
```
