Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hisdream86/nginx-sqs-proxy
A simple nginx proxy to enqueue the HTTP body data from your client to the AWS SQS
https://github.com/hisdream86/nginx-sqs-proxy
lua nginx proxy sqs
Last synced: about 14 hours ago
JSON representation
A simple nginx proxy to enqueue the HTTP body data from your client to the AWS SQS
- Host: GitHub
- URL: https://github.com/hisdream86/nginx-sqs-proxy
- Owner: hisdream86
- Created: 2023-10-07T00:47:29.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-07T08:34:59.000Z (about 1 year ago)
- Last Synced: 2023-10-08T02:29:29.998Z (about 1 year ago)
- Topics: lua, nginx, proxy, sqs
- Language: Lua
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# nginx-sqs-proxy
This sample describes the way to implement a simple nginx proxy to enqueue the HTTP body data from your client to the AWS SQS. If you use the standard type of SQS, this proxy can handle a ton of requests with a small number of CPUs.
## Build
```bash
$ docker build -t nginx-sqs-proxy .
```## Run
```bash
$ docker run -p :80 \
-e AWS_ACCOUNT_ID= \
-e QUEUE_NAME= \
-e AWS_REGION= \
-e AWS_ACCESS_KEY_ID= \
-e AWS_SECRET_ACCESS_KEY= \
-e AWS_ROLE_ARN= \
-e AWS_WEB_IDENTITY_TOKEN_FILE=$AWS_WEB_IDENTITY_TOKEN_FILE \
nginx-sqs-proxy
```Example 1) Run a container with AWS access key and secret
```bash
$ docker run -p 8001:80 \
-e AWS_ACCOUNT_ID=000000000000 \
-e QUEUE_NAME=my-test-queue \
-e AWS_REGION=us-west-2 \
-e AWS_ACCESS_KEY_ID=XXXXXXXXX \
-e AWS_SECRET_ACCESS_KEY=XXXXXXXXXXXX \
nginx-sqs-proxy
```Example 2) Run a container using IAM assume role
```bash
$ docker run -p 8001:80 \
-e AWS_ACCOUNT_ID=000000000000 \
-e QUEUE_NAME=my-test-queue \
-e AWS_REGION=us-west-2 \
-e AWS_ROLE_ARN=arn:aws:iam::000000000000:role/my-test-role \
-e AWS_WEB_IDENTITY_TOKEN_FILE=$AWS_WEB_IDENTITY_TOKEN_FILE \
nginx-sqs-proxy
```