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

Tie into AWS login somehow? #18

Open
ckelner opened this issue Jan 18, 2016 · 1 comment
Open

Tie into AWS login somehow? #18

ckelner opened this issue Jan 18, 2016 · 1 comment
Assignees

Comments

@ckelner
Copy link
Owner

ckelner commented Jan 18, 2016

Haven't really looked into this to determine if even a remote possibility. Would be nice to use an existing AWS session somehow?

@ckelner ckelner self-assigned this Jan 18, 2016
@ryansydnor
Copy link
Contributor

@ckelner - If you're running on a machine that has an instance profile, you can query EC2s metadata service using something like this:

  var metadataUrl = "http://169.254.169.254/latest/meta-data/iam/security-credentials/instance-profile";
  var onComplete = function(response) {
      response = JSON.parse(response);
      var myCreds = {
        'sessionId': response["AccessKeyId"],
        'sessionKey': response["SecretAccessKey"],
        'sessionToken': response["Token"]
      };
  myXHRRequest(metadataUrl, onComplete);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants