hellonarrativ / spectrify

Export Redshift data and convert to Parquet for use with Redshift Spectrum or other data warehouses.
https://aws.amazon.com/blogs/big-data/narrativ-is-helping-producers-monetize-their-digital-content-with-amazon-redshift/
MIT License
116 stars 25 forks source link

How to specify aws credential profile #33

Closed lc-rezende closed 6 years ago

lc-rezende commented 6 years ago

Hi there. I have multiple profiles in my /.aws/credentials and by default it uses the [default] profile. How can I specify another credential profile in command-line?

Thanks!

c-nichols commented 6 years ago

Hi Lucas, I don't have multiple profiles set up to test this, but you should be able to use the environment variable AWS_PROFILE as shown here: https://docs.aws.amazon.com/cli/latest/userguide/cli-multiple-profiles.html

To utilize the secondary profile for the duration of your terminal session, use:

export AWS_PROFILE=user2

And then run your commands.

To utilize the secondary profile for only the Spectrify command, prepend the AWS_PROFILE assignment to the command:

AWS_PROFILE=user2 spectrify .....

Does that work for you?

lc-rezende commented 6 years ago

Thank you @c-nichols ! Worked fine. All the best.