Menu
AWS OpsWorks
User Guide (API Version 2013-02-18)

Deploy an App (create-deployment)

Use the create-deployment command to deploy an app to a specified stack.

Deploy an App

Copy
aws opsworks --region us-east-1 create-deployment --stack-id cfb7e082-ad1d-4599-8e81-de1c39ab45bf --app-id 307be5c8-d55d-47b5-bd6e-7bd417c6c7eb --command "{\"Name\":\"deploy\"}"

The arguments are as follows:

  • stack-id – You can get the stack ID from the stack's settings page on the console (look for OpsWorks ID) or by calling describe-stacks.

  • app-id – You can get app ID from the app's details page (look for OpsWorks ID) or by calling describe-apps.

  • command – The argument takes a JSON object that sets the command name to deploy, which deploys the specified app to the stack.

    Notice that the " characters in the JSON object are all escaped. Otherwise, the command might return an error that the JSON is invalid.

The command returns a JSON object that contains the deployment ID, as follows:

Copy
{ "DeploymentId": "5746c781-df7f-4c87-84a7-65a119880560" }

Note

The preceding example deploys to every instance in the stack. To deploy to a specified subset of instances, add an instance-ids argument and list the instance IDs.

On this page: