Skip to content

AWS CodeDeploy Agent

The AWS CodeDeploy agent is a software package that, when installed and configured on an instance, makes it possible for that instance to be used in AWS CodeDeploy deployments. The agent receives deployment instructions from the CodeDeploy service, downloads your application revisions, and runs the lifecycle event hooks defined in your AppSpec file to install and validate your application on EC2/On-Premises instances.

The CodeDeploy agent is required only if you deploy to an EC2/On-Premises compute platform. It is not required for deployments that use the Amazon ECS or AWS Lambda compute platform.

The agent is licensed under Apache License 2.0.

Getting Started

Prerequisites

  • Rust (the minimum supported version is declared as rust-version in Cargo.toml)
  • Cargo (ships with Rust)

Build from source

git clone https://github.com/aws/aws-codedeploy-agent.git
cd aws-codedeploy-agent
cargo build --release

The agent binary is placed at target/release/codedeploy-agent.

Windows builds are also supported via the x86_64-pc-windows-msvc and x86_64-pc-windows-gnu targets. See DEVELOPMENT.md for the toolchain setup.

Run the agent

# Start the daemon
codedeploy-agent start

# Check status (exit 0 = running, exit 3 = stopped)
codedeploy-agent status

# Stop the daemon
codedeploy-agent stop

The agent reads its configuration from a YAML file; a documented template is provided in conf/codedeployagent.yml (installed as the live config by the packages). Pass a custom config with --config-file <path>.

Documentation

For full guidance on installing, configuring, and operating the agent, see the AWS CodeDeploy User Guide:

Development

Common tasks are exposed through make:

make help     # List all available targets
make build    # Build the project
make test     # Run the test suite
make ci       # Run all CI checks (format, lint, test)

See DEVELOPMENT.md for the full development workflow, tooling, project layout, and local/end-to-end testing instructions.

Contributing

Contributions are welcome. Please read the contribution guidelines before opening a pull request, and see DEVELOPMENT.md for development setup.

Security

If you discover a potential security issue in this project, please do not create a public GitHub issue. Instead, refer to the AWS Vulnerability Reporting page or email aws-security@amazon.com.

Code of Conduct

This project has adopted the Amazon Open Source Code of Conduct.

License

This project is licensed under the Apache License 2.0. See the NOTICE file for attribution.

Releases

Packages

Used by

Contributors

Languages