Region needs to be specified if you want to upload the key to some other region than your default.
~/.aws/config looks like:
output = json
region = eu-west-1
aws_access_key_id = ...
aws_secret_access_key = ...
Command that uploads the primary key, assuming that the public key is available in
--region us-east-1 \
ec2 import-key-pair \
--key-name my-precious \
--public-key-material "$(cat ~/.ssh/my-precious.pub)"
Output, in JSON because of the config's format directive: