You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "kayx23 (via GitHub)" <gi...@apache.org> on 2024/08/01 09:55:55 UTC

[I] request help: how to configure route without upstream (`aws-lambda` plugin) [apisix-ingress-controller]

kayx23 opened a new issue, #2271:
URL: https://github.com/apache/apisix-ingress-controller/issues/2271

   ### Issue description
   
   An upstream is not required when using `aws-lambda` plugin. See:
   
   * https://apisix.apache.org/docs/apisix/plugins/aws-lambda/#enable-plugin
   * https://docs.api7.ai/apisix/how-to-guide/ai-gateway/proxy-amazon-bedrock-requests#configure-apisix
   
   With ingress controller, if you attempt to apply the following config:
   
   ```yaml
   apiVersion: apisix.apache.org/v2
   kind: ApisixRoute
   metadata:
     name: aws-lambda-route
   spec:
     http:
       - name: aws-lambda-route
         match:
           paths:
             - /something
         plugins:
         - name: aws-lambda
           enable: true
           config:
             function_uri: https://xxx.com
             authorization:
               iam:
                 accesskey: xxx
                 secretkey: xxx
                 aws_region: us-east-2
                 service: lambda
             timeout: 30000
             ssl_verify: false
   ```
   
   You get the a schema check error:
   
   ```text
   The ApisixRoute "aws-lambda-route" is invalid: 
   * <nil>: Invalid value: "": "spec.http[0]" must validate at least one schema (anyOf)
   * spec.http[0].backends: Required value
   ```
   
   What I have also attempted is to set an `upstreams`:
   
   ```yaml
   apiVersion: apisix.apache.org/v2
   kind: ApisixRoute
   metadata:
     name: aws-lambda-route
   spec:
     http:
       - name: aws-lambda-route
         match:
           paths:
             - /something
         upstreams:
         - name: https-upstream
         plugins:
         - name: aws-lambda
           enable: true
           config:
             function_uri: https://xxx.com
             authorization:
               iam:
                 accesskey: xxx
                 secretkey: xxx
                 aws_region: us-east-2
                 service: lambda
             timeout: 30000
             ssl_verify: false
   ---
   apiVersion: apisix.apache.org/v2
   kind: ApisixUpstream
   metadata:
     name: https-upstream
   spec:
     scheme: https
     loadbalancer:
       type: roundrobin
   ```
   
   With this you do get around the schema check but you would see an `empty ExternalNodes or Discovery configuration` error in the ingress controller log:
   
   ```
   2024-08-01T17:39:26+08:00	error	translation/apisix_route.go:243	failed to translate ApisixUpstream at Upstream[0]	{"error": "default/https-upstream has empty ExternalNodes or Discovery configuration", "apisix_upstream": "default/amazon-bedrock-upstream"}
   ```
   
   So what should be the right way to configure `aws-lambda` on a route that does not require an upstream? Or is this scenario something ingress controller schema should accommodate for?
   
   Note: `aws-lambda` plugin does not have test coverage in this repo as of now.
   
   ### Environment
   
   - your apisix-ingress-controller version (output of apisix-ingress-controller version --long): 1.8.0
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] request help: how to configure route without upstream (`aws-lambda` plugin) [apisix-ingress-controller]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #2271: request help: how to configure route without upstream (`aws-lambda` plugin)
URL: https://github.com/apache/apisix-ingress-controller/issues/2271


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] request help: how to configure route without upstream (`aws-lambda` plugin) [apisix-ingress-controller]

Posted by "kayx23 (via GitHub)" <gi...@apache.org>.
kayx23 closed issue #2271: request help: how to configure route without upstream (`aws-lambda` plugin)
URL: https://github.com/apache/apisix-ingress-controller/issues/2271


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] request help: how to configure route without upstream (`aws-lambda` plugin) [apisix-ingress-controller]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #2271:
URL: https://github.com/apache/apisix-ingress-controller/issues/2271#issuecomment-2448819771

   This issue has been marked as stale due to 90 days of inactivity. It will be closed in 30 days if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the dev@apisix.apache.org list. Thank you for your contributions.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] request help: how to configure route without upstream (`aws-lambda` plugin) [apisix-ingress-controller]

Posted by "kayx23 (via GitHub)" <gi...@apache.org>.
kayx23 commented on issue #2271:
URL: https://github.com/apache/apisix-ingress-controller/issues/2271#issuecomment-3177723535

   The latest release has addressed this issue, thanks.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] request help: how to configure route without upstream (`aws-lambda` plugin) [apisix-ingress-controller]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #2271: request help: how to configure route without upstream (`aws-lambda` plugin)
URL: https://github.com/apache/apisix-ingress-controller/issues/2271


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] request help: how to configure route without upstream (`aws-lambda` plugin) [apisix-ingress-controller]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #2271:
URL: https://github.com/apache/apisix-ingress-controller/issues/2271#issuecomment-2692504146

   This issue has been marked as stale due to 90 days of inactivity. It will be closed in 30 days if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the dev@apisix.apache.org list. Thank you for your contributions.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] request help: how to configure route without upstream (`aws-lambda` plugin) [apisix-ingress-controller]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #2271:
URL: https://github.com/apache/apisix-ingress-controller/issues/2271#issuecomment-2767804060

   This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] request help: how to configure route without upstream (`aws-lambda` plugin) [apisix-ingress-controller]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #2271:
URL: https://github.com/apache/apisix-ingress-controller/issues/2271#issuecomment-3021375714

   This issue has been marked as stale due to 90 days of inactivity. It will be closed in 30 days if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the dev@apisix.apache.org list. Thank you for your contributions.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] request help: how to configure route without upstream (`aws-lambda` plugin) [apisix-ingress-controller]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #2271:
URL: https://github.com/apache/apisix-ingress-controller/issues/2271#issuecomment-2508775461

   This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] request help: how to configure route without upstream (`aws-lambda` plugin) [apisix-ingress-controller]

Posted by "kayx23 (via GitHub)" <gi...@apache.org>.
kayx23 commented on issue #2271:
URL: https://github.com/apache/apisix-ingress-controller/issues/2271#issuecomment-2768022344

   still relevant


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] request help: how to configure route without upstream (`aws-lambda` plugin) [apisix-ingress-controller]

Posted by "Revolyssup (via GitHub)" <gi...@apache.org>.
Revolyssup commented on issue #2271:
URL: https://github.com/apache/apisix-ingress-controller/issues/2271#issuecomment-2262705800

   I see this plugin terminates the original request. So doesn't matter what the upstream is. Creating ApisixRoute creates an upstream automatically so it still requires backend field to be configured. 
   As a workaroud, you can configure an externalservice as the same URL and use that as backend. Though that upstream won't be used. But currently ingress controller doesn't support creating ApisixRoute with upstream.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] request help: how to configure route without upstream (`aws-lambda` plugin) [apisix-ingress-controller]

Posted by "Revolyssup (via GitHub)" <gi...@apache.org>.
Revolyssup commented on issue #2271:
URL: https://github.com/apache/apisix-ingress-controller/issues/2271#issuecomment-2262689253

   https://github.com/apache/apisix-ingress-controller/blob/bbcd8d9e24ea40e168df416bd69cd0f4f9603cc5/test/e2e/suite-features/external-service.go#L258 Refer to this test case


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] request help: how to configure route without upstream (`aws-lambda` plugin) [apisix-ingress-controller]

Posted by "kayx23 (via GitHub)" <gi...@apache.org>.
kayx23 commented on issue #2271:
URL: https://github.com/apache/apisix-ingress-controller/issues/2271#issuecomment-2262716507

   > As a workaroud, you can configure an externalservice as the same URL and use that as backend. 
   
   Adopting this workaround for now and keeping this issue to track future actions (if any).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] request help: how to configure route without upstream (`aws-lambda` plugin) [apisix-ingress-controller]

Posted by "Baoyuantop (via GitHub)" <gi...@apache.org>.
Baoyuantop commented on issue #2271:
URL: https://github.com/apache/apisix-ingress-controller/issues/2271#issuecomment-3177541595

   Hi @kayx23, after verifying on the latest version, I did not see this problem. You can confirm again.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org