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

Option to pass in AWS constant #2

Open
andrhamm opened this issue May 21, 2018 · 1 comment
Open

Option to pass in AWS constant #2

andrhamm opened this issue May 21, 2018 · 1 comment
Assignees

Comments

@andrhamm
Copy link

Hey, thanks for the lib!

I'm using the AWS X-Ray client and I believe I need to be able to wrap the initialization of AWS inside a function like so:

var AWS = captureAWS(require('aws-sdk'));

I'm not sure if I can accomplish that since the lib defines AWS on its own.

Thoughts?

@jonathankeebler
Copy link
Owner

@andrhamm Thanks for the suggestion. How about a config param called AWSXRay that you pass the library to. e.g.

var jwtkms = new JWTKMS({
    aws: {
        region: "us-east-1",
        accessKeyId : process.env.AWS_ACCESS_KEY,	// Optional if set in environment
        secretAccessKey: process.env.AWS_SECRET_KEY	// Optional if set in environment
    },
    AWSXRay: require('aws-xray-sdk')
});

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