canonical: https://jentic.com/apis/amazonaws.com/codedeploy

# AWS CodeDeploy

Jentic publishes the only available OpenAPI specification for AWS CodeDeploy, keeping it validated and agent-ready. AWS CodeDeploy automates code deployments to EC2, on-premises servers, ECS services, and Lambda functions with blue/green and in-place strategies. The API covers applications, deployment groups, deployments, deployment configs, and on-premises instances, so an agent can trigger releases, monitor deployment progress, and roll back failed deployments programmatically.

## For AI agents

Trigger AWS CodeDeploy deployments to EC2, on-premises servers, ECS, and Lambda, monitor their progress, and stop or roll back failed releases. Backed by 47 endpoints across applications, deployment groups, and deployments.

## Scope

Does not handle source compilation, container image building, or pipeline orchestration - use for deploying revisions to EC2, on-premises, ECS, or Lambda compute targets only.

## Capabilities

- Create CodeDeploy applications and deployment groups for EC2, on-premises, ECS, or Lambda compute
- Trigger deployments with revision pointers to S3, GitHub, or ECS task definitions
- Monitor deployment status, instance-level state, and lifecycle event details
- Stop or roll back deployments mid-flight using StopDeployment and ContinueDeployment
- Define custom deployment configurations with traffic-shifting rules for blue/green
- Register and deregister on-premises instances and tag them for deployment-group targeting
- List deployment history and filter deployments by application, group, or status

## Use cases

### Blue/Green Deployments to ECS or Lambda

Teams running ECS services or Lambda functions use CodeDeploy for blue/green releases that shift traffic gradually and roll back automatically on alarm. CreateDeployment with a revision that points to an appspec.yaml drives the cutover, while GetDeployment and BatchGetDeployments track the lifecycle. ListDeploymentInstances exposes per-target state so an agent can pinpoint which task or alias is unhealthy.

Example prompt: Trigger a deployment for application web-svc and deployment group ecs-prod from the S3 revision s3://artifacts/web/build-42.zip

### EC2 and On-Premises Fleet Releases

For EC2 Auto Scaling groups or on-premises servers running the CodeDeploy agent, CreateDeployment installs the new revision in-place or with rolling updates. RegisterOnPremisesInstance and AddTagsToOnPremisesInstances let an agent onboard a new server and target it via deployment group tag filters. BatchGetDeploymentInstances exposes per-instance lifecycle event status for triage.

Example prompt: Register an on-premises instance with name datacenter-edge-1, tag it with Env=prod, and trigger a deployment to deployment group on-prem-prod

### Automated Rollback on Failure

An ops agent watching deployment progress can call StopDeployment with autoRollbackEnabled to halt a failing rollout and revert to the prior successful revision. The API returns DeploymentStatus values like Failed and Stopped that an agent can poll on, and the rollback itself is created as a new deployment that ListDeployments will surface for downstream notifications.

Example prompt: Stop deployment d-ABC123 with autoRollbackEnabled=true and confirm the new rollback deployment reaches Succeeded

### AI Agent Integration via Jentic

Through Jentic, an AI agent uses CodeDeploy by searching for an intent like 'trigger a CodeDeploy deployment', loading the CreateDeployment schema, and executing it with application name, deployment group, and revision. Jentic signs the SigV4 request server-side using IAM credentials in your Jentic One instance.

Example prompt: Search Jentic for 'trigger a CodeDeploy deployment', load the CreateDeployment schema, and execute it for application web-svc, deployment group prod, and an S3 revision

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /#X-Amz-Target=CodeDeploy_20141006.CreateApplication | Create a CodeDeploy application |
| POST | /#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentGroup | Create a deployment group inside an application |
| POST | /#X-Amz-Target=CodeDeploy_20141006.CreateDeployment | Trigger a deployment from a revision |
| POST | /#X-Amz-Target=CodeDeploy_20141006.GetDeployment | Get full status of a deployment |
| POST | /#X-Amz-Target=CodeDeploy_20141006.StopDeployment | Stop or roll back a running deployment |
| POST | /#X-Amz-Target=CodeDeploy_20141006.ContinueDeployment | Resume a deployment that is waiting for traffic shift |
| POST | /#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentConfig | Define a custom deployment configuration |

## Key resources

- **Application** — Create, describe, update, and delete CodeDeploy applications grouping deployments
- **Deployment Group** — Create deployment groups targeting EC2, on-premises, ECS, or Lambda compute
- **Deployment** — Create, get, stop, and continue deployments and inspect lifecycle event status
- **Deployment Config** — Define custom traffic-shifting configurations for blue/green and canary releases
- **On-Premises Instance** — Register, deregister, and tag on-premises servers running the CodeDeploy agent

## Why Jentic

- **Setup:** Wiring AWS CodeDeploy by hand means signing every request with AWS Signature v4 HMAC, choosing the correct regional host like codedeploy.{region}.amazonaws.com, and routing each call through the X-Amz-Target header rather than a REST path. Through Jentic you install once, import AWS CodeDeploy from the API Directory, store the AWS access key and secret once, and your agent calls it.
- **Permission scoping:** CodeDeploy dispatches operations through the X-Amz-Target header and names the application and deployment group in the request body, not the URL path, so scoping is by operation. You limit the agent to the operations it needs, such as CreateDeployment or GetDeployment, so destructive ones like DeleteApplication or StopDeployment are not included unless you add them.
- **Credential handling:** Your AWS access key and secret are stored once, encrypted, by your own Jentic One instance and injected at execution time when the request is signed. They never enter the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'trigger a CodeDeploy deployment' or 'roll back a failed deployment', and Jentic returns the matching CodeDeploy operation with its input schema, so the agent calls CreateDeployment or StopDeployment directly without browsing AWS docs.

## Related APIs

- **AWS CodePipeline** — CodePipeline orchestrates multi-stage release flows that invoke CodeDeploy as a deploy action
- **AWS CodeCommit** — CodeCommit hosts source revisions that flow into CodeDeploy via CodePipeline or CodeBuild
- **AWS Lambda** — Lambda is a primary deployment target for CodeDeploy traffic-shifting strategies

## FAQ

### Why is there no official OpenAPI spec for AWS CodeDeploy?

AWS does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call AWS CodeDeploy via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the AWS CodeDeploy API use?

CodeDeploy uses AWS Signature Version 4 (HMAC) signed requests with an IAM access key and secret. Through Jentic, IAM credentials live encrypted in your Jentic One instance and the SigV4 signature is computed server-side, so the agent context never holds the raw secret.

### Can I trigger a deployment from an S3 or GitHub revision through the API?

Yes. Call CreateDeployment with applicationName, deploymentGroupName, and a revision object referencing either an S3Location (bucket, key, bundleType) or a GitHubLocation (repository, commitId). The deployment ID is returned synchronously; poll GetDeployment to track Status and DeploymentOverview.

### How do I roll back a failed deployment programmatically?

Call StopDeployment with the deploymentId and autoRollbackEnabled=true. CodeDeploy stops the in-flight deployment and creates a new rollback deployment that reverts to the last successful revision; ListDeployments returns it with createdBy=rollback.

### What are the rate limits for the AWS CodeDeploy API?

AWS enforces per-account, per-region throttling on CodeDeploy control-plane calls; CreateDeployment is limited to a small number of TPS per account. Throttled responses return ThrottlingException - the AWS SDKs that Jentic wraps implement exponential backoff automatically.

### How do I trigger a CodeDeploy release through Jentic with an AI agent?

Run pip install jentic, then have the agent search for 'trigger a CodeDeploy deployment', load the CreateDeployment schema, and execute it with applicationName, deploymentGroupName, and a revision pointer. Poll GetDeployment for status, and call StopDeployment with autoRollbackEnabled=true if the deployment fails.

### Can I limit what my agent is allowed to do with the AWS CodeDeploy API?

Yes. Because CodeDeploy dispatches each operation through the X-Amz-Target header and names the application and deployment group in the request body rather than the URL path, scoping is done per operation. In your self-hosted Jentic One instance, your own rules decide which operations the agent may call, so you can allow read and trigger calls like GetDeployment and CreateDeployment while withholding destructive ones such as DeleteApplication or StopDeployment. The same instance holds the IAM credentials and only injects them at execution time for the operations you have permitted.
