Skip to content

Commit ceaf4c4

Browse files
authored
Merge pull request #2 from GiDW/develop
Develop
2 parents b915f8c + 349e60a commit ceaf4c4

File tree

9 files changed

+1531
-8
lines changed

9 files changed

+1531
-8
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@ $RECYCLE.BIN/
131131

132132
.idea
133133

134+
test
135+
lib
136+
134137
*.zip
135138
lambda-config.json
136139
lambda-aws-config.json

.npmignore

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
2+
# Created by https://www.gitignore.io/api/node,macos,linux,windows
3+
4+
### Linux ###
5+
*~
6+
7+
# temporary files which can be created if a process still has a handle open of a deleted file
8+
.fuse_hidden*
9+
10+
# KDE directory preferences
11+
.directory
12+
13+
# Linux trash folder which might appear on any partition or disk
14+
.Trash-*
15+
16+
# .nfs files are created when an open file is removed but is still being accessed
17+
.nfs*
18+
19+
### macOS ###
20+
*.DS_Store
21+
.AppleDouble
22+
.LSOverride
23+
24+
# Icon must end with two \r
25+
Icon
26+
27+
# Thumbnails
28+
._*
29+
30+
# Files that might appear in the root of a volume
31+
.DocumentRevisions-V100
32+
.fseventsd
33+
.Spotlight-V100
34+
.TemporaryItems
35+
.Trashes
36+
.VolumeIcon.icns
37+
.com.apple.timemachine.donotpresent
38+
39+
# Directories potentially created on remote AFP share
40+
.AppleDB
41+
.AppleDesktop
42+
Network Trash Folder
43+
Temporary Items
44+
.apdisk
45+
46+
### Node ###
47+
# Logs
48+
logs
49+
*.log
50+
npm-debug.log*
51+
yarn-debug.log*
52+
yarn-error.log*
53+
54+
# Runtime data
55+
pids
56+
*.pid
57+
*.seed
58+
*.pid.lock
59+
60+
# Directory for instrumented libs generated by jscoverage/JSCover
61+
lib-cov
62+
63+
# Coverage directory used by tools like istanbul
64+
coverage
65+
66+
# nyc test coverage
67+
.nyc_output
68+
69+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
70+
.grunt
71+
72+
# Bower dependency directory (https://bower.io/)
73+
bower_components
74+
75+
# node-waf configuration
76+
.lock-wscript
77+
78+
# Compiled binary addons (http://nodejs.org/api/addons.html)
79+
build/Release
80+
81+
# Dependency directories
82+
node_modules/
83+
jspm_packages/
84+
85+
# Typescript v1 declaration files
86+
typings/
87+
88+
# Optional npm cache directory
89+
.npm
90+
91+
# Optional eslint cache
92+
.eslintcache
93+
94+
# Optional REPL history
95+
.node_repl_history
96+
97+
# Output of 'npm pack'
98+
*.tgz
99+
100+
# Yarn Integrity file
101+
.yarn-integrity
102+
103+
# dotenv environment variables file
104+
.env
105+
106+
107+
### Windows ###
108+
# Windows thumbnail cache files
109+
Thumbs.db
110+
ehthumbs.db
111+
ehthumbs_vista.db
112+
113+
# Folder config file
114+
Desktop.ini
115+
116+
# Recycle Bin used on file shares
117+
$RECYCLE.BIN/
118+
119+
# Windows Installer files
120+
*.cab
121+
*.msi
122+
*.msm
123+
*.msp
124+
125+
# Windows shortcuts
126+
*.lnk
127+
128+
# End of https://www.gitignore.io/api/node,macos,linux,windows
129+
130+
## Project
131+
132+
.idea
133+
134+
test
135+
lib
136+
137+
*.zip
138+
lambda-config.json
139+
lambda-aws-config.json
140+
141+
142+
### end .gitignore
143+
144+
145+
# Include lib
146+
!lib
147+
148+
*.map
149+
150+
.editorconfig
151+
.idea
152+
.nvmrc
153+
src
154+
test
155+
node-lambda.js
156+
tsconfig.json

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Changelog
2+
## [1.0.0] - 2017-06-25
3+
- Initial release

README.md

Lines changed: 68 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,68 @@
1-
# aws-node-lambda-helper
2-
Helper module for deploying AWS Lambda functions in Node.js.
1+
# aws-lambda-deploy
2+
## Usage
3+
4+
```bash
5+
gald [command] [option]
6+
```
7+
8+
There are 3 commands available
9+
```bash
10+
gald init
11+
gald test
12+
gald deploy
13+
```
14+
### Commands
15+
16+
#### init
17+
18+
Create (missing) configuration
19+
files that provide information
20+
to the module about
21+
the AWS Lambda function.
22+
23+
After running `init` you should consider
24+
adding `lambda-secrets.json`
25+
to your `.gitignore`.
26+
27+
The `Handler` property consists of
28+
the module name and the function name.
29+
30+
For example a file `handler.js` with:
31+
```javascript
32+
exports.myHandler = function () {};
33+
```
34+
The resulting `Handler` property looks like this:
35+
```
36+
"Handler": "handler.myHandler"
37+
```
38+
39+
#### test
40+
41+
Execute all defined tests in `lambda-test.json`
42+
or a different JSON file.
43+
44+
```bash
45+
gald test [optional json file]
46+
```
47+
48+
#### deploy
49+
50+
Deploys the Lambda function to AWS Lambda.
51+
In case the Lambda function does not exist
52+
or the configuration has been changed,
53+
the user will be notified.
54+
55+
Deploy looks for the archive defined in
56+
`lambda-config.json` under the property `archiveName`.
57+
Your build system will have to provide a zip file
58+
with the necessary components
59+
for the AWS Lambda function.
60+
61+
For example, have a build script that looks like this:
62+
```bash
63+
zip -r -9 archive.zip handler.js
64+
```
65+
If your AWS Lambda function depends on other packages,
66+
make sure to include the `node_modules` folder,
67+
with the dependencies installed,
68+
in your zip file.

0 commit comments

Comments
 (0)