Giter VIP home page Giter VIP logo

Comments (5)

aws-brad avatar aws-brad commented on June 17, 2024

We are having trouble replicating this issue, if you manually run the Lambda function, LambdaCheckFor2k8, what is the error that you see when you use the sample test event "AWS Cloudformation Create Request" and in what region is the function located in?

from aws-security-assessment-solution.

rdoleski87 avatar rdoleski87 commented on June 17, 2024

I created a function with the contents of check_for_outdated_os.py, below is the console output:

START RequestId: d4288a4e-12b8-4047-9d0e-aaxxxxxxxxxx Version: $LATEST
i-0b2058aaxxxxxxxxxx Ubuntu
i-03d325aaxxxxxxxxxx  Ubuntu
i-09c168aaxxxxxxxxxx  Ubuntu
i-0cf14aaxxxxxxxxxx  Ubuntu
i-0e31b9aaxxxxxxxxxx  Ubuntu
i-0eb3eaaxxxxxxxxxx Ubuntu
i-01d1aaxxxxxxxxxx  Ubuntu
i-048aaaxxxxxxxxxx  Ubuntu
i-04b97aaxxxxxxxxxx Ubuntu
[WARNING]	2020-09-21T17:19:34.405Z	d4288a4e-12b8-4047-aaxxxxxxxxxx 	There are 9 instances that might be running Windows Server 2008.            Consider upgrading them as soon as possible to mitigate Ransomware threats
[WARNING]	2020-09-21T17:19:34.406Z	d4288a4e-12b8-4047-9d0e-aaxxxxxxxxxx 	Instance IDs of the 2008 systems are ['i-0b2058aaxxxxxxxxxx ', 'i-03d325daaxxxxxxxxxx ', 'i-09c1684caaxxxxxxxxxx ', 'i-0cf1aaxxxxxxxxxx ', 'i-0e31b974aaxxxxxxxxxx ', 'i-0eb3eaaaxxxxxxxxxx ', 'i-01d16aaxxxxxxxxxx ', 'i-048aaaaxxxxxxxxxx ', 'i-04aaxxxxxxxxxx ']
[ERROR] TypeError: can only concatenate str (not "int") to str
Traceback (most recent call last):
  File "/var/task/lambda_function.py", line 105, in lambda_handler
    string = "There are " + COUNT_OF_2008_SYSTEMS +" instances that might be running Windows Server 2008.\END RequestId: d4288a4e-12b8-4047-9d0e-aaxxxxxxxxxx 
REPORT RequestId: d4288a4e-12b8-4047-9d0e-aaxxxxxxxxxx 	Duration: 13309.29 ms	Billed Duration: 13400 ms	Memory Size: 128 MB	Max Memory Used: 87 MB	Init Duration: 427.91 ms

It's a TypeError, seems the variable with the number of instances is not being cast as a string, but instead an int.

Also, the instances identified as possibly running 2008 are actually Ubuntu instances.

I tested in us-east-1

from aws-security-assessment-solution.

aws-brad avatar aws-brad commented on June 17, 2024

Thank you for the update, we are taking a look now.

from aws-security-assessment-solution.

aws-brad avatar aws-brad commented on June 17, 2024

We have removed the check from the template while we work to address the problem in the functions code.

from aws-security-assessment-solution.

aws-brad avatar aws-brad commented on June 17, 2024

The issue was addressed in a patch to the module, thank you for the issue report!

from aws-security-assessment-solution.

Related Issues (11)

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.