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

Epic: Remove duplicate instance classes from DescribeOrderableDBInstanceOptions #6125

Open
5 of 7 tasks
meyertst-aws opened this issue Feb 16, 2024 · 0 comments
Open
5 of 7 tasks
Assignees
Labels
Epic Contains many smaller pieces to work on separately Internal To help track internal tickets in a single location.

Comments

@meyertst-aws
Copy link
Contributor

meyertst-aws commented Feb 16, 2024

@max-webster - Creating an epic to address this in other languages.

See the notes below

Expected behavior

I build the Aurora sample code in the C++ SDK and run run_getting_started_with_db_clusters. I expect a prompt like this:

Let's create a DB instance.
The available DB instance classes for your database engine are:
   1: db.r5.12xlarge
   2: db.r5.16xlarge
   3: db.r5.24xlarge
   4: db.r5.2xlarge

and so on for all the eligible instance classes.

Actual behavior

The actual prompt is like so, with all the instance class names doubled:

Let's create a DB instance.
The available DB instance classes for your database engine are:
   1: db.r5.12xlarge
   2: db.r5.12xlarge
   3: db.r5.16xlarge
   4: db.r5.16xlarge
   5: db.r5.24xlarge
   6: db.r5.24xlarge
   7: db.r5.2xlarge
   8: db.r5.2xlarge

This is because at https://github.com/awsdocs/aws-doc-sdk-examples/blob/b20b819fcfadff318cc8cab09f94e6be08c2b140/cpp/example_code/aurora/getting_started_with_db_clusters.cpp#L935C6-L935C43 , the DescribeOrderableDBInstanceOptions() call now returns 2 entries per instance class (at least for most instance classes). One with "StorageType": "aurora" and one with "StorageType": "aurora-iopt1". The entries with "StorageType": "aurora-iopt1" are for the new I/O-optimized feature. The "StorageType": "aurora" ones are more universal because the I/O-optimized feature isn't available for older combinations of engine version and instance class:

$ aws rds describe-orderable-db-instance-options --engine aurora-postgresql | grep StorageType | sort | uniq -c
   1243             "StorageType": "aurora",
    599             "StorageType": "aurora-iopt1",

Therefore I think the best and simplest fix to this code sample is to filter the orderable DB instance classes to only those with the attribute "StorageType": "aurora". Since I think it would be too complicated to offer another choice "I/O-optimized or not?" in the prompts.

I didn't check the other language-specific examples from https://docs.aws.amazon.com/code-library/latest/ug/aurora_example_aurora_CreateDBInstance_section.html , but I presume the same applies if they use the same logic of calling DescribeOrderableDBInstanceOptions().

@meyertst-aws meyertst-aws added the Epic Contains many smaller pieces to work on separately label Feb 16, 2024
@meyertst-aws meyertst-aws changed the title Epic: Remove duplicates instance clasess from DescribeOrderableDBInstanceOptions Epic: Remove duplicates instance classes from DescribeOrderableDBInstanceOptions Feb 19, 2024
@meyertst-aws meyertst-aws changed the title Epic: Remove duplicates instance classes from DescribeOrderableDBInstanceOptions Epic: Remove duplicate instance classes from DescribeOrderableDBInstanceOptions Feb 19, 2024
@DavidSouther DavidSouther removed their assignment Jul 25, 2024
@brmur brmur added the Internal To help track internal tickets in a single location. label Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Epic Contains many smaller pieces to work on separately Internal To help track internal tickets in a single location.
Projects
None yet
Development

No branches or pull requests

7 participants