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.

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则