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

Invalid length for parameter LaunchConfigurationNames[0], value: 0, valid range: 1-inf #90

Open
Mattnmoore opened this issue Aug 9, 2018 · 8 comments

Comments

@Mattnmoore
Copy link

Mattnmoore commented Aug 9, 2018

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

@Mattnmoore
Copy link
Author

#87 fixes the issue for me

@talset
Copy link

talset commented Feb 15, 2019

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

@sc250024
Copy link

@Mattnmoore I tried forking this repo, and implementing the changes in #87, but it didn't work. Do you have a working fork?

@codingtony
Copy link

Same issue here

@leetcarey
Copy link

Having the same issue. Anyone able to implement the fix or an alternative

@GMartinez-Sisti
Copy link

The #115 appears to fix it, but it looks like this project is abandoned so it might never get merged.

@leetcarey
Copy link

Yup, installing from source via https://github.com/janus-anderwelt/aws-amicleaner fixed my issue :-)

@arturrez
Copy link

can confirm that fix ☝️ works. 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants