I am trying setup my project deployment using AWS code-pipeline and I would like to get email notification when my deployment fails with code-pipeline logs without, so that I don't have login into AWS account every time to see the logs.
I searched through various blogs,documentation and examples but it didn't help.
The below JSON I used to create AWS-cloudwatch rule:
{
"detail-type": [
"CodePipeline Stage Execution State Change",
"CodePipeline Action Execution State Change",
"CodePipeline Pipeline Execution State Change"
],
"source": [
"aws.codepipeline"
],
"detail": {
"pipeline": [
"ui-pipeline"
],
"state": [
"FAILED"
]
}
}
The email I am getting contains this JSON:
{
"version":"0",
"id":"xxx-493f-de1d-94b7-xxx",
"detail-type":"CodePipeline Stage Execution State Change",
"source":"aws.codepipeline",
"account":"xxxx",
"time":"2019-06-13T05:50:17Z",
"region":"ap-south-x",
"resources":[
"arn:aws:codepipeline:ap-south-1:xxx:ui-pipeline"
],
"detail":{
"pipeline":"ui-pipeline",
"execution-id":"xxx-fbcf-40f7-xxx-xxxx",
"stage":"Deploy",
"state":"FAILED",
"version":1.0
}
}
I want the logs of AWS code-pipeline aswell.