# Account template creation - Duration

This step defines the maximum duration for leases using this template.

[![image.png](https://docs.sandboxstudiosoftware.com/uploads/images/gallery/2026-04/scaled-1680-/uoTimage.png)](https://docs.sandboxstudiosoftware.com/uploads/images/gallery/2026-04/uoTimage.png)

1. Define if you want a **maximum duration to be enforced** for the leases.
2. If you select **Set an expiry date**, enter a value in **Maximum Lease Duration (in Months, Days or Hours)**. The duration configuration determines how long the account is available once leased to a user.
3. Define the **action when the lease expires.** You can either: 
    - **Wipe the account**: This delete all resources and remove access to the users. 
        - <span style="color: rgb(45, 194, 107);">**Pros**</span>: Stop incurring cost
        - <span style="color: rgb(224, 62, 45);">**Cons**</span>: Some data may be lost as the resources will be deleted.
    - **Lock account**: Remove access to end users but keep the resources and data 
        1. <span style="color: rgb(45, 194, 107);">**Pros**</span>: Data and resources remain. Administrators and managers can access the account.
        2. <span style="color: rgb(224, 62, 45);">**Cons**</span>: Resources still incur cost in the AWS account.
4. Define the actions to take based on the thresholds you define.

<p class="callout info">The countdown for a lease starts when the lease is created.</p>


##### Actions:

Sandbox Studio can perform automatic actions if some thresholds are met. You can define those thresholds and actions in the "Actions" section:

[![image.png](https://docs.sandboxstudiosoftware.com/uploads/images/gallery/2026-04/scaled-1680-/2sIimage.png)](https://docs.sandboxstudiosoftware.com/uploads/images/gallery/2026-04/2sIimage.png)

<div class="orderedlist" id="bkmrk-if-you-select-set-a-"></div><p class="callout warning">Important: The threshold’s actions are effectively a **count down** - and only trigger when a certain amount of time is left. e.g. 5 Days left, or 24 Hours to go or in the case of "Wipe" when the account has expired.</p>

Having completed all the fields on the **Duration** page as needed, click on **Next** to [Account template creation - Permissions](https://docs.sandboxstudiosoftware.com/books/manager-guide/page/account-template-creation-permissions "Account template creation - Permissions")

<div class="orderedlist" id="bkmrk--2"></div>