In AWS Console of AWS Code Deploy, I can see the list of all deployed revisions of an application. It also allows me to re-deploy an older version by merely by clicking a button!
I want to do the same thing using CLI, so that to re-deploy a previous version of the application we can deploy just by knowing the revision ID rather than running a full push or create-deployment command.
Is there a way to run a command similar to "aws deploy push " ?
You do need create-deployment to deploy a revision. It's equivalent to pushing the "Deploy revision" button. Revisions are created by "push", and then will be used for deployments. Pushing a revision merely bundles your revision and create a new revision record in CodeDeploy. It doesn't actually deploy anything from my understanding. Take a look at the example at http://docs.aws.amazon.com/cli/latest/reference/deploy/push.html. You will see the command for deploying a revision at the bottom of page. My push command's output doesn't have a version, so I am not sure why there's one in that example and how it's used.