Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hgschandeepa/aws-lambda-and-api-gateway-tutorial-codes
All Codes for the AWS Lanbda and API Gateway tutorial
https://github.com/hgschandeepa/aws-lambda-and-api-gateway-tutorial-codes
Last synced: 2 days ago
JSON representation
All Codes for the AWS Lanbda and API Gateway tutorial
- Host: GitHub
- URL: https://github.com/hgschandeepa/aws-lambda-and-api-gateway-tutorial-codes
- Owner: HGSChandeepa
- Created: 2024-09-12T17:26:58.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-09-12T17:39:10.000Z (2 months ago)
- Last Synced: 2024-09-14T02:44:09.323Z (2 months ago)
- Language: JavaScript
- Size: 23.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AWS Lambda And API Gateway Full Tutorial For Beginners and Intermediates
This repository contains an AWS Lambda function that connects to MongoDB to retrieve usage plans based on an API key. The function is secured using API Gateway, which restricts access through API keys and usage plans.
## Features
- Connects to MongoDB.
- Retrieves usage plans based on API keys.
- Secured with API Gateway and usage plans.## Prerequisites
- AWS Account
- Node.js (20.x or higher)
- MongoDB Atlas account (or local MongoDB instance)
- AWS CLI configured## API Gateway Setup
1. Create an API in API Gateway.
2. Link the Lambda function to an endpoint.
3. Enable API key requirement for the endpoint.
4. Create usage plans and associate them with API keys.## Usage
Send a POST request to the endpoint with the API key in the request body. The function will return the corresponding usage plan or an error message.
## Testing
You can test the function using the AWS Lambda console or tools like Postman.
## Contributing
Contributions are welcome! Feel free to open an issue or submit a pull request.
## License
This project is licensed under the MIT License.