currently I m trying to add aws-lambda plugin to existing EKS which uses Kong helmchart as an API gateway.
I already made a CRD for Kong plugin
apiVersion: configuration.konghq.com/v1
kind: KongPlugin
metadata:
name: aws-lambda-example
plugin: aws-lambda
config:
aws_key: xxx
aws_secret: xxxx
aws_region: xxxx
function_name: test-lambda
forward_request_body: true
forward_request_headers: true
forward_request_uri: true
The project already had an ingress with the path of /*
annotations:
alb.ingress.kubernetes.io/conditions.rule-path2: |
[{"field":"path-pattern","pathPatternConfig":{"values":["/*"]}}]
spec:
rules:
- host: xxxxx
http:
paths:
- path: /*
pathType: ImplementationSpecific
backend:
service:
name: kong-gw-ingress-gateway-proxy
port:
number: 443
Because the lambda function only has some routes, I try to create another ingress with the following spec
annotations:
konghq.com/plugins: aws-lambda-example <--- apply the Kong plugin
alb.ingress.kubernetes.io/conditions.rule-path2: |
[{"field":"path-pattern","pathPatternConfig":{"values":["/lambda"]}}]
spec:
rules:
- host: xxxxx
http:
paths:
- path: /lambda
pathType: ImplementationSpecific
backend:
service:
name: kong-gw-ingress-gateway-proxy
port:
number: 443
I applied to the the cluster and got no error event
but when I try to call mydomain/lambda I get the following error.
Kong Error no Route matched with those values.
the other routes(non aws-lambda routes) are still working file
why doesn t it receive the /lambda
path and pass to the lambda function?