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 optional AWS profile authentication #32

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add optional AWS profile authentication #32

wants to merge 1 commit into from

Conversation

JamieCressey
Copy link

Adding additional argument (-P, --profile) to allow authentication for AWS profiles (i.e. ~/.aws/credentials)

@geekpete
Copy link

This would be great!

@ScottyMJacobson
Copy link

A bit late on this, but I feel like the auth process here reinvents boto's wheel quite a bit (and precludes using IAM roles). Per Amazon's Docs, the AWS SDKs recommend this hierarchy when it comes to authenticating a session:

Loaded from IAM roles for Amazon EC2 (if running on EC2),
Loaded from the shared credentials file (~/.aws/credentials),
Loaded from environment variables,
Loaded from a JSON file on disk,
Hardcoded in your application

The first three are actually automatically implemented in boto; since s4cmd is built on boto, they should work implicitly. I'm gonna look into this and see if we can use boto's authentication (and handle the exception appropriately if it fails) if .s3config doesn't exist, that way we can get rid of s4cmd's redundant check for environment variables.

@chouhanyang
Copy link

Would there be the same thing in boto3 as we moved along from old boto library?

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

Successfully merging this pull request may close these issues.

4 participants