Closed extsoft closed 7 months ago
There is no native way to control such a number using Terraform AWS provider resources (AFAIK) - https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lambda_function
Such a solution should be a part of a dedicated module for solutions
- https://github.com/terraform-aws-modules/terraform-aws-solutions
Pull requests are welcome.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Is your request related to a new offering from AWS?
No
Is your request related to a problem? Please describe.
I'm using Lambda function versioning with Aliases. Every code change creates a new function version. Over time, there is a list of the old versions that are no longer relevant. I would like to get them removed automatically due to
Describe the solution you'd like.
An input called
versions_to_keep
(defaults to 50). For instance,versions_to_keep = 5
means that the 5 resent versions of the function must remain; the rest must be removed.Additional context
Serverless framework has a plugin for this task.