https://github.com/greenvine/lambda-http-proxy
Lambda HTTP Proxy Server
https://github.com/greenvine/lambda-http-proxy
aws-lambda http proxy-server
Last synced: 2 months ago
JSON representation
Lambda HTTP Proxy Server
- Host: GitHub
- URL: https://github.com/greenvine/lambda-http-proxy
- Owner: GreenVine
- Created: 2018-05-28T04:35:59.000Z (almost 8 years ago)
- Default Branch: develop
- Last Pushed: 2018-05-28T04:43:37.000Z (almost 8 years ago)
- Last Synced: 2024-12-30T16:53:22.745Z (over 1 year ago)
- Topics: aws-lambda, http, proxy-server
- Language: TypeScript
- Size: 54.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Lambda HTTP Proxy
An [AWS Lambda](https://aws.amazon.com/lambda/) function with Serverless integration that enables you proxy your HTTP/S requests through [API Gateway](https://aws.amazon.com/api-gateway/).
## Usage
(TBC)
## Environment Variables
```bash
export API_DOMAIN=proxy.example.com # API Gateway Endpoint Domain
export AWS_REGION=us-west-2 # Deployment Region
export API_CERT_NAME=*.example.com # API Certificate Name (Best match)
# Stage name
export API_STAGE=v1
```
## Deployment
### SSL Certificate
The environment variable `API_CERT_NAME` specifies the certificate name for API Gateway custom domain. The Serverless plugin will do the best-match over this name. Refer to [serverless-domain-manager plugin documentation](https://github.com/amplify-education/serverless-domain-manager) for detailed guidance.
### Custom Domain
#### Set up
To set up the custom domain for API Gateway, simply run `yarn run sls create_domain` once.
In addition, please note that this command cannot modify the existing custom domain that created by other means, through e.g. AWS Console, API.
Sample Output:
`
Serverless: 'proxy.example.com' was created/updated. New domains may take up to 40 minutes to be initialized.
`
#### Tear Down
To remove the custom domain, run `yarn run sls delete_domain` once.
### Deploy Project
To deploy or update the project, run `yarn run sls deploy`.
### Destroy Project
:warning: To destroy all resources, run `yarn run sls remove`. **Be careful when running this command towards a production stage name**.
## References
### AWS as the Provider
- [Quick Start Guide](https://serverless.com/framework/docs/providers/aws/guide/quick-start/)
- Serverless Config: [serverless.yml](https://serverless.com/framework/docs/providers/aws/guide/serverless.yml)
- [API Gateway Events](https://serverless.com/framework/docs/providers/aws/events/apigateway)