能否请您提供信息/链接,我如何通过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文件中找不到用于描述此事件源/事件类型(通过CloudTrail进行AWS API调用)的任何信息,用于lambda函数(步骤2)。
对不起,如果我提供的问题标题不完全正确,我不确定如何正确地提出问题-对我执行ping操作,然后我将其更改。
答案 0 :(得分:0)
AWS SAM团队回答说SAM在SAM中本身不支持CloudTrail + Lambda。 有关更多详细信息,请检查:https://github.com/awslabs/serverless-application-model/issues/550