question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for access key sessionTokens

See original GitHub issue

Hi’ya,

I don’t see a means to manually supply a sessionToken. Obviously that’s not an issue when running on a server logging out to the server’s host account, as aws will supply the default creds. However it seems to be an issue should one want to push the logs to another account using creds from a sts assumeRole request.

I welcome feedback anyone may have (admittedly, I may have missed something).

Thanks!

    if (awsAccessKeyId && awsSecretKey && awsRegion) {
      config = { accessKeyId: awsAccessKeyId, secretAccessKey: awsSecretKey, region: awsRegion };
    } else if (awsRegion && !awsAccessKeyId && !awsSecretKey) {
      // Amazon SDK will automatically pull access credentials
      // from IAM Role when running on EC2 but region still
      // needs to be configured
      config = { region: awsRegion };
    }

https://github.com/lazywithclass/winston-cloudwatch/blob/master/index.js#L47

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
lazywithclasscommented, Apr 5, 2020

As you might imagine I’ve been quite busy lately, sorry for the absurd delay in dealing with this. Is this still an issue?

If so, am I right that I would just have to provide an awsSessionToken and use that info to authenticate the calls?

0reactions
Snapucommented, May 6, 2022

+1

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using temporary credentials with AWS resources
To use temporary security credentials in code, you programmatically call an AWS STS API like AssumeRole and extract the resulting credentials and session...
Read more >
Use personal access tokens - Azure DevOps
Learn how to create and manage personal access tokens (PATs) as alternate passwords to authenticate to Azure DevOps.
Read more >
Add feature to support temporary AccessKey & SecretKey ...
Add feature to support temporary AccessKey & SecretKey with session token for Amazon EC2 Node driver in Node Templates #15962.
Read more >
get-session-token — AWS CLI 2.9.12 Command Reference
Returns a set of temporary credentials for an Amazon Web Services account or IAM user. The credentials consist of an access key ID,...
Read more >
Access Keys | Sumo Logic Docs
After an access key is deactivated, there can be a brief period of time during which a previous successful authentication remains cached and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found