Skip to content

Commit

Permalink
chore(RDSDiskSpaceLimit): Add command to increase storage
Browse files Browse the repository at this point in the history
  • Loading branch information
vmercierfr committed Jan 2, 2024
1 parent c62589b commit 1303a2d
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions content/runbooks/rds/RDSDiskSpaceLimit.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,33 @@ You must avoid reaching no disk space left situation.

- Increase RDS disk space

{{< hint warning >}}
{{< hint danger >}}
{{% aws-rds-storage-increase-limitations %}}
{{< /hint >}}

1. Determine the minimum storage for the increase

```bash
INSTANCE_IDENTIFIER=<replace with the RDS instance identifier>
```

```bash
aws rds describe-db-instances --db-instance-identifier ${INSTANCE_IDENTIFIER} \
| jq -r '{"Current IOPS": .DBInstances[0].Iops, "Current Storage Limit": .DBInstances[0].AllocatedStorage, "New minimum storage size": ((.DBInstances[0].AllocatedStorage|tonumber)+(.DBInstances[0].AllocatedStorage|tonumber*0.1|floor))}'
```

1. Increase storage:

```bash
NEW_ALLOCATED_STORAGE=<replace with new allocated storage in GB>
```

```bash
aws rds modify-db-instance --db-instance-identifier ${RDS_INSTANCE} --allocated-storage ${INSTANCE_IDENTIFIER} --apply-immediately \
| jq .DBInstance.PendingModifiedValues
```

## Additional resources

n/a
- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.DBInstance.Modifying.html>
- <https://docs.aws.amazon.com/cli/latest/reference/rds/modify-db-instance.html>

0 comments on commit 1303a2d

Please sign in to comment.