Skip to content

fix(E3620): Add db.serverless to the DocumentDB instance classes - #4761

Merged
kddejong merged 1 commit into
aws-cloudformation:mainfrom
Thanatos9404:fix/e3620-docdb-serverless
Oct 21, 2026
Merged

kddejong merged 1 commit into
aws-cloudformation:mainfrom
Thanatos9404:fix/e3620-docdb-serverless

Conversation

@Thanatos9404

Copy link
Copy Markdown
Contributor

Issue #, if available:

Fixes #4750

Description of changes:

DocumentDB Serverless instances use the db.serverless instance class (docs), but the Price List prices them by capacity unit, outside the Database Instance products the pricing script reads. So the class never reached the enum and E3620 rejected it in every region.

  • scripts/update_specs_from_pricing.py: pass default=set(["db.serverless"]) for DocumentDB, the same way Add db.serverless to neptune instance classes #3009 did for Neptune.
  • aws_docdb_dbinstance/dbinstanceclass_enum.json: add db.serverless to every region list, which is what the script now produces. I don't have Pricing API access, so the file was edited, not regenerated: one sorted line per region (34), nothing else changes.

AWS's Supported instance classes by Region table marks Serverless as supported in every DocumentDB Region, the same 34 Regions the enum lists, so the default applies to all of them, as it does for Neptune.

Tests: a new parametrized test for DBInstanceClassEnum (db.serverless in us-east-1 and il-central-1 as in the issue, plus a class DocumentDB doesn't offer and one missing from a region, which are still reported), and a test in test_update_specs_from_pricing.py that runs main() with mocked Price List pages and checks the DocumentDB output includes db.serverless. The db.serverless case and the main() test fail on main and pass with this change; the other three cases pass on both. The full test suite passes (Python 3.13), and pre-commit run on the changed files passes. No snapshot under test/fixtures/results is affected.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

DocumentDB Serverless instances use the db.serverless class, but the
Price List prices them by capacity unit, outside the "Database
Instance" products that get_results() reads. The class never reached
the enum, so E3620 rejected it in every region.

Seed db.serverless as a default for DocumentDB, as the script already
does for Neptune (aws-cloudformation#3009), and add it to every region list in the
committed dbinstanceclass_enum.json. Only that value is added; the file
was not regenerated from the Pricing API.
@kddejong
kddejong force-pushed the fix/e3620-docdb-serverless branch from 7c4ece6 to deaac79 Compare October 21, 2026 18:08
@codecov

codecov Bot commented Oct 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.66%. Comparing base (7e4b262) to head (deaac79).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4761   +/-   ##
=======================================
  Coverage   94.66%   94.66%           
=======================================
  Files         439      439           
  Lines       15963    15963           
  Branches     3091     3091           
=======================================
  Hits        15112    15112           
  Misses        468      468           
  Partials      383      383           
Flag Coverage Δ
unittests 94.66% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kddejong
kddejong merged commit 726e572 into aws-cloudformation:main Oct 21, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

E3620: db.serverless is not in the DocumentDB instance-class enum for any region

2 participants