- Newest
- Most votes
- Most comments
Hello.
This error occurs when there is not enough on-demand capacity in the selected Availability Zone or when the instance class is not available in that Availability Zone.
https://repost.aws/knowledge-center/aurora-mysql-instance-class-error
The Cannot modify the instance class error occurs when the Availability Zone doesn't have enough on-demand capacity for the instance class that you chose. To resolve this issue, wait a few minutes, and then modify the instance class again. This error also occurs if the instance class isn't available for your Aurora engine and version in the Availability Zone that the instance runs on.
Execute the following command to check if db.t4g.small is available in us-east-2c.
If it is available, it may be that you do not have enough on-demand capacity, so please try starting it again after a while.
aws rds describe-orderable-db-instance-options --engine postgres --engine-version engine_version --db-instance-class db.t4g.small --query 'OrderableDBInstanceOptions[].AvailabilityZones'
When you're trying to modify an RDS PostgreSQL instance class and encounter the error about no instances being available in the current availability zone, this indicates a capacity constraint for that specific instance type in that particular availability zone.
To resolve this issue, you have a few options:
1. **Try again later**: AWS capacity fluctuates, so the requested instance class might become available in your availability zone (us-east-2c) at a later time.
2. **Choose a different instance class**: Select another instance class that's available in your current availability zone. For PostgreSQL 15.5 and higher, supported burstable instance classes include db.t3.medium, db.t3.micro, db.t3.small, db.t3.large, db.t3.xlarge, db.t3.2xlarge, and various t4g sizes.
3. **Multi-step modification**: If you need to both change the instance class and make other modifications (like upgrading the engine version), try doing this in separate steps. First change the instance class, then make other modifications.
4. **Use the AWS CLI**: Sometimes using the CLI can provide more flexibility than the console. You can use a command like:
```
aws rds modify-db-instance --db-instance-identifier your-instance-identifier --db-instance-class db.t4g.small --apply-immediately
```
5. **Create a snapshot and restore**: As a last resort, you could take a snapshot of your database, and restore it to a new instance with your desired instance class, potentially selecting a different availability zone where that instance class is available.
Note that when selecting instance classes, make sure you're choosing from the "Burstable classes" category in the console if you're looking for t-class instances, as these might not appear by default in the selection menu.
Sources
Problem Upgrading PostGreSQL RDS | AWS re:Post
DB instance classes - Amazon Relational Database Service
Postgres instance type modify | AWS re:Post
Modifying an Amazon RDS DB instance - Amazon Relational Database Service
Relevant content
- asked 5 years ago
