File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 1
1
"""
2
- Delete all but the latest published version of every AWS Lambda function in the
3
- current deployment.
2
+ Delete the published versions of every AWS Lambda function in the current
3
+ deployment, leaving only the unpublished version ($LATEST) of each .
4
4
"""
5
5
6
6
import logging
@@ -23,7 +23,7 @@ def main():
23
23
require (config .terraform_component == '' ,
24
24
'This script cannot be run with a Terraform component selected' ,
25
25
config .terraform_component )
26
- Lambdas ().delete_stale_function_versions ()
26
+ Lambdas ().delete_published_function_versions ()
27
27
28
28
29
29
if __name__ == '__main__' :
Original file line number Diff line number Diff line change @@ -202,7 +202,7 @@ def reset_lambda_roles(self):
202
202
else :
203
203
break
204
204
205
- def delete_stale_function_versions (self ):
205
+ def delete_published_function_versions (self ):
206
206
"""
207
207
Delete all but the latest published version of every AWS Lambda function
208
208
in the current deployment.
Original file line number Diff line number Diff line change @@ -43,12 +43,12 @@ import_resources: rename_resources
43
43
plan : import_resources
44
44
terraform plan
45
45
46
- .PHONY : delete_stale_function_versions
47
- delete_stale_function_versions : import_resources check_python
48
- python $(project_root ) /scripts/delete_stale_function_versions .py
46
+ .PHONY : delete_published_function_versions
47
+ delete_published_function_versions : import_resources check_python
48
+ python $(project_root ) /scripts/delete_published_function_versions .py
49
49
50
50
.PHONY : apply
51
- apply : delete_stale_function_versions
51
+ apply : delete_published_function_versions
52
52
ifeq ($(AZUL_PRIVATE_API ) ,1)
53
53
# For private API we need the VPC endpoints to be created first so that the
54
54
# aws_lb_target_group_attachment can iterate over the network_interface_ids.
57
57
terraform apply
58
58
59
59
.PHONY : auto_apply
60
- auto_apply : delete_stale_function_versions
60
+ auto_apply : delete_published_function_versions
61
61
ifeq ($(AZUL_PRIVATE_API ) ,1)
62
62
# See `apply` above
63
63
terraform apply -auto-approve -target aws_vpc_endpoint.indexer -target aws_vpc_endpoint.service
You can’t perform that action at this time.
0 commit comments