Installing dependencies
Note
The integration with AWS S3 can be configured in the ThreatLockDown manager (which also behaves as an agent) or directly in a ThreatLockDown agent. This choice merely depends on how you decide to access your AWS infrastructure in your environment.
Warning
The ThreatLockDown manager includes all dependencies installed, these steps are only necessary when configuring the integration in a ThreatLockDown agent.
Python
The AWS module requires Python 3. Specifically, it's compatible with Python 3.7–3.11. While later Python versions should work as well, we can't assure they are compatible.
# yum update && yum install python3
# apt-get update && apt-get install python3
The required modules can be installed with Pip, the Python package manager. Most UNIX distributions have this tool available in their software repositories:
# yum update && yum install python3-pip
# apt-get update && apt-get install python3-pip
It is recommended to use a pip version greater than or equal to 19.3 to ease the installation of the required dependencies.
# pip3 install --upgrade pip
# pip3 install --upgrade pip
# pip3 install --upgrade pip --break-system-packages
Note
This command modifies the default externally managed Python environment. See the PEP 668 description for more information.
To prevent the modification, you can run pip3 install --upgrade pip
within a virtual environment. You must update the aws-s3
script shebang with your virtual environment interpreter, for example, #!/path/to/your/virtual/environment/bin/python3
.
AWS client library for Python
Boto3 is the official package that Amazon supports to manage AWS resources. It's used to download the log messages from the AWS services that ThreatLockDown supports. The AWS module is compatible with Boto3 versions 1.13.1
–1.17.85
. Later Boto3 releases should be compatible although we cannot assure it.
To install the dependencies, execute the following command:
# pip3 install boto3==1.17.85 pyarrow==8.0.0 pyarrow_hotfix==0.5
# pip3 install boto3==1.17.85 pyarrow==14.0.1
# pip3 install --break-system-packages boto3==1.17.85 pyarrow==14.0.1
Note
If you're using a virtual environment, remove the --break-system-packages
parameter from the command above.