Forward events from AWS CloudTrail into nOps
- AWS Cloudtrail with an S3 bucket for CloudTrail logs must be configured before deploying this stack.
- The S3 bucket for AWS CloudTrail, and nOps-aws-forwarder should be within the same region.
- API key from nOps; if you want to use an encrypted key, set up a symmetric encryption key within KMS in the same region of Lambda and provide the permission for Lambda execution's role later.
- Log into your admin AWS account/role and deploy the CloudFormation stack using the button above.
- Fill in
pnOpsApiKey
orpnOpsKmsAPIKey
,pCTForwarderReleaseVersion
, andpCloudtrailBucketName
. All other parameters are optional. - Click Create stack, and wait for the creation to complete.
- Find the installed forwarder Lambda function under the stack's "Resources" tab with logical ID
rLambdaForwarder
. - If you use a KMS-encrypted API key, provide the access permission for the Lambda role for KMS Key
- Repeat steps 1-4 above in another region if you operate in multiple AWS regions with a single-region trail.
If you can't install the Forwarder using the provided CloudFormation template, you can install the Forwarder manually following the steps below. Feel free to open an issue or create a pull request to let us know if there is anything we can improve to make the template work for you.
- Create a Python 3.9 Lambda function using
nops-aws-forwarder-deployment-package-<VERSION>.zip
from the latest releases. - Save your nOps API key to Lambda's environment variable
NOPS_API_KEY
or encrypted KMS key asNOPS_KMS_API_KEY
- Add the
s3:GetObject
permission to the Lambda execution role. - Configure triggers.
- If you use a KMS-encrypted API key, provide access permission for the Lambda role for the KMS key.
- Run ./deploy_scripts/bump_version.sh minor/major/main to add a new version.