Skip to content

Commit

Permalink
Fix node version issue & update README
Browse files Browse the repository at this point in the history
Cleanup

Fix: 0516409

Change-Id: I60190310c46346f90464f2eccb4801abd3790b74
  • Loading branch information
JaydenLiang committed Oct 10, 2018
1 parent 31be3c5 commit 7d16b34
Show file tree
Hide file tree
Showing 7 changed files with 2,886 additions and 126 deletions.
45 changes: 41 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,41 @@
/dist
/node_modules
npm-debug.log
/local
# project-specific
**/dist
**/local
**/local*
!scripts/local*

# npm
**/node_modules
**/npm-debug.log
**/package-lock.json

# istanbul javascript test coverage
**/.nyc_output

# visual studio code
**/.vscode
**/*.code-workspace

bin
obj
csx
.vs
edge
Publish

*.user
*.suo
*.cscfg
*.Cache
project.lock.json

/packages
/TestResults

/tools/NuGet.exe
/App_Data
/secrets
/data
.secrets
appsettings.json
local.settings.json
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
language: node_js
node_js: 4
node_js: 8.11.1
script:
- npm install
- npm run build
Expand All @@ -9,8 +9,10 @@ deploy:
api_key:
secure: lRYKWxCFJfBbTkwCdYZ0QPIQDyfRRWhZNYAA8XFTtLR3/5bXJ1ZqlcnucdmEfLW0YEw8sPuQwp3MnDTcnmn6cN+kmphB9bCBARNvlolDw4WPmhLYO/1ZNFBERdvE8GT4Ruor6UVJJOJ5GzRFra4s5wosJnfugnViSHnbJsnP44zM4QwzFIP8b4Oj339jxqVKPgmEDAalJv9n7l4cx/wOyy000VKlc3dqDNtp2mRGL0aovTApwH2sMZbvWhIE1NOdNqDJJFHCp9ftK96Uienb0kHjB6pyPR+sep3794x6u4mfY6cIYfPzJWVhhRgVfCviKm7b8pyeagUCMkNJABjU0WICXIfv9tAvoMi8KTHf0WzwHuZOYPp9bBZJRAdC5hvggm+IbOUBgPxi4nFCo9hgbTsBkY3nvZFp1jmIa/ElfqKCzdWWu6a7OJs8aB6oNwqptKPRgfgT90uNSYZjPUAkzxI8xwuX7BzHL2Alfr1s6Kw7yjF57dCUEPtXPOTj+LUEGZkeOPTQgOYAxCDENKAp/iuERGoZC2Ri6b1rM8SLigQkaEJUo1+eSJdWx02vlLrEZ2F/WAVmeoL7ZQQ7xI3hsabGOraagKOtoR/g8eiOxrQFRGulHEgZegMTPqjfga3zWfa1ga1bBG8Md9dqbs4BkvzNTIPXeOz01J54fWkFgJA=
file: dist/aws_lambda_guardduty.zip
file_glob: true
file: dist/*
skip_cleanup: true
on:
repo: fortinet/aws-lambda-guardduty
tags: true
all_branches: true
branch: master
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ For more information about Amazon GuardDuty, please see the [Amazon GuardDuty of
### Prerequisites

See below for a list of tools required to deploy this project before installation. Some prerequisites are platform-specific. Choose the right one for your OS (e.g. Windows, Linux, macOS)
- [Node.js](https://nodejs.org/) (v6.5.0 or later)
- [Node.js](https://nodejs.org/) (v8.10.0 or later)
- [Npm](https://www.npmjs.com/). Although npm comes with Node.js, check [here](https://docs.npmjs.com/getting-started/installing-node#installing-npm-from-the-nodejs-site) for how to install npm and manage npm version.
- [AWS account](https://aws.amazon.com/).
- [Git](https://git-scm.com/downloads) (latest version).
- *[Git Bash]() (latest version). Git Bash is a solution for Windows platform users to run the following installation steps. The article [Use git, ssh and npm on windows with Git Bash](https://blog.theodo.fr/2017/01/use-git-ssh-and-npm-on-windows-with-git-bash/) gives more information about setting up Git Bash on Windows.
- *[Git Bash]() (latest version). Git Bash is a solution for Windows platform users to run the following installation steps. The article [Use git, ssh and npm on windows with Git Bash](https://blog.theodo.fr/2017/01/use-git-ssh-and-npm-on-windows-with-git-bash/) gives more information about setting up Git Bash on Windows.

### Installation Steps
When you have all prerequisites ready, you can continue the installation steps as below. Please note the commands in each steps are intended to run in Terminal or Git Bash only.
Expand Down Expand Up @@ -210,7 +210,7 @@ Note DynamoDB tables and Lambda functions are region-specific so you must create
1. Create a function that **author from scratch**.
- Give it a unique name.
- Choose **Node.js 6.10** as its Runtime.
- Choose **Node.js 8.10** as its Runtime.
- For Role, select **Choose an existing role**. Choose the role created in *Step 4. Setup IAM role and policies*.

2. Setup **function code**.
Expand All @@ -224,7 +224,11 @@ Note DynamoDB tables and Lambda functions are region-specific so you must create
- Add a key **S3_BLOCKLIST_KEY** and input a value of **ip_blocklist** or a different name as you wish.
- Add a key **REGION** and input the AWS region where your Lambda function and DynamoDB table are situated. For example, the region of *US East (N. Virginia)* is *us-east-1*. For information about AWS Regions, please see [AWS Regions and Endpoints](https://docs.aws.amazon.com/general/latest/gr/rande.html).
- Add a key **DDB_TABLE_NAME** and input the name of the DynamoDB table you have created in Step 3. (***my-aws-lambda-guardduty-db*** in this example)
4. Save the Lambda function.

4. Setup **Basic settings**
- Change Timeout from **3** sec to **15** sec

5. Save the Lambda function.

### Step 6. Setup DynamoDB stream trigger
> A trigger needs to add to the DynamoDB table created in Step 4. Setup DynamoDB table. This trigger is the key to cause the Lambda function to generator a full IP block list to a static file in the S3 bucket.
Expand Down
Loading

0 comments on commit 7d16b34

Please sign in to comment.