Skip to content

Commit a9978ca

Browse files
committed
chore: AWS env variables and introduction to nginx lambda gateway
1 parent 9d82ab7 commit a9978ca

File tree

9 files changed

+30
-10
lines changed

9 files changed

+30
-10
lines changed

README.md

+13-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,21 @@
22

33
## Introduction
44

5+
This project provides a working configuration of NGINX configured to act as an authenticating gateway for to 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:
6+
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
10+
(e.g. don't have libraries available) the gateway can provide a means
11+
to accessing Lambda functions without authentication
12+
- Protecting Lambda function from arbitrary public access and traversal
13+
- Rate limiting Lambda functions
14+
- Protecting Lambda functions with a [WAF](https://docs.nginx.com/nginx-waf/)
15+
16+
517
## Getting Started
618

7-
Refer to the [Getting Started Guide](docs/getting_started.md) for how to build
8-
and run the gateway.
19+
Refer to the [Getting Started Guide](docs/getting_started.md) for how to build and run the gateway.
920

1021
## Directory Structure and File Descriptions
1122

docker-compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ services:
1717
ports:
1818
- "80:80"
1919
env_file:
20-
- settings.test
20+
- settings.env

docs/development.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Development Guide

docs/getting_started.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Getting Started Guide
2+
3+
- Create a AWS Lambda Function
4+
- Configure Environment Variables
5+
- Start a NGINX Lambda Gateway
6+
- Stop a NGINX Lambda Gateway
7+
- Clean a NGINX Lambda Gateway Container Image
8+

examples/01-all-lambda-function-arns/docker-compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ services:
1717
ports:
1818
- "80:80"
1919
env_file:
20-
- ../../settings.test
20+
- ../../settings.env

examples/02-one-lambda-function-arn/docker-compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ services:
1717
ports:
1818
- "80:80"
1919
env_file:
20-
- ../../settings.test
20+
- ../../settings.env

examples/03-one-lambda-function-url/docker-compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ services:
1717
ports:
1818
- "80:80"
1919
env_file:
20-
- ../../settings.test
20+
- ../../settings.env

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ services:
1717
ports:
1818
- "80:80"
1919
env_file:
20-
- ../../settings.test
20+
- ../../settings.env

settings.env

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
AWS_ACCESS_KEY_ID=ZZZZZZZZZZZZZZZZZZZZ
2-
AWS_SECRET_ACCESS_KEY=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
3-
AWS_SESSION_TOKEN=bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
1+
AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
2+
AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
3+
AWS_SESSION_TOKEN=${AWS_SESSION_TOKEN}
44
DEBUG=false
55
HEADER_PREFIXES_TO_STRIP=false
66
LAMBDA_REGION=us-east-2

0 commit comments

Comments
 (0)