AWS CLI Command describe-orderable-db-instance-option for Amazon DocumentDB

0

I am trying to get the list of instance classes available in my region for Amazon DocumentDB using CLI command:

aws docdb describe-orderable-db-instance-options --engine docdb --query 'OrderableDBInstanceOptions[*].DBInstanceClass'

shared at guide: https://docs.aws.amazon.com/documentdb/latest/developerguide/db-instance-add.html

Unfortunately I got repeating entries in the output. Is there a specific reason that I got multiple entries for an instance class?

Following is the outcome for eu-central-1 Frankfurt regions

[ "db.r5.12xlarge", "db.r5.16xlarge", "db.r5.24xlarge", "db.r5.2xlarge", "db.r5.4xlarge", "db.r5.8xlarge", "db.r5.large", "db.r5.xlarge", "db.t3.medium", "db.r5.12xlarge", "db.r5.16xlarge", "db.r5.24xlarge", "db.r5.2xlarge", "db.r5.4xlarge", "db.r5.8xlarge", "db.r5.large", "db.r5.xlarge", "db.r6g.12xlarge", "db.r6g.16xlarge", "db.r6g.2xlarge", "db.r6g.4xlarge", "db.r6g.8xlarge", "db.r6g.large", "db.r6g.xlarge", "db.t3.medium", "db.t4g.medium", "db.r5.12xlarge", "db.r5.12xlarge", "db.r5.16xlarge", "db.r5.16xlarge", "db.r5.24xlarge", "db.r5.24xlarge", "db.r5.2xlarge", "db.r5.2xlarge", "db.r5.4xlarge", "db.r5.4xlarge", "db.r5.8xlarge", "db.r5.8xlarge", "db.r5.large", "db.r5.large", "db.r5.xlarge", "db.r5.xlarge", "db.r6g.12xlarge", "db.r6g.12xlarge", "db.r6g.16xlarge", "db.r6g.16xlarge", "db.r6g.2xlarge", "db.r6g.2xlarge", "db.r6g.4xlarge", "db.r6g.4xlarge", "db.r6g.8xlarge", "db.r6g.8xlarge", "db.r6g.large", "db.r6g.large", "db.r6g.xlarge", "db.r6g.xlarge", "db.t3.medium", "db.t3.medium", "db.t4g.medium", "db.t4g.medium" ]

Thanks a lot,

Eralper
已提問 4 個月前檢視次數 212 次
1 個回答
2
已接受的答案

Hello,

You can try the below command for the desired result

aws docdb describe-orderable-db-instance-options --engine docdb --query 'OrderableDBInstanceOptions[*].DBInstanceClass' | jq -r '.[]' | sort | uniq

This can occur for a few reasons for multiple entries:

  • The same instance class is available for different instance storage types (standard, provisioned IOPS). Each storage type will be listed separately.
  • In some Regions, the same class is available with both VPC and non-VPC network connectivity options. These will appear as duplicates.
  • If an instance class has different capabilities or configurations available in the current Region, each variant will be listed separately.

Let me know if you have any other issues

Thanks

Abhinav

已回答 4 個月前
profile picture
專家
已審閱 4 個月前
profile pictureAWS
專家
已審閱 4 個月前
  • The repeated DBInstanceClass comes from OrderableDBInstanceOptions[*] in your query: several OrderableDBInstanceOptions point to same instance class. Just remove the --query option and submit again to see the original data structure with repeated classes.

  • Abhinav is correct. Its because there are different storage types along with Engine Versions. You would have to add additonal filters to match your requirements.

  • Great it works! Thanks a lot for the explanations, as I understand for scaling, I should pass the Instance Options parameters accordingly to get the list of correct instance classes for the minimum higher configuration.

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南