Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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
```