You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 22, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Jun 22, 2026. It is now read-only.
Updating hosting from count: 1 to a load balanced configuration doesn't work with http.alb #5557
We have an existing ALB which is populated in the http.alb field. When used in conjunction with a load balanced hosting setup as specified below we get an error in deploying the service. Note: Deploying a single host works (count: 1), Target Group shows IP in the Target Type field for single host deployments.
deploy service service to environment beta: deploy service: check if changeset is empty: create change set copilot-ID for stack app-beta-service: ValidationError: Template error: instance of Fn::GetAtt references undefined resource TargetGroup
status code: 400, request id: ID: describe change set copilot-dd029c74-a3e8-49fe-9802-4f1d06593d22 for stack app-beta-service: ValidationError: Stack [app-beta-service] does not exist
status code: 400, request id: ID: describe stack: describe stack events for stack app-beta-service: ValidationError: Stack [app-beta-service] does not exist
status code: 400, request id: ID
@iamhopaul123
Using the v1.32.1 doesn't seem to resolve the issue.
Same error as the original comment.
copilot --version
copilot version: v1.32.1
I delete the stack complete and ran it with the following yaml
beta:
cpu: 512 # Number of CPU units for the task.
memory: 1024 # Amount of memory in MiB used by the task.
platform: linux/arm64 # See https://aws.github.io/copilot-cli/docs/manifest/lb-web-service/#platform
count: # Number of tasks that should be running in your service. https://aws.github.io/copilot-cli/docs/manifest/lb-web-service/#count-range
range: 1-2
cooldown:
in: 60s
out: 30s
cpu_percentage: 70
memory_percentage: 80
response_time: 2s
exec: true # Enable running commands in your container.
network:
connect: true # Enable Service Connect for intra-environment traffic between services.
variables:
IS_AWS: true
ASPNETCORE_ENVIRONMENT: Beta
http:
# Import the existing shared-lb
alb: arn:aws:elasticloadbalancing:us-east-1:accountid:loadbalancer/app/shared-beta-lb/id
path: "/"
# Healthcheck endpoint from the SystemModule
healthcheck:
path: "/api/system/heartbeat"
healthy_threshold: 2
unhealthy_threshold: 2
grace_period: 10s
interval: 6s
timeout: 5s
deregistration_delay: 5s # Speeds up deploys
redirect_to_https: true
alias: "example.com"
hosted_zone: "ZONEID"
Hello @joelypolly. You are right. I am terribly sorry about that. It is because we didn't fix the part for target group referencing the ALB metric (response_time) when users import ALB. Would you mind using yaml patch for a temporary workaround?
I'm experiencing a related problem. When trying to import an existing ALB into a Copilot service manifest that includes autoscaling, I get the following error:
â Proposing infrastructure changes for stack amendments-prod-amendments
â deploy service amendments to environment prod: deploy service: check if changeset is empty: create change set copilot-f99e579c-f5af-477e-b59c-fb58561aa26b for stack amendments-prod-amendments: ValidationError: Template error: instance of Fn::GetAtt references undefined resource TargetGroup
status code: 400, request id: c2feacc3-42a0-464d-b45e-029c8b006127: describe change set copilot-f99e579c-f5af-477e-b59c-fb58561aa26b for stack amendments-prod-amendments: ChangeSetNotFound: ChangeSet [copilot-f99e579c-f5af-477e-b59c-fb58561aa26b] does not exist
The relevant portion of the service manifest:
count:
cooldown:
in: 30sout: 60scpu_percentage: 70memory_percentage:
value: 80cooldown:
in: 60sout: 160srequests: 1000# problem is hereresponse_time: 3srange:
min: 1max: 3
When I remove requests, the service deploys deploys and uses the imported ALB.
Activity
iamhopaul123 commentedon Dec 13, 2023
Looks like it is related to this bug #5485. We are working on a patch release which shall fix this issue.
iamhopaul123 commentedon Dec 13, 2023
Hello! The fix is now released in v1.32.1: https://github.com/aws/copilot-cli/releases/tag/v1.32.1
joelypolly commentedon Dec 14, 2023
@iamhopaul123
Using the
v1.32.1doesn't seem to resolve the issue.Same error as the original comment.
I delete the stack complete and ran it with the following yaml
iamhopaul123 commentedon Dec 14, 2023
Hello @joelypolly. You are right. I am terribly sorry about that. It is because we didn't fix the part for target group referencing the ALB metric (
response_time) when users import ALB. Would you mind using yaml patch for a temporary workaround?joelypolly commentedon Dec 14, 2023
That fixed the problem. Thanks @iamhopaul123
fix: responseTime should respect import ALB (#5564)
d-flood commentedon May 10, 2024
I'm experiencing a related problem. When trying to import an existing ALB into a Copilot service manifest that includes autoscaling, I get the following error:
The relevant portion of the service manifest:
When I remove
requests, the service deploys deploys and uses the imported ALB.iamhopaul123 commentedon May 10, 2024
Hello @d-flood. Does the yaml patch workaround work for you?