When I try to get a ssm parameter I get a python error.
The specific parameter is stored via Cloudformation as string type parameter, in the same template are 8 other ssm parameters created. Those others I can fetch without any problem.
Command:
aws ssm get-parameters -—names="BeanstalkdEnvironmentProduction" -—region=eu-west-1 —-output=text
Error:
/usr/lib64/python2.7/argparse.py:2127: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
if option_string == short_option_prefix:
Traceback (most recent call last):
File "/usr/bin/aws", line 27, in <module>
sys.exit(main())
File "/usr/bin/aws", line 23, in main
return awscli.clidriver.main()
File "/usr/lib/python2.7/site-packages/awscli/clidriver.py", line 56, in main
return driver.main()
File "/usr/lib/python2.7/site-packages/awscli/clidriver.py", line 192, in main
parsed_args, remaining = parser.parse_known_args(args)
File "/usr/lib/python2.7/site-packages/awscli/argparser.py", line 91, in parse_known_args
parsed, remaining = super(CLIArgParser, self).parse_known_args(args, namespace)
File "/usr/lib64/python2.7/argparse.py", line 1720, in parse_known_args
namespace, args = self._parse_known_args(args, namespace)
File "/usr/lib64/python2.7/argparse.py", line 1761, in _parse_known_args
option_tuple = self._parse_optional(arg_string)
File "/usr/lib64/python2.7/argparse.py", line 2069, in _parse_optional
option_tuples = self._get_option_tuples(arg_string)
File "/usr/lib64/python2.7/argparse.py", line 2131, in _get_option_tuples
elif option_string.startswith(option_prefix):
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 1: ordinal not in range(128)
Looks like some of your dashes are box-drawing characters from unicode not dashes. Just retype your --
to be actual dashes.
Look at it without code blocks, you can see the extra long ones are incorrect characters:
aws ssm get-parameters -—names="BeanstalkdEnvironmentProduction" -—region=eu-west-1 —-output=text
Totally not seeing that one.
Thanks!
... Running to the optician ...
Most helpful comment
Looks like some of your dashes are box-drawing characters from unicode not dashes. Just retype your
--
to be actual dashes.Look at it without code blocks, you can see the extra long ones are incorrect characters:
aws ssm get-parameters -—names="BeanstalkdEnvironmentProduction" -—region=eu-west-1 —-output=text