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

fixed issue with OD pricing for european regions #132

Merged
merged 2 commits into from
Jun 15, 2022

Conversation

digocorbellini
Copy link
Contributor

Issue #, if available: #131

Description of changes:
getRegionForPricingAPI() (found in odpricing.go on line 206) was returning the wrong region description for all European regions. It was returning descriptions with the word "Europe" instead of "Eu," which was causing the pricing API (called on line 170) to be unable to fetch on demand pricing for European regions.

I manually tested all region IDs and this formatting mismatch only seemed to occur with European regions, so to fix this issue, I used strings.Replace() to replace all mentions of "Europe" with "Eu" after the endpoint sdk found the correct region description based on the user's desired region ID.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@digocorbellini digocorbellini requested a review from a team as a code owner June 15, 2022 20:02
@digocorbellini digocorbellini requested a review from AustinSiu June 15, 2022 20:02
@digocorbellini digocorbellini self-assigned this Jun 15, 2022
Copy link
Contributor

@bwagner5 bwagner5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! Thanks!

@bwagner5 bwagner5 merged commit 69ef9dd into aws:main Jun 15, 2022
digocorbellini added a commit to digocorbellini/amazon-ec2-instance-selector that referenced this pull request Jun 16, 2022
fixed issue with OD pricing for european regions (aws#132)
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.

3 participants