0

I am trying to create a new EC2 instance with the AWS console tools using this command:

aws ec2 run-instances --image-id ami-9abea4fb --count 1 –-instance-type t2.micro --key-name my_key_name --security-group-ids my_rule --region us-west-2

But I keep getting this error.

Traceback (most recent call last):
  File "/usr/local/bin/aws", line 27, in <module>
    sys.exit(main())
  File "/usr/local/bin/aws", line 23, in main
    return awscli.clidriver.main()
  File "/Users/davesmith/Library/Python/2.7/lib/python/site-packages/awscli/clidriver.py", line 56, in main
    return driver.main()
  File "/Users/davesmith/Library/Python/2.7/lib/python/site-packages/awscli/clidriver.py", line 203, in main
    sys.stderr.write(str(e))
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2013' in position 27: ordinal not in range(128)

1 Answer 1

7

The first - in your --instance-type parameter is some sort of unicode dash. Fonts can obscure this, but it worked when I manually edited it to be a minus-sign instead.

Sign up to request clarification or add additional context in comments.

1 Comment

Agree, looks like em-dash. This can happen automatically in some text editors when you type two dashes, it consolidates them into an em-dash.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.