title: Can we send Failed logs of AWS codepipline through AWS-simple-notification-service?
body: <p>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.</p>
  
  <p>I searched through various blogs,documentation and examples but it didn't help.</p>
  
  <p>The below JSON I used to create AWS-cloudwatch rule: </p>
  
  <pre><code>{
    "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"
      ]
    }
  }
  </code></pre>
  
  <p>The email I am getting contains this JSON:</p>
  
  <pre><code>{
     "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
     }
  }
  </code></pre>
  
  <p>I want the logs of AWS code-pipeline aswell.</p>