membphis commented on a change in pull request #5594:
URL: https://github.com/apache/apisix/pull/5594#discussion_r758345571
##########
File path: t/admin/plugins.t
##########
@@ -40,7 +40,7 @@ __DATA__
--- request
GET /apisix/admin/plugins/list
--- response_body_like eval
-qr/\["real-ip","client-control","ext-plugin-pre-req","zipkin","request-id","fault-injection","serverless-pre-function","batch-requests","cors","ip-restriction","ua-restriction","referer-restriction","uri-blocker","request-validation","openid-connect","authz-casbin","wolf-rbac","ldap-auth","hmac-auth","basic-auth","jwt-auth","key-auth","consumer-restriction","authz-keycloak","proxy-mirror","proxy-cache","proxy-rewrite","api-breaker","limit-conn","limit-count","limit-req","gzip","server-info","traffic-split","redirect","response-rewrite","grpc-transcode","prometheus","datadog","echo","http-logger","skywalking-logger","google-cloud-logging","sls-logger","tcp-logger","kafka-logger","syslog","udp-logger","example-plugin","azure-functions","openwhisk","serverless-post-function","ext-plugin-post-req"\]/
+qr/\["real-ip","client-control","ext-plugin-pre-req","zipkin","request-id","fault-injection","serverless-pre-function","batch-requests","cors","ip-restriction","ua-restriction","referer-restriction","uri-blocker","request-validation","openid-connect","authz-casbin","wolf-rbac","ldap-auth","hmac-auth","basic-auth","jwt-auth","key-auth","consumer-restriction","authz-keycloak","proxy-mirror","proxy-cache","proxy-rewrite","api-breaker","limit-conn","limit-count","limit-req","gzip","server-info","traffic-split","redirect","response-rewrite","grpc-transcode","prometheus","datadog","echo","http-logger","skywalking-logger","google-cloud-logging","sls-logger","tcp-logger","kafka-logger","syslog","udp-logger","example-plugin","aws-lambda","azure-functions","openwhisk","serverless-post-function","ext-plugin-post-req"\]/
Review comment:
Yes, It's time to modify this to another easy-to-read format.
##########
File path: docs/en/latest/plugins/aws-lambda.md
##########
@@ -0,0 +1,156 @@
+---
+title: aws-lambda
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## Summary
+
+- [Summary](#summary)
+- [Name](#name)
+- [Attributes](#attributes)
+ - [IAM Authorization Schema](#iam-authorization-schema)
+- [How To Enable](#how-to-enable)
+- [Disable Plugin](#disable-plugin)
+
+## Name
+
+`aws-lambda` is a serverless plugin built into Apache APISIX for seamless
integration with [AWS Lambda](https://aws.amazon.com/lambda/), a widely used
serverless solution, as a dynamic upstream to proxy all requests for a
particular URI to the AWS cloud - one of the highly used public cloud platforms
for production environment. If enabled, this plugin terminates the ongoing
request to that particular URI and initiates a new request to the aws lambda
gateway uri (the new upstream) on behalf of the client with the suitable
authorization details set by the users, request headers, request body, params (
all these three components are passed from the original request ) and returns
the response body, status code and the headers back to the original client that
has invoked the request to the APISIX agent.
+At present, the plugin supports authorization via aws api key and aws IAM
Secrets.
+
+## Attributes
+
+| Name | Type | Requirement | Default | Valid |
Description
|
+| ----------- | ------ | ----------- | ------- | ----- |
------------------------------------------------------------
|
+| function_uri | string | required | | | The aws api
gateway endpoint which triggers the lambda serverless function code. |
+| authorization | object | optional | | | Authorization
credentials to access the cloud function.
|
+| authorization.apikey | string | optional | | | Field
inside _authorization_. The generate API Key to authorize requests to that
endpoint of the aws gateway. | |
+| authorization.iam | object | optional | | | Field inside
_authorization_. AWS IAM role based authorization, performed via aws v4 request
signing. See schema details below ([here](#iam-authorization-schema)). |
|
+| timeout | integer | optional | 3000 | [100,...] | Proxy
request timeout in milliseconds. |
+| ssl_verify | boolean | optional | true | true/false | If
enabled performs SSL verification of the server. |
+| keepalive | boolean | optional | true | true/false | To
reuse the same proxy connection in near future. Set to false to disable
keepalives and immediately close the connection. |
+| keepalive_pool | integer | optional | 5 | [1,...] | The
maximum number of connections in the pool. |
+| keepalive_timeout | integer | optional | 60000 | [1000,...]
| The maximal idle timeout (ms). |
+
+### IAM Authorization Schema
+
+| Name | Type | Requirement | Default | Valid |
Description
|
+| ----------- | ------ | ----------- | ------- | ----- |
------------------------------------------------------------
|
+| accesskey | string | required | | |
Genereated access key ID from aws IAM console.
|
+| secret_key | string | required | | |
Genereated access key secret from aws IAM console.
|
+| aws_region | string | optional | "us-east-1" | |
The aws region where the request is being sent.
|
+| service | string | optional | "execute-api" | |
The service that is receiving the request (In case of Http Trigger it is
"execute-api"). |
+
+## How To Enable
+
+The following is an example of how to enable the aws-lambda faas plugin for a
specific route URI. Calling the apisix route uri will make an invocation to the
lambda function uri (the new upstream). We are assuming your cloud function is
already up and running.
Review comment:
We should use `APISIX` always
##########
File path: docs/en/latest/plugins/aws-lambda.md
##########
@@ -0,0 +1,156 @@
+---
+title: aws-lambda
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## Summary
+
+- [Summary](#summary)
+- [Name](#name)
+- [Attributes](#attributes)
+ - [IAM Authorization Schema](#iam-authorization-schema)
+- [How To Enable](#how-to-enable)
+- [Disable Plugin](#disable-plugin)
+
+## Name
+
+`aws-lambda` is a serverless plugin built into Apache APISIX for seamless
integration with [AWS Lambda](https://aws.amazon.com/lambda/), a widely used
serverless solution, as a dynamic upstream to proxy all requests for a
particular URI to the AWS cloud - one of the highly used public cloud platforms
for production environment. If enabled, this plugin terminates the ongoing
request to that particular URI and initiates a new request to the aws lambda
gateway uri (the new upstream) on behalf of the client with the suitable
authorization details set by the users, request headers, request body, params (
all these three components are passed from the original request ) and returns
the response body, status code and the headers back to the original client that
has invoked the request to the APISIX agent.
+At present, the plugin supports authorization via aws api key and aws IAM
Secrets.
+
+## Attributes
+
+| Name | Type | Requirement | Default | Valid |
Description
|
+| ----------- | ------ | ----------- | ------- | ----- |
------------------------------------------------------------
|
+| function_uri | string | required | | | The aws api
gateway endpoint which triggers the lambda serverless function code. |
+| authorization | object | optional | | | Authorization
credentials to access the cloud function.
|
+| authorization.apikey | string | optional | | | Field
inside _authorization_. The generate API Key to authorize requests to that
endpoint of the aws gateway. | |
+| authorization.iam | object | optional | | | Field inside
_authorization_. AWS IAM role based authorization, performed via aws v4 request
signing. See schema details below ([here](#iam-authorization-schema)). |
|
+| timeout | integer | optional | 3000 | [100,...] | Proxy
request timeout in milliseconds. |
+| ssl_verify | boolean | optional | true | true/false | If
enabled performs SSL verification of the server. |
Review comment:
if the `ssl_verify` is true, do we need to specify a certificate?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]