Pausing and resuming an App Runner service
If you need to disable your web application temporarily and stop the code from running, you can pause your AWS App Runner service. App Runner reduces the compute capacity for the service to zero.
When you're ready to run your application again, you can resume your App Runner service. App Runner provisions new compute capacity, deploys your application to it, and runs the application. Your application source isn't redeployed, and no build is necessary. Rather, App Runner resumes with your currently deployed version. Your application retains its App Runner domain.
Important
-
When you pause your service, your application loses its state. For example, any ephemeral storage that your code used is lost. For your code, pausing and resuming your service is the equivalent of deploying to a new service.
-
If you pause a service due to a flaw in your code (for example, a discovered bug or security issue), you can't deploy a new version before resuming the service.
Therefore, we recommend that you keep the service running and roll back to your last stable application version instead.
-
When you resume your service, App Runner deploys the last application version that was used before you paused the service. If you added any new source versions since pausing your service, App Runner doesn't automatically deploy them even if automatic deployment is selected. For example, assume you have new image versions in the image repository or new commits in the code repository. These versions aren't automatically deployed .
To deploy a newer version, perform a manual deployment or add another version to your source repository after resuming your App Runner service.
Pausing and deleting compared
Pause your App Runner service to temporarily disable it. Only compute resources are terminated, and your stored data (for example, the container image with your application version) remains intact. Resuming your service is quick—your application is ready to be deployed to new compute resources. Your App Runner domain remains the same.
Delete your App Runner service to permanently remove it. Your stored data is deleted. If you need to recreate the service, App Runner needs to fetch your source again, and also to build it if it's a code repository. Your web application gets a new App Runner domain.
When your service is paused
When you pause your service and it's in the Paused status, it responds differently to action requests, including API calls or console operations. When a service is paused, you can still perform App Runner actions that don't modify the definition or configuration of the service in a way that affects its runtime. In other words, if an action changes the behavior, scale, or other characteristics of a running service, you cannot perform that action on a paused service.
The following lists provide information about API actions that you can and cannot perform on a paused service. The equivalent console operations are similarly allowed or denied.
Actions you can perform on a paused service
-
List*
andDescribe*
actions – Actions that only read information. -
DeleteService
– You can always delete a service. -
TagResource
,UntagResource
– Tags are associated with a service, but aren't part of its definition and don't affect its runtime behavior.
Actions you cannot perform on a paused service
-
StartDeployment
actions (or a manual deployment using the console) -
UpdateService
(or a configuration change using the console, except for tagging changes) -
CreateCustomDomainAssociations
,DeleteCustomDomainAssociations
-
CreateConnection
,DeleteConnection
Pause and resume your service
Pause and resume your App Runner service using one of the following methods: