AWSAWS CodeDeployDeveloper Tools

aws_codedeploy_deployment_group cost estimation

A CodeDeploy deployment group is free, and deployments to EC2, Lambda, and ECS carry no CodeDeploy charge; the cost is the compute it deploys to.

An aws_codedeploy_deployment_group defines the set of targets a CodeDeploy application deploys to (EC2 instances by tag or Auto Scaling Group, an ECS service, or a Lambda function) along with the deployment and rollback strategy. The deployment group has no charge. CodeDeploy itself is free for deployments to Lambda and ECS, and free for deployments to EC2 and on-premises instances as well, so the orchestration is not a line item.

The cost is the compute the group deploys to and, during blue/green deployments, the temporary extra capacity the strategy spins up. A blue/green deployment to EC2 or ECS provisions a replacement set of instances or tasks alongside the existing ones, so for the overlap window you are paying for roughly double the capacity. On large fleets that overlap can be a meaningful short-term cost even though CodeDeploy adds nothing.

For in-place deployments there is no extra capacity, only the normal cost of the instances or tasks already running. Lambda deployments shift traffic between function versions and add no compute cost. c3x prices the underlying compute (EC2 instances, ECS tasks, or Lambda) that a deployment group targets, and accounts for the temporary double capacity a blue/green strategy provisions, while treating CodeDeploy itself as free.

Terraform example

A minimal but realistic configuration that C3X can estimate.

resource "aws_codedeploy_deployment_group" "app" {
  app_name              = aws_codedeploy_app.app.name
  deployment_group_name = "prod"
  service_role_arn      = aws_iam_role.codedeploy.arn

  deployment_style {
    deployment_type   = "BLUE_GREEN"
    deployment_option = "WITH_TRAFFIC_CONTROL"
  }

  ecs_service {
    cluster_name = aws_ecs_cluster.main.name
    service_name = aws_ecs_service.app.name
  }
}

Pricing dimensions

What you actually pay for when you provision aws_codedeploy_deployment_group.

DimensionUnitWhat's being charged
Deployment groupfreeCodeDeploy deployment groups and deployments to EC2, ECS, and Lambda have no charge.
$0
Target computeper instance-hour / task-hourThe EC2 instances or ECS tasks the group deploys to, billed normally.
m5.large: ~$0.096/hour
Blue/green overlap capacityper instance-hour / task-hourBlue/green briefly runs a replacement fleet alongside the old one, roughly doubling capacity during cutover.
~2x fleet cost during the overlap window

Optimization tips

Common ways to reduce aws_codedeploy_deployment_group cost without changing the workload.

Use in-place deploys where downtime is acceptable

In-place deployments update existing capacity with no temporary duplicate fleet, avoiding the blue/green overlap cost. Reserve blue/green for workloads that need zero-downtime cutover.

Keep blue/green termination windows short

The overlap cost lasts until the old capacity is terminated. Set a short termination wait time after a successful deployment so you stop paying for double capacity quickly.

Right-size the target fleet first

CodeDeploy is free, so all the cost is the compute. Right-sizing the EC2 instances or ECS tasks the group deploys to is where the savings are.

FAQ

Does a CodeDeploy deployment group cost money?

No. Deployment groups are free, and CodeDeploy deployments to EC2, on-premises, ECS, and Lambda carry no CodeDeploy charge. You pay only for the compute the group deploys to.

Does a blue/green deployment cost extra?

Temporarily, yes. Blue/green provisions a replacement fleet alongside the existing one, so during the cutover window you pay for roughly double the instances or tasks until the old set is terminated.

How do I reduce CodeDeploy-related cost?

Since CodeDeploy is free, target the compute: right-size the fleet, prefer in-place deployments where downtime is acceptable, and keep blue/green termination windows short to limit overlap capacity.

Related resources

Estimate this resource in your own Terraform

Free, open source, no API key. C3X parses your Terraform and shows line-item cost for every resource, including aws_codedeploy_deployment_group.