aws-amicleaner
aws-amicleaner copied to clipboard
Invalid length for parameter LaunchConfigurationNames[0], value: 0, valid range: 1-inf
I've been using this tool for the past week without an issue, but yesterday I started getting an error message when trying to perform a clean:
Invalid length for parameter LaunchConfigurationNames[0], value: 0, valid range: 1-inf
This is the command I'm running
amicleaner --mapping-key name --mapping-values my-ami-name --keep-previous 3
#87 fixes the issue for me
Same issue, Im using LaunchTemplate with ASG
Retrieving AMIs to clean ...
Traceback (most recent call last):
File "/usr/bin/amicleaner", line 11, in <module>
load_entry_point('aws-amicleaner', 'console_scripts', 'amicleaner')()
File "/aws-amicleaner/amicleaner/cli.py", line 195, in main
app.run_cli()
File "/aws-amicleaner/amicleaner/cli.py", line 165, in run_cli
candidates = self.prepare_candidates()
File "/aws-amicleaner/amicleaner/cli.py", line 66, in prepare_candidates
candidates_amis = candidates_amis or self.fetch_candidates()
File "/aws-amicleaner/amicleaner/cli.py", line 53, in fetch_candidates
excluded_amis += f.fetch_zeroed_asg()
File "/aws-amicleaner/amicleaner/fetch.py", line 73, in fetch_zeroed_asg
LaunchConfigurationNames=zeroed_lcs
File "/usr/lib/python2.7/site-packages/botocore/client.py", line 357, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/usr/lib/python2.7/site-packages/botocore/client.py", line 634, in _make_api_call
api_params, operation_model, context=request_context)
File "/usr/lib/python2.7/site-packages/botocore/client.py", line 682, in _convert_to_request_dict
api_params, operation_model)
File "/usr/lib/python2.7/site-packages/botocore/validate.py", line 297, in serialize_to_request
raise ParamValidationError(report=report.generate_report())
botocore.exceptions.ParamValidationError: Parameter validation failed:
Invalid length for parameter LaunchConfigurationNames[0], value: 0, valid range: 1-inf
Invalid length for parameter LaunchConfigurationNames[2], value: 0, valid range: 1-inf
@Mattnmoore I tried forking this repo, and implementing the changes in https://github.com/bonclay7/aws-amicleaner/pull/87, but it didn't work. Do you have a working fork?
Same issue here
Having the same issue. Anyone able to implement the fix or an alternative
The #115 appears to fix it, but it looks like this project is abandoned so it might never get merged.
Yup, installing from source via https://github.com/janus-anderwelt/aws-amicleaner fixed my issue :-)
can confirm that fix ☝️ works. 🙌