With all the CD Abstraction pieces out of the way, now it is time to define the Workflow which will power the Canary analysis.
Create a new Workflow for the Sample App.
Setup -> AWS Canary Lab -> Workflows + Add Workflow
Once you hit Submit, can add a canary phase under “Deployment Phases” with + Add Phase
In the Phase definition, select the Sample App Service and your Infrastructure Definition.
Once you click Submit, your Canary Phase will be empty. This step will be filling out the Prometheus Details.
In the Verify section, click + Add Step. Search for “prom” as a function to add.
Select Prometheus and then click Next. This is where the Prometheus queries will be entered.
Add another metric for Errors with + Add
Then set the Analysis Time to 5 mins and Algorithm to Sensitive.
When completed it should look like this.
Click Submit and you now have Prometheus added to analyze the canary.
As a good practice, can automate the removal of the resources if the canary should fail. On the right hand side under Rollback Steps, in the Deploy Phase, + Add Step.
Search for “Del” for the Delete Step.
Select Delete.
Click Submit and the final canary should look like this.
Now you are ready to deploy your application.