So when I trigger a codepipeline using the below command:
aws codepipeline start-pipeline-execution --name MyFirstPipeline
I only get an asynchronous response
{
"pipelineExecutionId": "c53dbd42-This-Is-An-Example"
}
Now how do I stream the logs of build and deploy stages?
P.S I can see the logs in cloud watch but how can I get that logs using AWS cli?
aws logs
command. An example to get codebuild logs is to first get the log groupaws logs describe-log-groups --query 'logGroups[?contains(logGroupName,
codebuild)]'
, then get the log-streams usingaws logs describe-log-streams --log-group-name --log-stream-name
and finally you callaws logs get-log-events
with the log-group-name and log-stream-name that you got from previous 2 commands – Genipap