Skip to content
This repository was archived by the owner on Jul 5, 2021. It is now read-only.

Add support for session tokens (MFA users) #54

@phealy3330

Description

@phealy3330

My AWS account has Multi Factor Authentication activated it would be nice to add support in your credentials file for the Session token and ephemeral accesskey and secretkey required for MFA enabled API access

With the AWS SDK CLI it works like this:

aws sts get-session-token --serial-number "arn:aws:iam::[ACCOUNT_NUMBER]:mfa/[IAM_USERNAME]" --token-code [COE_FROM_MFA_DEVICE]

I put in my code from Google Authenticator tied to my AWS account and it spits out some JSON:

{
    "Credentials": {
        "SecretAccessKey": "[Secret Key]", 
        "SessionToken": "[Session Token]", 
        "Expiration": "2017-02-25T09:15:03Z", 
        "AccessKeyId": "[Access key ID]"
    }
}

Then I put these keys in my credential file

Otherwise to use your glacieruploader program I have to add another IAM user without the MFA enabled to use a static accesskey and secretkey

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions