3

This is my case.

  • one instance with three application [ 4000, 4001, 4002 ].

  • Created an ALB and redirected 3 domains to three target groups using rules

  • When I use to create an application in Code-deploy [Blue-green], it asks for only one target group at a time. But I have three target groups associated with the autoscaling group.

  • After Deployment it is not registering instances with other two target groups. I tried Creating Different ALB, i.e., three ALB with three target groups. But I end up in code deploy sending traffic to one target group.

I am deploying code directly from bitbucket. I need code to deploy [Blue-green] to register instance automatically with all three target groups. But as per AWS CodeDeploy documentation, only one target group can be selected at the time of code deploy. Any kind of help is much appreciated.

1 Answer 1

2

At the moment, CodeDeploy does not support configuring multiple target groups in a single deployment. There are workarounds, but they're not awesome.

1. Break out each application into its own deployment group and deployment individually

You could deploy each application separately in a different deployment group, which would allow you to register/deregister to each target group. However, this approach would not work with blue/green deployments.

2. Register/deregister 2 target groups in your user scripts

You could configure your appspec to register and deregister from 2 targets groups using a script. There is a sample script on Github, though it's not not recommended for production use.

3. Break out your application into 3 sets of instances

Right now, you're running 3 different applications on the same hosts. You probably have good reason to do that, but if you could break out the applications into 3 different sets of hosts, you could break them into 3 different deployment groups and still use blue/green deployments.

Sign up to request clarification or add additional context in comments.

2 Comments

yes sorted out already . i configured aws configs in image . so it can register/deregister with TG and used appspec.yml to do it . Anyway thanks for the answer
@gotam what do you mean by "i configured aws configs in image"? you used scripting? something else?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.