Deployment is not the same as release
When practicing continuous serverless delivery, the deployment and release of a code change should be considered separate phases. The deployment phase involves delivering the change to your AWS account, through the creation or modification of your infrastructure or business logic. The release phase involves delivering the change to your application’s users and making that version of your application publicly available. In this way, many incremental deployments of individual changes could add up to a feature release.
It can be particularly useful to distinguish between deployment of code and the release of a feature to your users when facing doubts about continuously deploying a business-critical application, such as a payments platform. Adding manual approval processes and controls to the deployment of such applications is often suggested, but this actually runs counter to the intention of maintaining stability as it leads to queues of changes.
Instead, you can separate deployments from releases by adopting different release or versioning strategies based on the feature being introduced:
Dark releases
If your users are unaware of a new feature or cannot easily access it, code changes can be deployed to and tested in production without serving real traffic. This can be your default option for entirely new and isolated services, as it will allow you to release changes early and often, before the features are ready to be used.
Feature flags
Feature flags allow you to target groups of users with the release of new features. For example, you could activate a feature for users in a smaller market before rolling it out to larger markets. AWS AppConfig can be used to manage and toggle feature flags in your environments.
Canaries
You can use a canary deployment strategy to achieve a gradual rollout of your code changes, rather than deploying them to all users at once. For example, you could choose to deploy a change to 10% of your users and then, if every‐ thing is scaling and working as expected, deploy it to the remaining 90% five minutes later. AWS CodeDeploy can be used to apply a blue/green deployment configuration to the release of Lambda functions. Failed deployments can also be automatically rolled back when using CodeDeploy.