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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lambda function version and layer version management #17668

Open
Apollorion opened this issue Feb 17, 2021 · 1 comment
Open

Lambda function version and layer version management #17668

Apollorion opened this issue Feb 17, 2021 · 1 comment
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/lambda Issues and PRs that pertain to the lambda service.

Comments

@Apollorion
Copy link

Apollorion commented Feb 17, 2021

Community Note

  • Please vote on this issue by adding a 馃憤 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

aws_lambda_function with the option publish=true after awhile creates a long list of old lambda function versions (that can even hold onto ENI's if configured with a VPC, costing $$). It would be nice to be able to either manage those versions separately with another resource or have some option within aws_lambda_function that will manage only a rolling number of versions of the function, deleting old ones when no longer needed.

additionally

aws_lambda_layer_version only maintains a single version of the layer. It will delete the old layer before uploading a new one. I would like to be able to manage this in the same way as the above aws_lambda_function with the ability to maintain a rolling list of the versions. (I could totally be using this resource wrong and this is already supported, but I dont see how to actually acheive this)

New or Affected Resource(s)

  • aws_lambda_function
  • aws_lambda_layer_version

Potential Terraform Configuration

resource "aws_lambda_function" "function" {
  filename   = "function.zip"
  function_name = "myAwesomeFunction"
  publish = true
  versions_kept = 3
}
resource "aws_lambda_layer_version" "layer" {
  filename   = "layer.zip"
  layer_name = "myAwesomeLayer"
  versions_kept = 3
}
@Apollorion Apollorion added the enhancement Requests to existing resources that expand the functionality or scope. label Feb 17, 2021
@ghost ghost added the service/lambda Issues and PRs that pertain to the lambda service. label Feb 17, 2021
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Feb 17, 2021
@breathingdust breathingdust removed the needs-triage Waiting for first response or review from a maintainer. label Sep 8, 2021
@quentin9696
Copy link

Hi,

Is there any roadmap for this nice feature?

Actually, we don't have any way to do that with TF

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/lambda Issues and PRs that pertain to the lambda service.
Projects
None yet
Development

No branches or pull requests

3 participants