pip3 install -r requirements.txt --target package
cd package
zip -r ../lambda.zip *
cd ..
zip -g lambda.zip main.py
ES_HOST: https://<host-url>:<port>
ES_USERNAME: elasticsearch or opensearch password
ES_PASSWORD: elasticsearch or opensearch password
INDEX_NAME: the name of the index where the logs are being saved
Setup an EventBridge rule for the GuardDuty findings event to run the lambda function above.