AWS Lambda CloudTrail Events as SAM Event Source #3526
Replies: 4 comments
-
Hi @MaxVinogradov, we don't currently support CloudTrail+Lambda natively in SAM. You can create CloudTrail resources using CloudFormation https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudtrail-trail.html. There are likely additional Resources you'll need to specify to link CloudTrail with Lambda. I've tagged this as a feature request to add native support in SAM to make this much simpler (similar to our existing CloudWatchLogs support https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#cloudwatchlogs) |
Beta Was this translation helpful? Give feedback.
-
Got it, thanks! I think it will be a great feature, that can make our life simpler. |
Beta Was this translation helpful? Give feedback.
-
I've been able to get this type of event (AWS API Call via CloudTrail) to work as in this example:
Maybe this is a hack, I'm not sure. But it seems to work just fine. |
Beta Was this translation helpful? Give feedback.
-
Pinging to clear We do look at prioritizing feature requests based on "+1" reactions. |
Beta Was this translation helpful? Give feedback.
-
Could you please provide information/link how can I create next via AWS SAM:
(taken from https://medium.com/tensult/manage-aws-cloudwatch-log-group-retention-using-automation-26add478b0c5 article.)
I've not found any information how I can describe this Event Source / Event Type (AWS API Call via CloudTrail) for lambda function (step 2) in AWS SAM template.yaml file
** I've already asked this question on StackOverflow, but nobody answers.
Beta Was this translation helpful? Give feedback.
All reactions