Add AWS Lambda Trigger
-
Log in to the AWS Console for the region (e.g., https://us-east-1.console.aws.amazon.com/lambda) with an account that has permissions to create roles, lambdas, secrets, and policies, or using a role that can assume another role with these permissions.
-
Locate the new Lambda by name. The default name is {STACKNAME}-scwx-tdr-lambda-{INTEGRATIONTYPE}. For example:
ct-demo-scwx-tdr-lambda-awscloudtrail
. -
Click on the Lambda name. The edit page for that Lambda displays.
-
Expand the Function overview section if necessary.
Lambda Function Overview
-
Click on Add trigger.
-
In the Trigger Configuration editor, select the drop down menu and choose S3. Optionally, use an SNS trigger configured with a previously created topic.
-
From the Bucket options, find the bucket containing the the data source (e.g. CloudTrail) logs and select it.
-
From the Event Type options, choose All Object Create Events.
-
In the prefix field, enter the bucket prefix where the data source logs are located. Leave this blank if no prefix is used.
-
Leave the suffix field blank.
-
Check the following box to acknowledge the cost impact of a Lambda function.
-
Choose Add. The configuration page for that lambda displays again. A message displays at the top indicating adding a trigger was successful.
Lambda Trigger Added
- The Lambda funtion is now receiving events from the trigger.