<p>I believe you are correct, a single long-running connection will prevent AWS Aurora Serverless from triggering the pause-and-resume feature.</p>
<blockquote>
<p>Aurora Serverless v1 can also scale to zero capacity when there are no connections if you enable the pause-and-resume option for your DB cluster's capacity settings.</p>
</blockquote>
<p>Source: <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.how-it-works.html" rel="nofollow noreferrer">How Aurora Serverless v1 works</a></p>
<p>Take this with a grain of salt, though, as I haven't tested this behaviour myself, and the docs aren't perfect. The same doc goes on to reference &quot;no activity&quot; without defining it:</p>
<blockquote>
<p>You can choose to pause your Aurora Serverless v1 DB cluster after a given amount of time with no activity.</p>
</blockquote>
<p>Which begs the question: &quot;does an idle connection count as activity?&quot;</p>
<p>I think the best hint that an idle connection counts as &quot;activity&quot; is that the moment a connection is needed, Aurora Serverless resumes:</p>
<blockquote>
<p>If database connections are requested when an Aurora Serverless DB cluster is paused, the DB cluster automatically resumes and services the connection requests.</p>
</blockquote>

CC BY-SA 4.0
2021-01-19T17:01:09.883Z
2021-01-19T17:01:09.883Z
Woodland
<p>I want to host an application that connects to a DB and makes queries to it. The application holds onto the connection indefinitely but only makes queries to the DB when the user interacts with the frontend.</p>
<p>I know that AWS Aurora Serverless has a &quot;pause compute capacity&quot; feature to only charge you for the DB's storage after a specified amount of time. If the application is still connected to the DB (even without making queries), does that prevent the DB from scaling down to 0 compute units and pausing its compute capacity?</p>

<amazon-web-services><amazon-rds><serverless>
Does a DB connection prevent AWS Aurora Serverless from pausing its compute capacity?
Zachary Delano
# Does a DB connection prevent AWS Aurora Serverless from pausing its compute capacity?

(Asked by: username_0 on 2021-01-18)

I want to host an application that connects to a DB and makes queries to it. The application holds onto the connection indefinitely but only makes queries to the DB when the user interacts with the frontend.

I know that AWS Aurora Serverless has a "pause compute capacity" feature to only charge you for the DB's storage after a specified amount of time. If the application is still connected to the DB (even without making queries), does that prevent the DB from scaling down to 0 compute units and pausing its compute capacity?

**Tags:** amazon-web-services, amazon-rds, serverless


---

## 1 answers

### Answer by username_1 on 2021-01-19. Score: 1 | Accepted answer

I believe you are correct, a single long-running connection will prevent AWS Aurora Serverless from triggering the pause-and-resume feature.

> Aurora Serverless v1 can also scale to zero capacity when there are no connections if you enable the pause-and-resume option for your DB cluster's capacity settings.

Source: [How Aurora Serverless v1 works](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.how-it-works.html)

Take this with a grain of salt, though, as I haven't tested this behaviour myself, and the docs aren't perfect. The same doc goes on to reference "no activity" without defining it:

> You can choose to pause your Aurora Serverless v1 DB cluster after a given amount of time with no activity.

Which begs the question: "does an idle connection count as activity?"

I think the best hint that an idle connection counts as "activity" is that the moment a connection is needed, Aurora Serverless resumes:

> If database connections are requested when an Aurora Serverless DB cluster is paused, the DB cluster automatically resumes and services the connection requests.


---

