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

aws - ec2 resize from cost hub recommendation #9281

Merged
merged 8 commits into from Feb 8, 2024

Conversation

kapilt
Copy link
Collaborator

@kapilt kapilt commented Feb 8, 2024

instead of having to provide type map and default, support usage
with cost optimization hub for automatic resizing.


def process(self, resources, event=None):
client = local_session(self.manager.session_factory).client('cost-optimization-hub')
client = local_session(self.manager.session_factory).client(
'cost-optimization-hub', region_name='us-east-1')
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

the endpoint for hub is only in us-east-1, that endpoint does hold data for other regions

Copy link
Member

@ajkerrigan ajkerrigan left a comment

Choose a reason for hiding this comment

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

Sweet, looks good to me 👍

I did wonder if it was too magical that the resize action would automatically pull an instance type from hub recommendations (as opposed to explicitly opting in like we do with values like matched in other filter-->action relationships).

But I think the magic seems pretty nice here!

@kapilt kapilt merged commit 3110031 into cloud-custodian:main Feb 8, 2024
21 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.

None yet

2 participants