Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dabit3/api-gateway-lambda-in-various-runtimes
Examples of serverless Lambda functions integrated with API Gateway and CORS enabled
https://github.com/dabit3/api-gateway-lambda-in-various-runtimes
aws cors dotnet golang java serverless
Last synced: about 1 month ago
JSON representation
Examples of serverless Lambda functions integrated with API Gateway and CORS enabled
- Host: GitHub
- URL: https://github.com/dabit3/api-gateway-lambda-in-various-runtimes
- Owner: dabit3
- Created: 2020-04-07T21:58:57.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-04-10T20:49:51.000Z (over 4 years ago)
- Last Synced: 2023-08-03T20:12:54.249Z (over 1 year ago)
- Topics: aws, cors, dotnet, golang, java, serverless
- Language: C#
- Size: 5.86 KB
- Stars: 18
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Examples of various Lambda function integrations with API Gateway and CORS enabled
Why? When working with Lambda functions, there are various different things to take into consideration.
- Is this function being invoked from an HTTP trigger?
- Is this function using API Gateway?
- Are you calling this function from a client-side application?
- Are you running into CORS issues when fetching data from your Lambda function?If you answered yes to these questions, then these copy-paste examples should help you to get up and running with many of the most popular runtimes.
Here are the supported runtimes that I will be creating examples for:
### Go
[main.go](https://github.com/dabit3/api-gateway-lambda-in-various-runtimes/blob/master/main.go)
### Python
[index.py](https://github.com/dabit3/api-gateway-lambda-in-various-runtimes/blob/master/index.py)
### .Net
[handler.cs](https://github.com/dabit3/api-gateway-lambda-in-various-runtimes/blob/master/handler.cs)
### NodeJS / JavaScript
[index.js](https://github.com/dabit3/api-gateway-lambda-in-various-runtimes/blob/master/index.js)
### Java
[handler.java](https://github.com/dabit3/api-gateway-lambda-in-various-runtimes/blob/master/handler.java)
Check out [this serverless example](https://github.com/serverless/examples/tree/master/aws-java-simple-http-endpoint) for a full Java implementation
## More examples
For more examples of Lambda integrations in different languages, check out the [Serverless Examples](https://github.com/serverless/examples)