title: AWS: Unable to configure profiles in AWS
body: <p>I had issues in accessing S3 buckets from EC2. I deleted both <code>~/.aws/config</code> and <code>~/.aws/credentials</code> files. Now, when I try to create the profiles again, I get this long list of exceptions:</p>
  
  <pre><code>$ aws configure --profile dev
  </code></pre>
  
  <blockquote>
    <p>Traceback (most recent call last):   File "/usr/local/bin/aws", line
    27, in 
        sys.exit(main())   File "/usr/local/bin/aws", line 23, in main
        return awscli.clidriver.main()   File "/usr/lib/python3/dist-packages/awscli/clidriver.py", line 50, in main
        return driver.main()   File "/usr/lib/python3/dist-packages/awscli/clidriver.py", line 176, in
    main
        parser = self._create_parser()   File "/usr/lib/python3/dist-packages/awscli/clidriver.py", line 157, in
    _create_parser
        command_table = self._get_command_table()   File "/usr/lib/python3/dist-packages/awscli/clidriver.py", line 91, in
    _get_command_table
        self._command_table = self._build_command_table()   File "/usr/lib/python3/dist-packages/awscli/clidriver.py", line 111, in
    _build_command_table
        command_object=self)   File "/usr/local/lib/python3.5/dist-packages/botocore/session.py", line
    672, in emit
        return self._events.emit(event_name, **kwargs)   File "/usr/local/lib/python3.5/dist-packages/botocore/hooks.py", line 356,
    in emit
        return self._emitter.emit(aliased_event_name, **kwargs)   File "/usr/local/lib/python3.5/dist-packages/botocore/hooks.py", line 228,
    in emit
        return self._emit(event_name, kwargs)   File "/usr/local/lib/python3.5/dist-packages/botocore/hooks.py", line 211,
    in _emit
        response = handler(**kwargs)   File "/usr/lib/python3/dist-packages/awscli/customizations/preview.py",
    line 70, in mark_as_preview
        service_name=original_command.service_model.service_name,   File "/usr/lib/python3/dist-packages/awscli/clidriver.py", line 351, in
    service_model
        return self._get_service_model()   File "/usr/lib/python3/dist-packages/awscli/clidriver.py", line 368, in
    _get_service_model
        api_version = self.session.get_config_variable('api_versions').get(   File
    "/usr/local/lib/python3.5/dist-packages/botocore/session.py", line
    234, in get_config_variable
        logical_name)   File "/usr/local/lib/python3.5/dist-packages/botocore/configprovider.py",
    line 227, in get_config_variable
        return provider.provide()   File "/usr/local/lib/python3.5/dist-packages/botocore/configprovider.py",
    line 324, in provide
        value = provider.provide()   File "/usr/local/lib/python3.5/dist-packages/botocore/configprovider.py",
    line 383, in provide
        config = self._session.get_scoped_config()   File "/usr/local/lib/python3.5/dist-packages/botocore/session.py", line
    335, in get_scoped_config
        raise ProfileNotFound(profile=profile_name) botocore.exceptions.ProfileNotFound: The config profile (dev) could
    not be found [~] aws configure --profile dev Traceback (most recent
    call last):   File "/usr/local/bin/aws", line 27, in 
        sys.exit(main())   File "/usr/local/bin/aws", line 23, in main
        return awscli.clidriver.main()   File "/usr/lib/python3/dist-packages/awscli/clidriver.py", line 50, in main
        return driver.main()   File "/usr/lib/python3/dist-packages/awscli/clidriver.py", line 176, in
    main
        parser = self._create_parser()   File "/usr/lib/python3/dist-packages/awscli/clidriver.py", line 157, in
    _create_parser
        command_table = self._get_command_table()   File "/usr/lib/python3/dist-packages/awscli/clidriver.py", line 91, in
    _get_command_table
        self._command_table = self._build_command_table()   File "/usr/lib/python3/dist-packages/awscli/clidriver.py", line 111, in
    _build_command_table
        command_object=self)   File "/usr/local/lib/python3.5/dist-packages/botocore/session.py", line
    672, in emit
        return self._events.emit(event_name, **kwargs)   File "/usr/local/lib/python3.5/dist-packages/botocore/hooks.py", line 356,
    in emit
        return self._emitter.emit(aliased_event_name, **kwargs)   File "/usr/local/lib/python3.5/dist-packages/botocore/hooks.py", line 228,
    in emit
        return self._emit(event_name, kwargs)   File "/usr/local/lib/python3.5/dist-packages/botocore/hooks.py", line 211,
    in _emit
        response = handler(**kwargs)   File "/usr/lib/python3/dist-packages/awscli/customizations/preview.py",
    line 70, in mark_as_preview
        service_name=original_command.service_model.service_name,   File "/usr/lib/python3/dist-packages/awscli/clidriver.py", line 351, in
    service_model
        return self._get_service_model()   File "/usr/lib/python3/dist-packages/awscli/clidriver.py", line 368, in
    _get_service_model
        api_version = self.session.get_config_variable('api_versions').get(   File
    "/usr/local/lib/python3.5/dist-packages/botocore/session.py", line
    234, in get_config_variable
        logical_name)   File "/usr/local/lib/python3.5/dist-packages/botocore/configprovider.py",
    line 227, in get_config_variable
        return provider.provide()   File "/usr/local/lib/python3.5/dist-packages/botocore/configprovider.py",
    line 324, in provide
        value = provider.provide()   File "/usr/local/lib/python3.5/dist-packages/botocore/configprovider.py",
    line 383, in provide
        config = self._session.get_scoped_config()   File "/usr/local/lib/python3.5/dist-packages/botocore/session.py", line
    335, in get_scoped_config
        raise ProfileNotFound(profile=profile_name) botocore.exceptions.ProfileNotFound: The config profile (dev) could
    not be found</p>
  </blockquote>