This script is intended to be run in AWS Lambda and triggered by Amazon API Gateway.
- Add in a Logentries REST API Read-only key on line 15
- Add in a the Logentries Account Key associated with the API key on line 16
- Add in the API Key of the integration from OpsGenie on line 20
- Add the
requests
library to the same directorypip install requests -t /path/to/project-dir
- Zip up the lambda.py with requests library
- Upload to Lambda
- In Lambda, update the handler parameter in Lambda configuration to be
lambda.lambda_handler
- Add the
boto3
library (provided in the repository) to the same directory - Add the name of the lambda function that you created in AWS Lambda Service as the value of FunctionName parameter in lambdaInvoker.py script on line 11
- Zip up the lambdaInvoker.py with boto3 library
- Create another lambda function in AWS Lambda Service, and upload that zip to Lambda
- Update the handler parameter in Lambda configuration to be
lambdaInvoker.lambda_handler