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

Unable to locate credentials - how to pass AWS_PROFILE? #93

Open
marafa-sugarcrm opened this issue Jan 22, 2025 · 1 comment
Open

Unable to locate credentials - how to pass AWS_PROFILE? #93

marafa-sugarcrm opened this issue Jan 22, 2025 · 1 comment

Comments

@marafa-sugarcrm
Copy link

marafa-sugarcrm commented Jan 22, 2025

i am attempting to use the docker version since my installed version of terraform is the last open source version.
however, i get the same error on both

./aws2tf.sh -t vpc -r us-east-1 -p $AWS_PROFILE           7s Py aws2tf 13:00:31
INFO: Running aws2tf container
DEBUG: Parameters: -t vpc -r us-east-1 -p $AWS_PROFILE
Logical cores: 6
STATUS: 0s elapsed aws2tf: Starting, update messages every 20 seconds
aws2tf started at 2025-01-22 18:00:36.152743
boto3 version:  1.36.3
Terraform version 1.10.4
region is required eg:  -r eu-west-1  [using eu-west-1 as default]
Unable to locate credentials
NoCredentialsError
~/git/aws2tf/docker master !1 ?1 ❯ ./aws2tf.sh -t vpc -r us-east-1                               6s Py aws2tf 13:00:41
INFO: Running aws2tf container
DEBUG: Parameters: -t vpc -r us-east-1
Logical cores: 6
STATUS: 0s elapsed aws2tf: Starting, update messages every 20 seconds
aws2tf started at 2025-01-22 18:01:07.074706
boto3 version:  1.36.3
Terraform version 1.10.4
region is required eg:  -r eu-west-1  [using eu-west-1 as default]
Unable to locate credentials
NoCredentialsError

which is clearer in this

 pipenv run python ./aws2tf.py -r us-east-1 -p $AWS_PROFILE -t vpc   Py aws2tf 13:03:16
Logical cores: 12
STATUS: 0s elapsed aws2tf: Starting, update messages every 20 seconds
aws2tf started at 2025-01-22 13:03:37.557401
boto3 version:  1.36.0
usage: aws2tf.py [-h] [-l] [-t TYPE] [-i ID] [-r REGION] [-m] [-d] [-s] [-f] [-v] [-a] [-e EXCLUDE] [-b3] [-la]
                 [-tv TV]
aws2tf.py: error: unrecognized arguments: -p $AWS_PROFILE
^CCtrl-C pressed.
exit 036
Exception ignored in: <module 'threading' from '/opt/homebrew/Cellar/[email protected]/3.12.8/Frameworks/Python.framework/Versions/3.12/lib/python3.12/threading.py'>
Traceback (most recent call last):
  File "/opt/homebrew/Cellar/[email protected]/3.12.8/Frameworks/Python.framework/Versions/3.12/lib/python3.12/threading.py", line 1624, in _shutdown
    lock.acquire()
  File "/Users/mohamed.arafa/git/aws2tf/code/common.py", line 765, in ctrl_c_handler
    exit()
  File "<frozen _sitebuiltins>", line 26, in __call__
SystemExit: None

and

pipenv run python ./aws2tf.py -r us-east-1 -t vpc                    7s Py aws2tf 13:03:43
Logical cores: 12
STATUS: 0s elapsed aws2tf: Starting, update messages every 20 seconds
aws2tf started at 2025-01-22 13:05:19.777583
boto3 version:  1.36.0
@awsandy
Copy link
Contributor

awsandy commented Jan 23, 2025

committed changes so you can now use a profile with the "-p" option
eg:
./aws2tf.py -t vpc -p myprofile

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

2 participants