Recently I have created a codestar web services in AWS. This internally uses elastic beanstalk environment with load-balancer, code pipeline, code deploy services for end to end working. What I can do now is make some code changes locally and deploy it to the codestar. What I want to do now is setup extra environment say alpha-environment and deploy it to first and then deploy it to my production environment for better testing. One way I can do is that create an extra environment for alpha-stage, make some changes deploy to it and then deploy manually to prod stage. But that will create two different repositories in AWS and I don't know how will I copy changes from alpha-environment to prod-environment. Please tell me the best way to deploy first to an alpha stage and then automatically to beta stage.
1 Answers
What you want to do is is called a Canary Deployment (or Canary release). It allows you to do some testing in production on a release before making it live to all if your users. It is a modified form of Blue/Green deployment.
A Blue/Green deployment is when you roll out the new version (Green) to production at the same time your current version (Blue) is in production. The theory is, if the Green deployment is bad, and you leave the Blue in place, you can rollback to the Blue deployment with little downtime.
A Canary deployment is a Blue/Green where you route a small percentage of your traffic to the Green deployment to ensure that the Green is stable and working as intended. If the Canary test succeeds, then you route 100% of the traffic to the Green environment. The Blue environment can be taken down or reused for the next release.
On the other hand, if the Canary test fails, you route 100% of the traffic back to the Blue environment and take down the Green or reuse it for the next release.
Elastic Beanstalk allows you to quickly create two versions of your application to separate Elastic Beanstalk environments with the clone environment (via the Console or command line). The newly cloned environment will be your Green environment.
Then you leverage Amazons Route 53 along with the Weighted Routing Routing Policy feature. This allows you to take a single domain name, and split traffic between your Blue and Green environments based on the percentage you decide within the policy. Start out small and if Green is good, you go to 100%.
Here are some references:
Elastic Beanstalk Clone environment feature

- 5,763
- 4
- 31
- 40