Skip to content

Add support for session token#29

Open
thomasthiebaud wants to merge 1 commit intowrangr:masterfrom
thomasthiebaud:fix-auth
Open

Add support for session token#29
thomasthiebaud wants to merge 1 commit intowrangr:masterfrom
thomasthiebaud:fix-auth

Conversation

@thomasthiebaud
Copy link

Improve/fix aws authentication. From aws4 documentation

Your AWS credentials (which can be found in your AWS console) can be specified in one of two ways:

As the second argument, like this:

  aws4.sign(requestOptions, {
    secretAccessKey: "<your-secret-access-key>",
    accessKeyId: "<your-access-key-id>",
    sessionToken: "<your-session-token>"
  })

From process.env, such as this:

  export AWS_SECRET_ACCESS_KEY="<your-secret-access-key>"
  export AWS_ACCESS_KEY_ID="<your-access-key-id>"
  export AWS_SESSION_TOKEN="<your-session-token>"

(will also use AWS_ACCESS_KEY and AWS_SECRET_KEY if available)

The sessionToken property and AWS_SESSION_TOKEN environment variable are optional for signing with IAM STS temporary credentials.

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.

1 participant