Search code examples
amazon-web-servicesaws-code-deploy

Is it possible to view deployment events in the CLI for CodeDeploy?


In the AWS Console, it is possible to the status of a deployment for individual events on individual instances.

Is there an equivalent command to do this on the CLI?

I have looked through the docs for the deploy command tried get-deployment but that does not list individual events.


Solution

  • Are you looking for the events under "Deployment lifecycle events" in the AWS CodeDeploy console? If yes, then you can retrieve them via following cli commands:

    • batch-get-deployment-targets [1] or batch-get-deployment-instances [2]
    • get-deployment-instance [3]

    [1] https://docs.aws.amazon.com/cli/latest/reference/deploy/batch-get-deployment-targets.html

    [2] https://docs.aws.amazon.com/cli/latest/reference/deploy/batch-get-deployment-instances.html

    [3] https://docs.aws.amazon.com/cli/latest/reference/deploy/get-deployment-instance.html