Skip to content

Commit 9bf08ee

Browse files
committed
feat: READ.md for directory and change path name for example of func ARN/URL
1 parent d747b5a commit 9bf08ee

File tree

10 files changed

+62
-32
lines changed

10 files changed

+62
-32
lines changed

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ start-03:
1111
docker-compose -f examples/03-one-lambda-function-url/docker-compose.yml up -d
1212

1313
start-04:
14-
docker-compose -f examples/04-lambda-function-arn-and-url/docker-compose.yml up -d
14+
docker-compose -f examples/04-lambda-function-arn-url/docker-compose.yml up -d
1515

1616
ps:
1717
docker ps --format "table {{.ID}}\t{{.Image}}\t{{.Ports}}\t{{.Names}}"
@@ -32,7 +32,7 @@ down-03:
3232
docker-compose -f examples/03-one-lambda-function-url/docker-compose.yml down
3333

3434
down-04:
35-
docker-compose -f examples/04-lambda-function-arn-and-url/docker-compose.yml down
35+
docker-compose -f examples/04-lambda-function-arn-url/docker-compose.yml down
3636

3737
clean:
3838
docker kill $$(docker ps -q) 2> /dev/null || true

README.md

+35-28
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,18 @@
22

33
## Introduction
44

5-
This project provides a working configuration of NGINX configured to act as an authenticating gateway for the AWS Lambda service. This allows you to proxy a private Lambda function without requiring users to authenticate to it. Within the proxy layer, additional functionality can be configured such as:
5+
This project provides a working configuration of NGINX configured to act as an authenticating gateway for the AWS Lambda service. This allows you to proxy a private Lambda function without requiring users to authenticate to it via AWS signature. Within the proxy layer, additional functionality can be configured such as:
66

7-
- Providing an authentication gateway using an alternative authentication
8-
system to Lambda functions
9-
- For internal/micro services that can't authenticate against the Lambda functions
7+
- Providing an AWS signature based authentication gateway using an alternative authentication
8+
system to AWS Lambda functions
9+
- For internal/micro services that can't authenticate against the AWS Lambda functions
1010
(e.g. don't have libraries available) the gateway can provide a means
1111
to accessing Lambda functions without authentication
1212
- Protecting Lambda functions from arbitrary public access and traversal
13-
- [Rate limiting](http://nginx.org/en/docs/http/ngx_http_limit_req_module.html) Lambda functions
14-
- Protecting Lambda functions with a [WAF](https://docs.nginx.com/nginx-waf/)
13+
- For internal/micro services that can't authenticate against the AWS Lambda functions
14+
- [Rate limiting](http://nginx.org/en/docs/http/ngx_http_limit_req_module.html) AWS Lambda functions
15+
- Authenticating users to authorize AWS Lambda functions with a [OIDC](https://github.com/nginx-openid-connect)
16+
- Protecting AWS Lambda functions with a [WAF](https://docs.nginx.com/nginx-waf/)
1517

1618
## Getting Started
1719

@@ -24,38 +26,37 @@ nginx-lambda-gateway
2426
|
2527
|-- common
2628
| |-- etc
27-
| | |-- nginx
28-
| | └─- ssl
29+
| | |-- nginx default nginx-lambda-gateway configuration
30+
| | └─- ssl contains certificates and NGINX Plus license
2931
| |-- lambda-core
30-
| | |-- awscredentials.js
31-
| | |-- awssig2.js
32-
| | |-- awssig4.js
33-
| | |-- lambda_ngx_apis.conf
34-
| | |-- lambda_ngx_http.conf
35-
| | |-- lambda_ngx_proxy.conf
36-
| | |-- lambdagateway.js
37-
| | └-- utils.js
38-
| └-- lambda-emulator
32+
| | |-- awscredentials.js common lib to read and write AWS credentials
33+
| | |-- awssig2.js common lib to build AWS signature v2
34+
| | |-- awssig4.js common lib to build AWS signature v4
35+
| | |-- lambdagateway.js common lib to integrate the Lambda from NGINX
36+
| | |-- lambda_ngx_apis.conf API endpoints config for nginx-lambda-gateway
37+
| | |-- lambda_ngx_http.conf common config under NGINX http directive
38+
| | |-- lambda_ngx_proxy.conf common config to be set before proxy_pass
39+
| | └-- utils.js common lib to be reused by all NJS codebases
40+
| └-- lambda-emulator proxy for Lambda Runtime API to locally test
3941
|
4042
|-- docker
41-
| |-- Dockerfile.oss
42-
| └-- Dockerfile.plus
43+
| |-- Dockerfile.oss for NGINX OSS to act as a Lambda gateway
44+
| └-- Dockerfile.plus for NGINX Plus to act as a Lambda gateway
4345
|
4446
|-- docker-compose.yml
47+
|-- settings.env Docker env file
4548
|
46-
|-- docs
49+
|-- docs contains documentation about the project
4750
|
4851
|-- examples
49-
| |-- 01-all-lambda-function-arns
50-
| |-- 02-one-lambda-function-arn
51-
| |-- 03-one-lambda-function-url
52-
| └-- 04-lambda-function-arn-and-url
52+
| |-- 01-all-lambda-function-arns NGINX proxy to all Lambda function ARNs
53+
| |-- 02-one-lambda-function-arn NGINX proxy to one Lambda function ARN
54+
| |-- 03-one-lambda-function-url NGINX proxy to one Lambda function URL
55+
| └-- 04-lambda-function-arn-url NGINX proxy to both Lambda function ARN/URL
5356
|
54-
|-- tests
57+
|-- tests test launcher and unit/integration test code
5558
|
56-
|-- Makefile
57-
|
58-
└-- settings.env
59+
└-- Makefile automate to build/start/stop lambda-gateway
5960
```
6061

6162
## Development
@@ -65,3 +66,9 @@ Refer to the [Development Guide](docs/development.md) for more information about
6566
## License
6667

6768
All code include is licensed under the [Apache 2.0 license](LICENSE.txt).
69+
70+
## Inspired Projects
71+
- [NGINX S3 Gateway](https://github.com/nginxinc/nginx-s3-gateway)
72+
- [NGINX AWS Signature](https://github.com/nginxinc/nginx-aws-signature)
73+
- [NGINX Plus OIDC Reference Implementation](https://github.com/nginxinc/nginx-openid-connect)
74+
- [NGINX OIDC Core and App Reference Implementation for ACM/NMS/NIC/N+](https://github.com/nginx-openid-connect)

docs/getting_started.md

+23
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,31 @@
11
# Getting Started Guide
22

3+
**TABLE OF CONTENTS:**
4+
- [Prerequisites](#prerequisites)
5+
- [Quick Starter with Running in Your Laptop](#quick-starter-with-running-in-your-laptop)
6+
- [Running as a Systemd Service](#running-as-a-systemd-service)
7+
- [Running in Containers](#running-in-containers)
8+
- [Running Using AWS Instance Profile Credentials](#running-using-aws-instance-profile-credentials)
9+
- [Troubleshooting](#troubleshooting)
10+
11+
## Prerequisites
312
- Create a AWS Lambda Function
13+
14+
## Quick Starter with Running in Your Laptop
15+
416
- Configure Environment Variables
517
- Start a NGINX Lambda Gateway
618
- Stop a NGINX Lambda Gateway
719
- Clean a NGINX Lambda Gateway Container Image
820

21+
## Running as a Systemd Service
22+
- TBD
23+
24+
## Running in Containers
25+
- TBD
26+
27+
## Running Using AWS Instance Profile Credentials
28+
- TBD
29+
30+
## Troubleshooting
31+
- TBD

examples/04-lambda-function-arn-and-url/docker-compose.yml renamed to examples/04-lambda-function-arn-url/docker-compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ services:
1212
# Enable this when using NGINX Plus
1313
# dockerfile: ./docker/Dockerfile.plus
1414
volumes:
15-
- ../../examples/04-lambda-function-arn-and-url/:/etc/nginx/conf.d/
15+
- ../../examples/04-lambda-function-arn-url/:/etc/nginx/conf.d/
1616
- ../../common/lambda-core:/etc/nginx/serverless
1717
ports:
1818
- "80:80"

examples/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
- [NGINX Lambda Gateway to all of the AWS Lambda Function ARNs](./01-all-lambda-function-arns/)
44
- [NGINX Lambda Gateway to one AWS Lambda Function ARN](./02-one-lambda-function-arn/)
55
- [NGINX Lambda Gateway to one AWS Lambda Function URL](./03-one-lambda-function-url/)
6-
- [NGINX Lambda Gateway to the AWS Lambda Function ARN and URL](./04-lambda-function-arn-and-url/)
6+
- [NGINX Lambda Gateway to the AWS Lambda Function ARN and URL](./04-lambda-function-arn-url/)

0 commit comments

Comments
 (0)