Skip to content

Commit 1303a2d

Browse files
committed
chore(RDSDiskSpaceLimit): Add command to increase storage
1 parent c62589b commit 1303a2d

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

content/runbooks/rds/RDSDiskSpaceLimit.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,33 @@ You must avoid reaching no disk space left situation.
6969

7070
- Increase RDS disk space
7171

72-
{{< hint warning >}}
72+
{{< hint danger >}}
7373
{{% aws-rds-storage-increase-limitations %}}
7474
{{< /hint >}}
7575

76+
1. Determine the minimum storage for the increase
77+
78+
```bash
79+
INSTANCE_IDENTIFIER=<replace with the RDS instance identifier>
80+
```
81+
82+
```bash
83+
aws rds describe-db-instances --db-instance-identifier ${INSTANCE_IDENTIFIER} \
84+
| 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))}'
85+
```
86+
87+
1. Increase storage:
88+
89+
```bash
90+
NEW_ALLOCATED_STORAGE=<replace with new allocated storage in GB>
91+
```
92+
93+
```bash
94+
aws rds modify-db-instance --db-instance-identifier ${RDS_INSTANCE} --allocated-storage ${INSTANCE_IDENTIFIER} --apply-immediately \
95+
| jq .DBInstance.PendingModifiedValues
96+
```
97+
7698
## Additional resources
7799

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

0 commit comments

Comments
 (0)