Skip to content

fix(E3670): Use full xlarge names for Amazon MQ instance types - #4760

Merged
kddejong merged 1 commit into
aws-cloudformation:mainfrom
Thanatos9404:fix/e3670-mq-xlarge-instance-types
Oct 21, 2026
Merged

kddejong merged 1 commit into
aws-cloudformation:mainfrom
Thanatos9404:fix/e3670-mq-xlarge-instance-types

Conversation

@Thanatos9404

Copy link
Copy Markdown
Contributor

Issue #, if available:

Fixes #4751

Description of changes:

The Price List usage type shortens Amazon MQ sizes from 2xlarge up (mq.m7g.2xl), and get_mq_pricing() only mapped mq.m5.2xl and mq.m5.4xl back to the full names. So the enum listed mq.m7g.2xl through mq.m7g.16xl (36 regions) and mq.m7i.2xl/4xl (ap-east-2, ap-southeast-6), and E3670 rejected mq.m7g.2xlarge and the other names the Amazon MQ API and the docs use.

  • scripts/update_specs_from_pricing.py: replace the two-entry remap with get_mq_instance_type(), which expands any <N>xl size to <N>xlarge. The m5 names come out the same as before.
  • aws_amazonmq_broker/instancetype_enum.json: the same mapping applied to the committed file. I don't have Pricing API access, so this is not a regeneration: I ran the script's own get_mq_instance_type() over every region list and wrote the file back in the format write_output() uses. Only the xl names change (184 lines renamed, nothing added or removed), and every size keeps its place in the sorted lists.

mq.m4.large and mq.t2.micro, which the issue also mentions, are left alone here: the Price List still lists them, so removing them by hand would be undone by the next pricing run.

Tests: a new parametrized test for BrokerInstanceTypeEnum (all five m7g sizes in us-east-1, the two m7i sizes in ap-east-2 and ap-southeast-6, and mq.m7g.2xl, an unknown size and an m7i size outside those regions as failures), and a test in test_update_specs_from_pricing.py that runs get_mq_pricing() on mocked Price List products. On main 9 of the new cases fail; with this change they pass, 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.

The pricing usage type shortens sizes from 2xlarge up (mq.m7g.2xl), and
get_mq_pricing() only mapped mq.m5.2xl and mq.m5.4xl back to the names
the Amazon MQ API uses. So the m7g sizes from 2xlarge to 16xlarge (36
regions) and the m7i 2xlarge and 4xlarge (ap-east-2, ap-southeast-6)
were listed under the short names, and E3670 rejected the real ones.

Expand any "<N>xl" size to "<N>xlarge" in the script, and apply the
same mapping to the committed instancetype_enum.json. Only those names
change; the file was not regenerated from the Pricing API.
@kddejong
kddejong force-pushed the fix/e3670-mq-xlarge-instance-types branch from b5bacba to 7ec6727 Compare October 21, 2026 19:12
@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.67%. Comparing base (dff589f) to head (7ec6727).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4760   +/-   ##
=======================================
  Coverage   94.67%   94.67%           
=======================================
  Files         439      439           
  Lines       15969    15969           
  Branches     3095     3095           
=======================================
  Hits        15118    15118           
  Misses        468      468           
  Partials      383      383           
Flag Coverage Δ
unittests 94.67% <ø> (ø)

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 07673d3 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.

E3670: Amazon MQ enum spells m7g/m7i sizes with the Pricing xl abbreviation, rejecting the API names

2 participants