Table Of Contents

Feedback

User Guide

First time using the AWS CLI? See the User Guide for help getting started.

[ aws . deploy ]

get-deployment

Description

Gets information about a deployment.

See also: AWS API Documentation

See 'aws help' for descriptions of global parameters.

Synopsis

  get-deployment
--deployment-id <value>
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]

Options

--deployment-id (string)

A deployment ID associated with the applicable IAM user or AWS account.

--cli-input-json (string) Performs service operation based on the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, the CLI values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

See 'aws help' for descriptions of global parameters.

Examples

To get information about a deployment

This example displays information about a deployment that is associated with the user's AWS account.

Command:

aws deploy get-deployment --deployment-id d-USUAELQEX

Output:

{
    "deploymentInfo": {
        "applicationName": "WordPress_App",
        "status": "Succeeded",
        "deploymentOverview": {
            "Failed": 0,
            "InProgress": 0,
            "Skipped": 0,
            "Succeeded": 1,
            "Pending": 0
        },
        "deploymentConfigName": "CodeDeployDefault.OneAtATime",
        "creator": "user",
                "description": "My WordPress app deployment",
                "revision": {
          "revisionType": "S3",
          "s3Location":  {
            "bundleType": "zip",
            "eTag": "\"dd56cfd59d434b8e768f9d77fEXAMPLE\"",
            "bucket": "CodeDeployDemoBucket",
            "key": "WordPressApp.zip"
                      }
        },
        "deploymentId": "d-USUAELQEX",
        "deploymentGroupName": "WordPress_DG",
                "createTime": 1409764576.589,
        "completeTime": 1409764596.101,
                "ignoreApplicationStopFailures": false
    }
}

Output

deploymentInfo -> (structure)

Information about the deployment.

applicationName -> (string)

The application name.

deploymentGroupName -> (string)

The deployment group name.

deploymentConfigName -> (string)

The deployment configuration name.

deploymentId -> (string)

The deployment ID.

previousRevision -> (structure)

Information about the application revision that was deployed to the deployment group before the most recent successful deployment.

revisionType -> (string)

The type of application revision:

  • S3: An application revision stored in Amazon S3.
  • GitHub: An application revision stored in GitHub (EC2/On-premises deployments only)
  • String: A YAML-formatted or JSON-formatted string (AWS Lambda deployments only)

s3Location -> (structure)

Information about the location of a revision stored in Amazon S3.

bucket -> (string)

The name of the Amazon S3 bucket where the application revision is stored.

key -> (string)

The name of the Amazon S3 object that represents the bundled artifacts for the application revision.

bundleType -> (string)

The file type of the application revision. Must be one of the following:

  • tar: A tar archive file.
  • tgz: A compressed tar archive file.
  • zip: A zip archive file.

version -> (string)

A specific version of the Amazon S3 object that represents the bundled artifacts for the application revision.

If the version is not specified, the system will use the most recent version by default.

eTag -> (string)

The ETag of the Amazon S3 object that represents the bundled artifacts for the application revision.

If the ETag is not specified as an input parameter, ETag validation of the object will be skipped.

gitHubLocation -> (structure)

Information about the location of application artifacts stored in GitHub.

repository -> (string)

The GitHub account and repository pair that stores a reference to the commit that represents the bundled artifacts for the application revision.

Specified as account/repository.

commitId -> (string)

The SHA1 commit ID of the GitHub commit that represents the bundled artifacts for the application revision.

string -> (structure)

Information about the location of an AWS Lambda deployment revision stored as a RawString.

content -> (string)

The YAML-formatted or JSON-formatted revision string. It includes information about which Lambda function to update and optional Lambda functions that validate deployment lifecycle events.

sha256 -> (string)

The SHA256 hash value of the revision that is specified as a RawString.

revision -> (structure)

Information about the location of stored application artifacts and the service from which to retrieve them.

revisionType -> (string)

The type of application revision:

  • S3: An application revision stored in Amazon S3.
  • GitHub: An application revision stored in GitHub (EC2/On-premises deployments only)
  • String: A YAML-formatted or JSON-formatted string (AWS Lambda deployments only)

s3Location -> (structure)

Information about the location of a revision stored in Amazon S3.

bucket -> (string)

The name of the Amazon S3 bucket where the application revision is stored.

key -> (string)

The name of the Amazon S3 object that represents the bundled artifacts for the application revision.

bundleType -> (string)

The file type of the application revision. Must be one of the following:

  • tar: A tar archive file.
  • tgz: A compressed tar archive file.
  • zip: A zip archive file.

version -> (string)

A specific version of the Amazon S3 object that represents the bundled artifacts for the application revision.

If the version is not specified, the system will use the most recent version by default.

eTag -> (string)

The ETag of the Amazon S3 object that represents the bundled artifacts for the application revision.

If the ETag is not specified as an input parameter, ETag validation of the object will be skipped.

gitHubLocation -> (structure)

Information about the location of application artifacts stored in GitHub.

repository -> (string)

The GitHub account and repository pair that stores a reference to the commit that represents the bundled artifacts for the application revision.

Specified as account/repository.

commitId -> (string)

The SHA1 commit ID of the GitHub commit that represents the bundled artifacts for the application revision.

string -> (structure)

Information about the location of an AWS Lambda deployment revision stored as a RawString.

content -> (string)

The YAML-formatted or JSON-formatted revision string. It includes information about which Lambda function to update and optional Lambda functions that validate deployment lifecycle events.

sha256 -> (string)

The SHA256 hash value of the revision that is specified as a RawString.

status -> (string)

The current state of the deployment as a whole.

errorInformation -> (structure)

Information about any error associated with this deployment.

code -> (string)

For information about additional error codes, see Error Codes for AWS CodeDeploy in the AWS CodeDeploy User Guide .

The error code:

  • APPLICATION_MISSING: The application was missing. This error code will most likely be raised if the application is deleted after the deployment is created but before it is started.
  • DEPLOYMENT_GROUP_MISSING: The deployment group was missing. This error code will most likely be raised if the deployment group is deleted after the deployment is created but before it is started.
  • HEALTH_CONSTRAINTS: The deployment failed on too many instances to be successfully deployed within the instance health constraints specified.
  • HEALTH_CONSTRAINTS_INVALID: The revision cannot be successfully deployed within the instance health constraints specified.
  • IAM_ROLE_MISSING: The service role cannot be accessed.
  • IAM_ROLE_PERMISSIONS: The service role does not have the correct permissions.
  • INTERNAL_ERROR: There was an internal error.
  • NO_EC2_SUBSCRIPTION: The calling account is not subscribed to the Amazon EC2 service.
  • NO_INSTANCES: No instance were specified, or no instance can be found.
  • OVER_MAX_INSTANCES: The maximum number of instance was exceeded.
  • THROTTLED: The operation was throttled because the calling account exceeded the throttling limits of one or more AWS services.
  • TIMEOUT: The deployment has timed out.
  • REVISION_MISSING: The revision ID was missing. This error code will most likely be raised if the revision is deleted after the deployment is created but before it is started.

message -> (string)

An accompanying error message.

createTime -> (timestamp)

A timestamp indicating when the deployment was created.

startTime -> (timestamp)

A timestamp indicating when the deployment was deployed to the deployment group.

In some cases, the reported value of the start time may be later than the complete time. This is due to differences in the clock settings of back-end servers that participate in the deployment process.

completeTime -> (timestamp)

A timestamp indicating when the deployment was complete.

deploymentOverview -> (structure)

A summary of the deployment status of the instances in the deployment.

Pending -> (long)

The number of instances in the deployment in a pending state.

InProgress -> (long)

The number of instances in which the deployment is in progress.

Succeeded -> (long)

The number of instances in the deployment to which revisions have been successfully deployed.

Failed -> (long)

The number of instances in the deployment in a failed state.

Skipped -> (long)

The number of instances in the deployment in a skipped state.

Ready -> (long)

The number of instances in a replacement environment ready to receive traffic in a blue/green deployment.

description -> (string)

A comment about the deployment.

creator -> (string)

The means by which the deployment was created:

  • user: A user created the deployment.
  • autoscaling: Auto Scaling created the deployment.
  • codeDeployRollback: A rollback process created the deployment.

ignoreApplicationStopFailures -> (boolean)

If true, then if the deployment causes the ApplicationStop deployment lifecycle event to an instance to fail, the deployment to that instance will not be considered to have failed at that point and will continue on to the BeforeInstall deployment lifecycle event.

If false or not specified, then if the deployment causes the ApplicationStop deployment lifecycle event to an instance to fail, the deployment to that instance will stop, and the deployment to that instance will be considered to have failed.

autoRollbackConfiguration -> (structure)

Information about the automatic rollback configuration associated with the deployment.

enabled -> (boolean)

Indicates whether a defined automatic rollback configuration is currently enabled.

events -> (list)

The event type or types that trigger a rollback.

(string)

updateOutdatedInstancesOnly -> (boolean)

Indicates whether only instances that are not running the latest application revision are to be deployed to.

rollbackInfo -> (structure)

Information about a deployment rollback.

rollbackDeploymentId -> (string)

The ID of the deployment rollback.

rollbackTriggeringDeploymentId -> (string)

The deployment ID of the deployment that was underway and triggered a rollback deployment because it failed or was stopped.

rollbackMessage -> (string)

Information describing the status of a deployment rollback; for example, whether the deployment can't be rolled back, is in progress, failed, or succeeded.

deploymentStyle -> (structure)

Information about the type of deployment, either in-place or blue/green, you want to run and whether to route deployment traffic behind a load balancer.

deploymentType -> (string)

Indicates whether to run an in-place deployment or a blue/green deployment.

deploymentOption -> (string)

Indicates whether to route deployment traffic behind a load balancer.

targetInstances -> (structure)

Information about the instances that belong to the replacement environment in a blue/green deployment.

tagFilters -> (list)

The tag filter key, type, and value used to identify Amazon EC2 instances in a replacement environment for a blue/green deployment. Cannot be used in the same call as ec2TagSet.

(structure)

Information about an EC2 tag filter.

Key -> (string)

The tag filter key.

Value -> (string)

The tag filter value.

Type -> (string)

The tag filter type:

  • KEY_ONLY: Key only.
  • VALUE_ONLY: Value only.
  • KEY_AND_VALUE: Key and value.

autoScalingGroups -> (list)

The names of one or more Auto Scaling groups to identify a replacement environment for a blue/green deployment.

(string)

ec2TagSet -> (structure)

Information about the groups of EC2 instance tags that an instance must be identified by in order for it to be included in the replacement environment for a blue/green deployment. Cannot be used in the same call as tagFilters.

ec2TagSetList -> (list)

A list containing other lists of EC2 instance tag groups. In order for an instance to be included in the deployment group, it must be identified by all the tag groups in the list.

(list)

(structure)

Information about an EC2 tag filter.

Key -> (string)

The tag filter key.

Value -> (string)

The tag filter value.

Type -> (string)

The tag filter type:

  • KEY_ONLY: Key only.
  • VALUE_ONLY: Value only.
  • KEY_AND_VALUE: Key and value.

instanceTerminationWaitTimeStarted -> (boolean)

Indicates whether the wait period set for the termination of instances in the original environment has started. Status is 'false' if the KEEP_ALIVE option is specified; otherwise, 'true' as soon as the termination wait period starts.

blueGreenDeploymentConfiguration -> (structure)

Information about blue/green deployment options for this deployment.

terminateBlueInstancesOnDeploymentSuccess -> (structure)

Information about whether to terminate instances in the original fleet during a blue/green deployment.

action -> (string)

The action to take on instances in the original environment after a successful blue/green deployment.

  • TERMINATE: Instances are terminated after a specified wait time.
  • KEEP_ALIVE: Instances are left running after they are deregistered from the load balancer and removed from the deployment group.

terminationWaitTimeInMinutes -> (integer)

The number of minutes to wait after a successful blue/green deployment before terminating instances from the original environment. The maximum setting is 2880 minutes (2 days).

deploymentReadyOption -> (structure)

Information about the action to take when newly provisioned instances are ready to receive traffic in a blue/green deployment.

actionOnTimeout -> (string)

Information about when to reroute traffic from an original environment to a replacement environment in a blue/green deployment.

  • CONTINUE_DEPLOYMENT: Register new instances with the load balancer immediately after the new application revision is installed on the instances in the replacement environment.
  • STOP_DEPLOYMENT: Do not register new instances with a load balancer unless traffic rerouting is started using ContinueDeployment . If traffic rerouting is not started before the end of the specified wait period, the deployment status is changed to Stopped.

waitTimeInMinutes -> (integer)

The number of minutes to wait before the status of a blue/green deployment changed to Stopped if rerouting is not started manually. Applies only to the STOP_DEPLOYMENT option for actionOnTimeout

greenFleetProvisioningOption -> (structure)

Information about how instances are provisioned for a replacement environment in a blue/green deployment.

action -> (string)

The method used to add instances to a replacement environment.

  • DISCOVER_EXISTING: Use instances that already exist or will be created manually.
  • COPY_AUTO_SCALING_GROUP: Use settings from a specified Auto Scaling group to define and create instances in a new Auto Scaling group.

loadBalancerInfo -> (structure)

Information about the load balancer used in the deployment.

elbInfoList -> (list)

An array containing information about the load balancer to use for load balancing in a deployment. In Elastic Load Balancing, load balancers are used with Classic Load Balancers.

Note

Adding more than one load balancer to the array is not supported.

(structure)

Information about a load balancer in Elastic Load Balancing to use in a deployment. Instances are registered directly with a load balancer, and traffic is routed to the load balancer.

name -> (string)

For blue/green deployments, the name of the load balancer that will be used to route traffic from original instances to replacement instances in a blue/green deployment. For in-place deployments, the name of the load balancer that instances are deregistered from so they are not serving traffic during a deployment, and then re-registered with after the deployment completes.

targetGroupInfoList -> (list)

An array containing information about the target group to use for load balancing in a deployment. In Elastic Load Balancing, target groups are used with Application Load Balancers.

Note

Adding more than one target group to the array is not supported.

(structure)

Information about a target group in Elastic Load Balancing to use in a deployment. Instances are registered as targets in a target group, and traffic is routed to the target group.

name -> (string)

For blue/green deployments, the name of the target group that instances in the original environment are deregistered from, and instances in the replacement environment registered with. For in-place deployments, the name of the target group that instances are deregistered from, so they are not serving traffic during a deployment, and then re-registered with after the deployment completes.

additionalDeploymentStatusInfo -> (string)

Provides information about the results of a deployment, such as whether instances in the original environment in a blue/green deployment were not terminated.

fileExistsBehavior -> (string)

Information about how AWS CodeDeploy handles files that already exist in a deployment target location but weren't part of the previous successful deployment.

  • DISALLOW: The deployment fails. This is also the default behavior if no option is specified.
  • OVERWRITE: The version of the file from the application revision currently being deployed replaces the version already on the instance.
  • RETAIN: The version of the file already on the instance is kept and used as part of the new deployment.

deploymentStatusMessages -> (list)

Messages that contain information about the status of a deployment.

(string)

computePlatform -> (string)

The destination platform type for the deployment (Lambda or Server ).