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

Add AWS credentials support #39

Closed
wants to merge 7 commits into from
Closed

Conversation

andrioni
Copy link
Contributor

@andrioni andrioni commented Oct 9, 2015

Hi! This PR includes several additional template functions in order to support several types of AWS authentication:

  • awsEnvCredentials: supports passing credentials through environment variables, such as AWS_ACCESS_KEY_ID, AWS_ACCESS_KEY, AWS_SECRET_ACCESS_KEY and AWS_SECRET_KEY;
  • awsProfileCredentials: supports getting credentials from a credentials file, also used by boto/awscli;
  • awsEC2RoleCredentials: supports getting role-based credentials, i.e. getting the automatically generated credentials in EC2 instances;
  • awsChainCredentials: tries to get credentials from each of the three methods above in order, using the first one returned.

They all output strings in the Redshift credentials format (CREDENTIALS 'aws_access_key_id=%s;aws_secret_access_key=%s').
All these methods were implemented using directly the official Go SDK, and it's very easy to extend them in the future to support different providers (say, using Hashicorp's Vault).

@alexanderdean
Copy link
Member

This is super-cool! Implementation looks great, thanks so much @andrioni, scheduling...

@alexanderdean alexanderdean added this to the Version 0.3.0 milestone Oct 9, 2015
@jbeemster jbeemster changed the title Add AWS credentials support, solve #36 Add AWS credentials support Oct 30, 2015
jbeemster pushed a commit that referenced this pull request Nov 4, 2015
@jbeemster jbeemster closed this in 53893c3 Nov 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants