0

您能否提供信息/链接我如何通过 AWS SAM 创建下一个:

1. Go to services → CloudWatch → Rules → click on Create rule . 2. Event Source → choose Event Pattern → select CloudWatch Logs in Service Name , AWS API Call via CloudTrail in Event Type (If you don’t have Trail setup in CloudTrail, do first. To get help refer this document), CreateLogGroup in Specific operation(s)→ Targets → select Lambda function → select previously created lambda function → click on Configure details . 3. Give Name, Description, State should be enabled → click on Create rule . (取自https://medium.com/tensult/manage-aws-cloudwatch-log-group-retention-using-automation-26add478b0c5文章。)

我没有找到任何信息,如何在 AWS SAM template.yaml 文件中为 lambda 函数(步骤 2)描述此事件源/事件类型(通过 CloudTrail 调用 AWS API)。

抱歉,如果我为这个问题提供的标题不完全正确,我不确定如何正确提问 - ping 我,我会更改它。

4

1 回答 1

0

AWS SAM 团队回答说 SAM 在 SAM 中原生不支持 CloudTrail+Lambda。有关更多详细信息,请查看:https ://github.com/awslabs/serverless-application-model/issues/550

于 2018-08-19T10:26:38.887 回答