I'm working with aws codebuild and aws codepipeline.
In case the stage of aws codebuild failed I want to send the details via email.
Is it possible to send the cloudwatch logs via email?
I'm working with aws codebuild and aws codepipeline.
In case the stage of aws codebuild failed I want to send the details via email.
Is it possible to send the cloudwatch logs via email?
CodeBuild emits CloudWatch events when builds succeed or fail. You can use a combination of CloudWatch events, Lambda, and SES (Simple Email Service), to accomplish this:
CodeBuild
>Build State Change
>Specific state(s)
>FAILED
BatchGetBuilds
with the failed build ARN, and use thelogs
information in the response to download the CloudWatch logs for the build.For more information, see the sample on using CloudWatch Events with CodeBuild, or this one on sending emails with Amazon SES.