Collect output of all steps from a single SSM document

0

I got a SSM automation document, which does have 5 steps/codes. right now it works perfect. once i ran it, i can click on each executed step-ID , check its output.

but i want to know is there any way to accumulate all 5steps output and send everything as an email once ssm finished running ??? or anyway to collect outputs from all 5step-id's and put it in a 6th step and send it as email as part of the ssm document itself. ?

1개 답변
0

Automation, a capability of AWS Systems Manager, integrates with Amazon CloudWatch Logs. You can send the output from aws:executeScript actions to the log group you specify. You can read about enabling the CloudWatch logging on this documentation page.

To monitor the execution status of your automation document, you can use Amazon EventBridge. Amazon EventBridge is a serverless event bus service that allows you to connect your applications with data from a variety of sources. EventBridge was formerly called Amazon CloudWatch Events. EventBridge can add events from dozens of AWS services to your rules, including Systems Manager. EventBridge also supports events from the Systems Manager's Automation capability. See an example of an Automation event pattern here.

You can define an AWS Lambda function as the target of your EventBridge rule. This Lambda function will gather the CloudWatch logs and send them via email. You can use the Amazon SNS service to send emails. A similar solution is described in this blog post.

profile pictureAWS
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠