title: How to fetch AWS CodeDeploy logs and show them in a BitBucket pipeline
body: <p>I want to fetch CodeDeploy logs from my Amazon EC2 instance when a script fails during deployment and then show the logs in BitBucket pipelines.</p>
  
  <p>How can I do that?<br>
  Is there any API available for fetching the logs from CodeDeploy?</p>