Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add command to increase storage #22

Merged
merged 1 commit into from
Jan 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>