Skip to content
This repository has been archived by the owner on Sep 12, 2022. It is now read-only.

Support credentials stored via AWS CLI #27

Open
estahn opened this issue Aug 10, 2016 · 6 comments
Open

Support credentials stored via AWS CLI #27

estahn opened this issue Aug 10, 2016 · 6 comments
Assignees

Comments

@estahn
Copy link

estahn commented Aug 10, 2016

What's the reason behind using dotenv instead of ~/.aws/config and ~/.aws/credentials?

@LeeSaferite
Copy link
Contributor

Those work as well. The AWS SDK picks them up automatically. I think profile support was added as well.

@estahn
Copy link
Author

estahn commented Aug 10, 2016

@LeeSaferite I receive the following error message:

# stackformation stack:timeline


  [Exception]
  Environment variable AWS_DEFAULT_REGION not set.


stack:timeline <stack>
cat ~/.aws/config
[default]
region = ap-southeast-2

@kj187
Copy link
Contributor

kj187 commented Aug 18, 2016

I can confirm that, its an issue
https://github.com/AOEpeople/StackFormation/blob/master/src/StackFormation/Profile/Manager.php#L25

I will take care

@kj187 kj187 self-assigned this Aug 18, 2016
@kj187
Copy link
Contributor

kj187 commented Aug 18, 2016

In contrast to credentials, it seems that the SDK is not reading the ~/.aws/config automatically. Thats the reason why it is required to define the env var AWS_DEFAULT_REGION.

I will talk to @fbrnc , maybe we could add this as an fallback in Stackformation. So; first use the env var, if not available, check the config file, if not available, throw an exception.

@dng-dev
Copy link
Contributor

dng-dev commented Aug 20, 2016

Hey @kj187 i added a pull request to define region in the profiles.yml see #28

@kj187
Copy link
Contributor

kj187 commented Aug 29, 2016

Hey @dng-dev

awesome, thanks!
But it would also a nice fallback to ingest the region directly from ~/.aws/config if there is no explicit region found in the stackformation profile config.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants