-
Notifications
You must be signed in to change notification settings - Fork 4.7k
/
aws_lambda.proto
74 lines (60 loc) · 3.41 KB
/
aws_lambda.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
syntax = "proto3";
package envoy.extensions.filters.http.aws_lambda.v3;
import "udpa/annotations/status.proto";
import "udpa/annotations/versioning.proto";
import "validate/validate.proto";
option java_package = "io.envoyproxy.envoy.extensions.filters.http.aws_lambda.v3";
option java_outer_classname = "AwsLambdaProto";
option java_multiple_files = true;
option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/aws_lambda/v3;aws_lambdav3";
option (udpa.annotations.file_status).package_version_status = ACTIVE;
// [#protodoc-title: AWS Lambda]
// AWS Lambda :ref:`configuration overview <config_http_filters_aws_lambda>`.
// [#extension: envoy.filters.http.aws_lambda]
// AWS Lambda filter config
// [#next-free-field: 6]
message Config {
option (udpa.annotations.versioning).previous_message_type =
"envoy.config.filter.http.aws_lambda.v2alpha.Config";
enum InvocationMode {
// This is the more common mode of invocation, in which Lambda responds after it has completed the function. In
// this mode the output of the Lambda function becomes the response of the HTTP request.
SYNCHRONOUS = 0;
// In this mode Lambda responds immediately but continues to process the function asynchronously. This mode can be
// used to signal events for example. In this mode, Lambda responds with an acknowledgment that it received the
// call which is translated to an HTTP 200 OK by the filter.
ASYNCHRONOUS = 1;
}
// The ARN of the AWS Lambda to invoke when the filter is engaged
// Must be in the following format:
// arn:<partition>:lambda:<region>:<account-number>:function:<function-name>
string arn = 1 [(validate.rules).string = {min_len: 1}];
// Whether to transform the request (headers and body) to a JSON payload or pass it as is.
bool payload_passthrough = 2;
// Determines the way to invoke the Lambda function.
InvocationMode invocation_mode = 3 [(validate.rules).enum = {defined_only: true}];
// Indicates that before signing headers, the host header will be swapped with
// this value. If not set or empty, the original host header value
// will be used and no rewrite will happen.
//
// Note: this rewrite affects both signing and host header forwarding. However, this
// option shouldn't be used with
// :ref:`HCM host rewrite <envoy_v3_api_field_config.route.v3.RouteAction.host_rewrite_literal>` given that the
// value set here would be used for signing whereas the value set in the HCM would be used
// for host header forwarding which is not the desired outcome.
// Changing the value of the host header can result in a different route to be selected
// if an HTTP filter after AWS lambda re-evaluates the route (clears route cache).
string host_rewrite = 4;
// Specifies the credentials profile to be used from the AWS credentials file.
// This parameter is optional. If set, it will override the value set in the AWS_PROFILE env variable and
// the provider chain is limited to the AWS credentials file Provider.
// Other providers are ignored
string credentials_profile = 5;
}
// Per-route configuration for AWS Lambda. This can be useful when invoking a different Lambda function or a different
// version of the same Lambda depending on the route.
message PerRouteConfig {
option (udpa.annotations.versioning).previous_message_type =
"envoy.config.filter.http.aws_lambda.v2alpha.PerRouteConfig";
Config invoke_config = 1;
}