|
1 | 1 | [](http://www.serverless.com) |
2 | 2 |
|
3 | | -# aws-node-elasticache-redis |
| 3 | +# aws-node-elasticache-vpc |
4 | 4 | > A set of serverless functions using elasticache (redis) within VPC |
5 | 5 |
|
6 | 6 | --- |
|
9 | 9 |
|
10 | 10 | 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/) |
11 | 11 |
|
12 | | -1. Clone aws-node-elasticache-redis and install npm packages |
| 12 | +1. Clone aws-node-elasticache-vpc and install npm packages |
13 | 13 | ``` |
14 | | -git clone [email protected]:ankkho/aws-node-elasticache-redis.git |
15 | | -cd aws-node-elasticache-redis |
| 14 | +git clone [email protected]:ankkho/aws-node-elasticache-vpc.git |
| 15 | +cd aws-node-elasticache-vpc |
16 | 16 | npm install |
17 | 17 | export REGION='your-desired-aws-region' eg: 'ap-south-1' |
18 | 18 | ``` |
19 | 19 |
|
20 | | -> Comment from line number 17 to 24. Else you'll get an error, since serverless tires to fetch those resources which are not been present yet. |
| 20 | +*NOTE* |
| 21 | +> 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. |
21 | 22 |
|
22 | | -> Once you run `sls deploy`, then uncomment those lines and run `sls deploy` once again. |
| 23 | +> Once deployment is done uncomment those lines and run `sls deploy` once again. |
23 | 24 |
|
24 | 25 | *Deploy using sls deploy* |
25 | 26 | ``` |
26 | | -sls deploy --stage <any stage> --region <your region> |
| 27 | +sls deploy |
27 | 28 | ``` |
28 | 29 |
|
29 | 30 | ### Folder Structure |
30 | 31 |
|
31 | | -functions -- contains all business logic required for a function |
| 32 | +> functions -- contains all business logic required for a function |
32 | 33 |
|
33 | | -handler.js -- lambda handler |
| 34 | +> handler.js -- lambda handler |
34 | 35 |
|
35 | | -lib -- acts as middleware. You can perform following operations: schema validations, checking user roles (if any) etc.. |
| 36 | +> lib -- acts as middleware. You can perform following types of operations: |
| 37 | + schema validation, check users role (if any) etc.. |
0 commit comments