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

Lambda ami housekeeper and the ssm parameter store #3752

Closed
Lraharison opened this issue Feb 5, 2024 · 4 comments
Closed

Lambda ami housekeeper and the ssm parameter store #3752

Lraharison opened this issue Feb 5, 2024 · 4 comments

Comments

@Lraharison
Copy link

The Lambda Ami housekeeper is currently encountering an issue where it ignores Parameter Store entries that do not contain "ami-id" in the AMI name. Consequently, it continues to delete the AMI referenced in the Parameter Store, even if it exceeds the ami_house_keeper_minimum_days_old threshold.

This is particularly evident in the code at line 194 [link to the code: [https://github.com/philips-labs/terraform-aws-github-runner/blob/main/lambdas/functions/ami-housekeeper/src/ami.ts#L194]].

@npalm
Copy link
Member

npalm commented Feb 12, 2024

Please can you provide some more details? The issue is not clear to me? Is the problem the string is hard coded?

@Lraharison
Copy link
Author

Okay, when the value of the ssm_parameterNames parameter in the terraform ami-housekeeper module does not contain ami-id, the lambda ami housekeeper simply ignores it, so if the ami is older than the minimumDaysOld, it will be deleted. I hope I was clearer.

I'm not sure if the lambda code takes into account the value of this parameter or if it will just filter the SSM parameters containing ami-id in the name.

@npalm
Copy link
Member

npalm commented Feb 15, 2024

Thx for the feedback, In case you have some time feel free to suggest a change in a PR.

Copy link
Contributor

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the Stale label Mar 17, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants