Giter Site home page Giter Site logo

fortinet / aws-lambda-guardduty Goto Github PK

View Code? Open in Web Editor NEW
14.0 14.0 13.0 522 KB

Lambda function to be called in CloudWatch when GuardDuty sends logs to CloudWatch. This script will write the malicious IP to a dedicated file in an S3 bucket. Firewall service (i.e. FortiOS) can pull this list, and add those malicious IPs to the blacklist.

License: MIT License

JavaScript 94.90% Groovy 5.10%
aws guardduty lambda

aws-lambda-guardduty's People

Contributors

guardhao104 avatar jamie-pate avatar jaydenliang avatar joel-cripps avatar klc178 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

aws-lambda-guardduty's Issues

saveBlockListToBucket and return error: AccessControlListNotSupported:

Configured the settings as per the document. When doing the test the IP is showing in DynamoDB but the S3 action of creating the object ip_blocklist is not working. Verified the Cloudwatch and the following error is showing

2022-01-25T10:54:35.629Z c356fb0f-d991-4bba-b620-0487a211c007 INFO calling generator script.
2022-01-25T10:54:36.223Z c356fb0f-d991-4bba-b620-0487a211c007 INFO called scanDBTable: scan completed.
2022-01-25T10:54:36.385Z c356fb0f-d991-4bba-b620-0487a211c007 INFO called bucketExists: no error.
2022-01-25T10:54:36.709Z c356fb0f-d991-4bba-b620-0487a211c007 INFO called saveBlockListToBucket and return error: AccessControlListNotSupported: The bucket does not allow ACLs at Request.extractError (/var/runtime/node_modules/aws-sdk/lib/services/s3.js:699:35) at Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:106:20) at Request.emit (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:78:10) at Request.emit (/var/runtime/node_modules/aws-sdk/lib/request.js:688:14) at Request.transition (/var/runtime/node_modules/aws-sdk/lib/request.js:22:10) at AcceptorStateMachine.runTo (/var/runtime/node_modules/aws-sdk/lib/state_machine.js:14:12) at /var/runtime/node_modules/aws-sdk/lib/state_machine.js:26:10 at Request. (/var/runtime/node_modules/aws-sdk/lib/request.js:38:9) at Request. (/var/runtime/node_modules/aws-sdk/lib/request.js:690:12) at Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:116:18)
END RequestId: c356fb0f-d991-4bba-b620-0487a211c007

Also during the IAM policy creation which grants permissions to operate on the S3 bucket, It is notice that there is not HeadBucket Access level which is mentioned in the document.

Please let me know what is missing in the S3 permission and how this can be resolved.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.