Restart EC2 and on-premises fleets faster with AWS CodeDeploy RESTART deployment mode
When you need to restart a fleet of servers, you typically face a choice: do it manually with SSH commands (risky and slow) or trigger a full redeployment (safe but overkill). AWS CodeDeploy now offers a middle ground with its new RESTART deployment mode, which reapplies your last successful application revision without waiting for a complete deployment pipeline. In testing, this approach ran up to 6.1x faster than standard deployments—a significant improvement when you’re troubleshooting production issues or recovering from a service degradation.
Here’s how it works technically. CodeDeploy’s RESTART mode skips the typical deployment lifecycle steps—no fetching from S3, no running install scripts, no waiting for new artifacts to download. Instead, it leverages the application code already present on your instances from the last successful deployment and simply triggers a restart of your application services. The orchestration still happens through CodeDeploy itself, so you retain all the production-grade safeguards: configurable batch sizes (how many instances restart at once), automated health checks between batches, CloudWatch alarm monitoring for failures, and automatic rollback if something goes wrong. This means you get the speed of a quick restart without sacrificing the safety that made you adopt CodeDeploy in the first place.
The practical value becomes clear in real scenarios. Imagine you’re running a microservices fleet and a memory leak causes your application to degrade over time. Instead of waiting 10-15 minutes for a full deployment to cycle through 50 instances, you can now trigger a RESTART that completes in 2-3 minutes. Similarly, if you need to apply a configuration change that only requires reloading your app (not code changes), RESTART avoids redownloading and reinitializing everything. For on-premises servers, where network bandwidth or artifact storage might be constrained, the speed improvement can be even more dramatic. You still get the batch-based rollout with health monitoring—if alarms trigger during a batch restart, CodeDeploy stops and rolls back—so you’re not trading safety for speed.
This feature fits naturally into your existing CodeDeploy workflows without requiring new skills or processes. If you’re already using appspec.yaml files and deployment groups, you simply select RESTART as the deployment mode instead of IN_PLACE or BLUE_GREEN. It’s particularly valuable when you can’t afford the downtime of a blue-green swap or when a quick service restart is genuinely all you need. For growing teams managing cloud infrastructure, it’s another tool that reduces manual operational overhead and keeps critical workflows inside your deployment automation platform where they belong.