> For the complete CircleCI developer hub index, see [llms.txt](https://circleci.com/developer/llms.txt)

# circleci/aws-code-deploy

Easily deploy applications to AWS CodeDeploy on CircleCI with the aws-code-deploy orb


## Commands

### create-application

Creates an application.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `application-name` | string |  | The name of an AWS CodeDeploy application associated with the applicable IAM user or AWS account. |
| `arguments` | string |  | If you wish to pass any additional arguments to the aws deploy command |
| `profile-name` | string | default | The name of an AWS profile to use with aws-cli commands |
| `region` | string | ${AWS_DEFAULT_REGION} | AWS region of CodeDeploy App. Defaults to environment variable ${AWS_DEFAULT_REGION}.
 |

### create-deployment-group

Creates a deployment group to which application revisions are deployed.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `application-name` | string |  | The name of an AWS CodeDeploy application associated with the applicable IAM user or AWS account. |
| `arguments` | string |  | If you wish to pass any additional arguments to the create-deployment-group command |
| `deployment-config` | enum | CodeDeployDefault.OneAtATime | Predefined deployment configuration name. |
| `deployment-group` | string |  | The name of a new deployment group for the specified application. |
| `get-deployment-group-arguments` | string |  | If you wish to pass any additional arguments to the get-deployment-group command |
| `profile-name` | string | default | The name of an AWS profile to use with aws-cli commands |
| `region` | string | ${AWS_DEFAULT_REGION} | AWS region of CodeDeploy App. Defaults to environment variable ${AWS_DEFAULT_REGION}.
 |
| `service-role-arn` | string |  | The service role for a deployment group. |

### deploy-bundle

Deploy from a bundle and wait until the deployment has successfully completed.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `application-name` | string |  | The name of an AWS CodeDeploy application associated with the applicable IAM user or AWS account. |
| `bundle-bucket` | string |  | The s3 bucket where an application revision will be stored |
| `bundle-key` | string |  | A key under the s3 bucket where an application revision will be stored |
| `bundle-type` | string | zip | The file type used for an application revision bundle. Currently defaults to 'zip' |
| `deploy-bundle-arguments` | string |  | If you wish to pass any additional arguments to the aws create-deployment command |
| `deployment-config` | enum | CodeDeployDefault.OneAtATime | Predefined deployment configuration name. |
| `deployment-group` | string |  | The name of a new deployment group for the specified application. |
| `get-deployment-group-arguments` | string |  | If you wish to pass any additional arguments to the get-deployment-group command |
| `profile-name` | string | default | The name of an AWS profile to use with aws-cli commands |
| `region` | string | ${AWS_DEFAULT_REGION} | AWS region of CodeDeploy App. Defaults to environment variable ${AWS_DEFAULT_REGION}.
 |

### push-bundle

Bundles and uploads to Amazon Simple Storage Service (Amazon S3) an application revision


| Parameter | Type | Default | Description |
|---|---|---|---|
| `application-name` | string |  | The name of an AWS CodeDeploy application associated with the applicable IAM user or AWS account. |
| `arguments` | string |  | If you wish to pass any additional arguments to the aws deploy command |
| `bundle-bucket` | string |  | The s3 bucket where an application revision will be stored |
| `bundle-key` | string |  | A key under the s3 bucket where an application revision will be stored |
| `bundle-source` | string | . | The directory relative to your project to package up into an application revision. |
| `bundle-type` | string | zip | The file type used for an application revision bundle. Currently defaults to 'zip' |
| `profile-name` | string | default | The name of an AWS profile to use with aws-cli commands |
| `region` | string | ${AWS_DEFAULT_REGION} | AWS region of CodeDeploy App. Defaults to environment variable ${AWS_DEFAULT_REGION}.
 |

## Jobs

### deploy

Ensures an application and deployment group exist then proceeds to
  bundle and upload an application revision to S3. Once uploaded this
  job will finally create a deployment based on that revision.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `application-name` | string |  | The name of an AWS CodeDeploy application associated with the applicable IAM user or AWS account. |
| `arguments` | string |  | If you wish to pass any additional arguments to the aws deploy command |
| `auth` | steps |  | The authentication method used to access your AWS account. Import the aws-cli orb in your config and
provide the aws-cli/setup command to authenticate with your preferred method. View examples for more information.
 |
| `bundle-bucket` | string |  | The s3 bucket where an application revision will be stored |
| `bundle-key` | string |  | A key under the s3 bucket where an application revision will be stored |
| `bundle-source` | string | . | The directory relative to your project to package up into an application revision. |
| `bundle-type` | string | zip | The file type used for an application revision bundle. Currently defaults to 'zip' |
| `deploy-bundle-arguments` | string |  | If you wish to pass any additional arguments to the deploy-bundle command |
| `deployment-config` | enum | CodeDeployDefault.OneAtATime | Predefined deployment configuration name. |
| `deployment-group` | string |  | The name of a new deployment group for the specified application. |
| `get-deployment-group-arguments` | string |  | If you wish to pass any additional arguments to the get-deployment-group command |
| `profile-name` | string | default | The name of an AWS profile to use with aws-cli commands |
| `region` | string | ${AWS_DEFAULT_REGION} | AWS region of CodeDeploy App. Defaults to environment variable ${AWS_DEFAULT_REGION}.
 |
| `service-role-arn` | string |  | The service role for a deployment group. |

## Examples

### deploy_application

Deploy an application to AWS CodeDeploy using static AWS keys for authentication. Import the aws-cli orb and authenticate using the aws-cli/setup command with static AWS keys stored as env_vars (AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY).


```yaml
version: '2.1'
orbs:
  aws-cli: circleci/aws-cli@3.1
  aws-code-deploy: circleci/aws-code-deploy@3.0
workflows:
  deploy_application:
    jobs:
      - aws-code-deploy/deploy:
          application-name: myApplication
          auth:
            - aws-cli/setup
          bundle-bucket: myApplicationS3Bucket
          bundle-key: myS3BucketKey
          deployment-group: myDeploymentGroup
          service-role-arn: myDeploymentGroupRoleARN
```

### deploy_application_with_oidc

Deploy an application to AWS CodeDeploy using OIDC authentication. Import the aws-cli orb and authenticate using the aws-cli/setup command with a valid role-arn for OIDC authentication.


```yaml
version: '2.1'
orbs:
  aws-cli: circleci/aws-cli@3.1
  aws-code-deploy: circleci/aws-code-deploy@3.0
workflows:
  deploy_application:
    jobs:
      - aws-code-deploy/deploy:
          application-name: myApplication
          auth:
            - aws-cli/setup:
                profile: OIDC-USER
                role-arn: arn:aws:iam::123456789012:role/VALID_OIDC_CODEDEPLOY_ROLE
          bundle-bucket: myApplicationS3Bucket
          bundle-key: myS3BucketKey
          context: CircleCI_OIDC_Token
          deployment-group: myDeploymentGroup
          profile: OIDC-USER
          service-role-arn: myDeploymentGroupRoleARN
```