Skip to content
New issue

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

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

Already on GitHub? # to your account

aws_rds: VER_13_13 not available but documentation says otherwise #30445

Closed
bayoishola opened this issue Jun 4, 2024 · 12 comments
Closed

aws_rds: VER_13_13 not available but documentation says otherwise #30445

bayoishola opened this issue Jun 4, 2024 · 12 comments
Labels
@aws-cdk/aws-rds Related to Amazon Relational Database bug This issue is a bug. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. effort/small Small work item – less than a day of effort p3 response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.

Comments

@bayoishola
Copy link

Describe the bug

Hi,

In the documentation, it says that Postgres Engine version 13.13 should be available but this isn't the case in the cdk library.

Expected Behavior

DatabaseInstanceEngine.postgres(version=PostgresEngineVersion.VER_13_13)

Current Behavior

DatabaseInstanceEngine.postgres(version=PostgresEngineVersion.VER_13_12)
13.12 is the max minor version for Postgres Engine 13 in the library.

Reproduction Steps

from aws_cdk.aws_rds import DatabaseInstanceEngine, PostgresEngineVersion

DatabaseInstanceEngine.postgres(version=PostgresEngineVersion.VER_13_13)

Possible Solution

@jsii.python.classproperty
    @jsii.member(jsii_name="VER_13_13")
    def VER_13_13(cls) -> "PostgresEngineVersion":
        '''Version "13.13".'''
        return typing.cast("PostgresEngineVersion", jsii.sget(cls, "VER_13_13"))

...

Additional Information/Context

AWS recommends upgrading your Amazon RDS for PostgreSQL databases running minor versions to 13.13.

CDK CLI Version

2.143.0 (build 9f2bdf7)

Framework Version

No response

Node.js Version

v20.11.1

OS

Windows

Language

Python

Language Version

3.9.16

Other information

No response

@bayoishola bayoishola added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jun 4, 2024
@github-actions github-actions bot added the @aws-cdk/aws-rds Related to Amazon Relational Database label Jun 4, 2024
@pahud
Copy link
Contributor

pahud commented Jun 4, 2024

It should be available

public static readonly VER_13_13 = PostgresEngineVersion.of('13.13', '13', { s3Import: true, s3Export: true });

Can you make sure you use the latest AWS CDK and try again?

@pahud pahud added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. p3 effort/small Small work item – less than a day of effort effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. effort/medium Medium work item – several days of effort labels Jun 4, 2024
@bayoishola
Copy link
Author

@pahud , thanks for taking a look. I also tried with cdk version 2.144.0 and still no luck.

PS: I am using the Python runtime of the library.

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Jun 4, 2024
@richardgroves
Copy link

VER_15_6 is also listed in the documentation referenced and not actually available in 2.145 (also using Python) - but I do see VER_13_13 listed (and VER_13_14).

@bayoishola
Copy link
Author

@richardgroves , do you mean that VER_13_13 is available in 2.145?

@richardgroves
Copy link

@bayoishola Yes - I see all of 13.3 through 13.14 enumerated in the Python library for 2.145. For 15 it is just 15.2-15.5, but the code for 15.6 was committed 3 days ago, so maybe released in the next version - shame that 15.7 is already available on console...

from aws_cdk import (
    aws_rds as rds
)
print("DB versions:\n" + "\n".join(rds.AuroraPostgresEngineVersion.__dict__.keys()))

for a hacky dump of the versions available.

@bayoishola
Copy link
Author

Thanks for confirming and for the tips as well. @richardgroves

@richardgroves
Copy link

richardgroves commented Jun 13, 2024

Another tip - from CLI you can do this:

aws rds describe-db-engine-versions --engine aurora-postgresql | grep DBEngineVersionDescription

to get a list of the versions available.

From my current CLI version of "aws-cli/2.16.4 Python/3.11.9 Darwin/23.5.0 source/x86_64" I get:

     "DBEngineVersionDescription": "Aurora PostgreSQL (Compatible with PostgreSQL 11.9)",
        "DBEngineVersionDescription": "Aurora PostgreSQL (Compatible with PostgreSQL 11.21)",
        "DBEngineVersionDescription": "Aurora PostgreSQL (Compatible with PostgreSQL 12.9)",
        "DBEngineVersionDescription": "Aurora PostgreSQL (Compatible with PostgreSQL 12.11)",
        "DBEngineVersionDescription": "Aurora PostgreSQL (Compatible with PostgreSQL 12.12)",
        "DBEngineVersionDescription": "Aurora PostgreSQL (Compatible with PostgreSQL 12.13)",
        "DBEngineVersionDescription": "Aurora PostgreSQL (Compatible with PostgreSQL 12.14)",
        "DBEngineVersionDescription": "Aurora PostgreSQL (Compatible with PostgreSQL 12.15)",
        "DBEngineVersionDescription": "Aurora PostgreSQL (Compatible with PostgreSQL 12.16)",
        "DBEngineVersionDescription": "Aurora PostgreSQL (Compatible with PostgreSQL 12.17)",
        "DBEngineVersionDescription": "Aurora PostgreSQL (Compatible with PostgreSQL 12.18)",
        "DBEngineVersionDescription": "Aurora PostgreSQL (Compatible with PostgreSQL 13.7)",
        "DBEngineVersionDescription": "Aurora PostgreSQL (Compatible with PostgreSQL 13.8)",
        "DBEngineVersionDescription": "Aurora PostgreSQL (Compatible with PostgreSQL 13.9)",
        "DBEngineVersionDescription": "Aurora PostgreSQL (Compatible with PostgreSQL 13.10)",
        "DBEngineVersionDescription": "Aurora PostgreSQL (Compatible with PostgreSQL 13.11)",
        "DBEngineVersionDescription": "Aurora PostgreSQL (Compatible with PostgreSQL 13.12)",
        "DBEngineVersionDescription": "Aurora PostgreSQL (compatible with PostgreSQL 13.12)",
        "DBEngineVersionDescription": "Aurora PostgreSQL (Compatible with PostgreSQL 13.13)",
        "DBEngineVersionDescription": "Aurora PostgreSQL (Compatible with PostgreSQL 13.14)",
        "DBEngineVersionDescription": "Aurora PostgreSQL (Compatible with PostgreSQL 14.3)",
        "DBEngineVersionDescription": "Aurora PostgreSQL (Compatible with PostgreSQL 14.4)",
        "DBEngineVersionDescription": "Aurora PostgreSQL (Compatible with PostgreSQL 14.5)",
        "DBEngineVersionDescription": "Aurora PostgreSQL (Compatible with PostgreSQL 14.6)",
        "DBEngineVersionDescription": "Aurora PostgreSQL (Compatible with PostgreSQL 14.7)",
        "DBEngineVersionDescription": "Aurora PostgreSQL (Compatible with PostgreSQL 14.8)",
        "DBEngineVersionDescription": "Aurora PostgreSQL (Compatible with PostgreSQL 14.9)",
        "DBEngineVersionDescription": "Aurora PostgreSQL (Compatible with PostgreSQL 14.10)",
        "DBEngineVersionDescription": "Aurora PostgreSQL (Compatible with PostgreSQL 14.11)",
        "DBEngineVersionDescription": "Aurora PostgreSQL (Compatible with PostgreSQL 15.2)",
        "DBEngineVersionDescription": "Aurora PostgreSQL (Compatible with PostgreSQL 15.3)",
        "DBEngineVersionDescription": "Aurora PostgreSQL (Compatible with PostgreSQL 15.4)",
        "DBEngineVersionDescription": "Aurora PostgreSQL (Compatible with PostgreSQL 15.5)",
        "DBEngineVersionDescription": "Aurora PostgreSQL (Compatible with PostgreSQL 15.6)",
        "DBEngineVersionDescription": "Aurora PostgreSQL (Compatible with PostgreSQL 16.1)",
        "DBEngineVersionDescription": "Aurora PostgreSQL (Compatible with PostgreSQL 16.2)",

So that isn't showing 15.7 and 16.3 which were announced as available on 9th May 2024 - https://aws.amazon.com/about-aws/whats-new/2024/05/amazon-rds-postgresql-supports-new-versions/

There appears to be a lot of lag in the support of new versions across the toolchains.

@bayoishola
Copy link
Author

bayoishola commented Jul 17, 2024

@richardgroves , just getting back to this and I noticed you were looking at aurora postgres (which by the way is available on the console using the command but not in the CDK library) as opposed to rds postgres. Up until aws-cdk-lib version 2.149.0 (current latest release), I still don't see engine version 13_13.

aws rds describe-db-engine-versions --engine postgres | grep DBEngineVersionDescription

@pahud , any update, please?

@pahud
Copy link
Contributor

pahud commented Jul 22, 2024

I can see 13.13 from CLI:

 % aws rds describe-db-engine-versions --engine postgres --query 'DBEngineVersions[*].ValidUpgradeTarget[*].[EngineVersion, Description]' --output text

Also available in doc

https://docs.aws.amazon.com/cdk/api/v2/python/aws_cdk.aws_rds/PostgresEngineVersion.html

PoC

# create a rds with postgres VER_13_13
rds.DatabaseInstance(
	self,
	"RDSInstance",
	engine=rds.DatabaseInstanceEngine.postgres(version=rds.PostgresEngineVersion.VER_13_13),
	vpc=vpc,
	removal_policy=RemovalPolicy.DESTROY,
)

cdk synth should return 13.13 in EngineVersion:

 RDSInstance9F6B765A:
    Type: AWS::RDS::DBInstance
    Properties:
      AllocatedStorage: "100"
      CopyTagsToSnapshot: true
      DBInstanceClass: db.m5.large
      DBSubnetGroupName:
        Ref: RDSInstanceSubnetGroup84B66507
      Engine: postgres
      EngineVersion: "13.13"

@pahud pahud added the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Jul 22, 2024
@bayoishola
Copy link
Author

@pahud , thanks for responding. What version of the python AWS CDK do you have installed for the above? Thanks!

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Jul 22, 2024
@pahud
Copy link
Contributor

pahud commented Jul 23, 2024

@bayoishola

% cdk --version
2.149.0 (build c8e5924)
% grep aws-cdk-lib requirements.txt
aws-cdk-lib==2.149.0

Make sure you have activated the venv and pip install the requirements.txt

$ source .venv/bin/activate
$ pip install -r requirements.txt

@pahud pahud added the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Jul 23, 2024
Copy link

This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

@github-actions github-actions bot added closing-soon This issue will automatically close in 4 days unless further comments are made. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Jul 25, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
@aws-cdk/aws-rds Related to Amazon Relational Database bug This issue is a bug. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. effort/small Small work item – less than a day of effort p3 response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Projects
None yet
Development

No branches or pull requests

3 participants