-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update register factory * create path just once * add iam support for AWS; no tests yet * updated code and tests * add missing test file + integration test * update e2e test * test invoking the timer callback * add stats * PR Comments
- Loading branch information
1 parent
646b993
commit fb35a70
Showing
19 changed files
with
771 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
107 changes: 107 additions & 0 deletions
107
e2e/extensions/filters/http/aws_lambda/create_config_env.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
#!/bin/bash | ||
# | ||
|
||
set -e | ||
|
||
# # create function if doesnt exist | ||
# aws lambda create-function --function-name captialize --runtime nodejs | ||
# invoke | ||
# aws lambda invoke --function-name uppercase --payload '"abc"' /dev/stdout | ||
|
||
|
||
# prepare envoy config file. | ||
|
||
cat > envoy_env.yaml << EOF | ||
admin: | ||
access_log_path: /dev/stdout | ||
address: | ||
socket_address: | ||
address: 127.0.0.1 | ||
port_value: 19001 | ||
static_resources: | ||
listeners: | ||
- name: listener_0 | ||
address: | ||
socket_address: { address: 127.0.0.1, port_value: 10001 } | ||
filter_chains: | ||
- filters: | ||
- name: envoy.http_connection_manager | ||
config: | ||
stat_prefix: http | ||
codec_type: AUTO | ||
route_config: | ||
name: local_route | ||
virtual_hosts: | ||
- name: local_service | ||
domains: ["*"] | ||
routes: | ||
- match: | ||
prefix: /echo | ||
route: | ||
cluster: postman-echo | ||
prefix_rewrite: /post | ||
- match: | ||
prefix: /lambda | ||
route: | ||
cluster: aws-us-east-1-lambda | ||
per_filter_config: | ||
io.solo.aws_lambda: | ||
name: uppercase | ||
qualifier: "1" | ||
- match: | ||
prefix: /latestlambda | ||
route: | ||
cluster: aws-us-east-1-lambda | ||
per_filter_config: | ||
io.solo.aws_lambda: | ||
name: uppercase | ||
qualifier: "%24LATEST" | ||
- match: | ||
prefix: /contact-empty-default | ||
route: | ||
cluster: aws-us-east-1-lambda | ||
per_filter_config: | ||
io.solo.aws_lambda: | ||
name: uppercase | ||
qualifier: "1" | ||
empty_body_override: "\"default-body\"" | ||
- match: | ||
prefix: /contact | ||
route: | ||
cluster: aws-us-east-1-lambda | ||
per_filter_config: | ||
io.solo.aws_lambda: | ||
name: contact-form | ||
qualifier: "3" | ||
http_filters: | ||
- name: io.solo.aws_lambda | ||
config: | ||
use_default_credentials: true | ||
- name: envoy.router | ||
clusters: | ||
- connect_timeout: 5.000s | ||
hosts: | ||
- socket_address: | ||
address: postman-echo.com | ||
port_value: 443 | ||
name: postman-echo | ||
type: LOGICAL_DNS | ||
tls_context: {} | ||
- connect_timeout: 5.000s | ||
hosts: | ||
- socket_address: | ||
address: lambda.us-east-1.amazonaws.com | ||
port_value: 443 | ||
name: aws-us-east-1-lambda | ||
type: LOGICAL_DNS | ||
dns_lookup_family: V4_ONLY | ||
tls_context: {} | ||
extension_protocol_options: | ||
io.solo.aws_lambda: | ||
host: lambda.us-east-1.amazonaws.com | ||
region: us-east-1 | ||
EOF | ||
|
||
|
||
export AWS_ACCESS_KEY_ID=$(grep aws_access_key_id ~/.aws/credentials | head -1 | cut -d= -f2 |tr -d '[:space:]') | ||
export AWS_SECRET_ACCESS_KEY=$(grep aws_secret_access_key ~/.aws/credentials | head -1 | cut -d= -f2 |tr -d '[:space:]') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.