Search code examples
amazon-web-servicesamazon-ec2autoscalingaws-code-deploy

AWS CodeDeploy deployment tracking


I would like to know if it's possible to track the deployment status of CodeDeploy by using CLI. Currently, I'm using Bamboo to trigger the CodeDeploy deployment by CLI using: aws deploy create-deployment ... My Bamboo plan will show green the moment the deployment is triggered instead of checking if the actual deployment is succeeded. Is there a way to let Bamboo/command line verify if the actual deployment was successfully deployed? Many thanks!


Solution

  • Your create-deployment will return a Deployment ID. Use that in aws deploy get-deployment --deployment-id XXX to see the status and info of the deployment:

    http://docs.aws.amazon.com/cli/latest/reference/deploy/get-deployment.html

    You can use aws deploy wait deployment-successful --deployment-id XXX to wait for completion:

    http://docs.aws.amazon.com/cli/latest/reference/deploy/wait/deployment-successful.html.