Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ankkho/aws-node-elasticache-vpc
Serverless function using elasticache (redis) within VPC
https://github.com/ankkho/aws-node-elasticache-vpc
aws-lambda elasticache lambda nat-instance redis serverless serverless-functions vpc
Last synced: 2 days ago
JSON representation
Serverless function using elasticache (redis) within VPC
- Host: GitHub
- URL: https://github.com/ankkho/aws-node-elasticache-vpc
- Owner: ankkho
- License: mit
- Created: 2017-05-02T05:55:39.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2022-12-22T10:41:27.000Z (about 2 years ago)
- Last Synced: 2023-08-03T13:45:31.247Z (over 1 year ago)
- Topics: aws-lambda, elasticache, lambda, nat-instance, redis, serverless, serverless-functions, vpc
- Language: JavaScript
- Homepage:
- Size: 1.77 MB
- Stars: 23
- Watchers: 2
- Forks: 5
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![serverless](http://public.serverless.com/badges/v3.svg)](http://www.serverless.com)
# aws-node-elasticache-vpc
> A set of serverless functions using elasticache (redis) within VPC---
### Getting Started
In order to install and run this example you need an AWS accounts credentials configured with your system. To get started with AWS account configuration, please follow this [link](https://serverless.com/framework/docs/providers/aws/guide/credentials/)
1. Clone aws-node-elasticache-vpc and install npm packages
```
git clone [email protected]:ankkho/aws-node-elasticache-vpc.git
cd aws-node-elasticache-vpc
npm install
export REGION='your-desired-aws-region' eg: 'ap-south-1'
```*NOTE*
> Before you run `sls deploy`. Comment line number 17 and from 28-34. Else you'll get an error, since serverless try to fetch (elasticache and vpc) resources which are not currently present.> Once deployment is done uncomment those lines and run `sls deploy` once again.
*Deploy using sls deploy*
```
sls deploy
```### Warning
> NAT Gateway is included in CF template, but it's not included in AWS Free Tier. You will be charged for using NAT Gateway.Instead of using NAT Gateway you can use NAT Instance. A NAT Instance allows you to use ec2 instance with NAT image provided by AWS. [Check out docs](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_NAT_Instance.html#basics).
### Folder Structure
> functions -- contains all business logic required for a function
> handler.js -- lambda handler
> lib -- acts as middleware. You can perform following types of operations:
schema validation, check users role (if any) etc..